Skip to content

Exception in JFactory::Init() leads to missing Podio collection #490

@nathanwbrei

Description

@nathanwbrei

EICrecon catches exceptions coming from JFactories and attempts to keep processing. Podio frames have write-exactly-once semantics -- not writing a collection at all, if the factory excepts, causes a segfault. JFactory::Create catches such exceptions coming from JFactory::Process and writes out the empty collection as needed, but doesn't do so from JFactory::Init. The latter case is a bit harder because the exception in Init() happens only once at the start of processing, but requires a fresh collection be stored for each incoming JEvent. The JFactory state machine doesn't represent this. It has further flaws, such as losing track of whether Init() has been called after an Insert() happens. In general, it is currently not safe to Insert() data into a factory for some events but use Process() for others in the same stream.

Reproduced here: #487

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions