Skip to content

Exception in JFactory::Create, ... printouts #496

@veprbl

Description

@veprbl

When running reconstruction on incomplete input files with JANA2 2026.02.00 I'm getting additional error messages:

...
Exception in JFactory::Create, prefix=eicrecon::PulseNoise_factory
Exception in JFactory::Create, prefix=eicrecon::SiliconTrackerDigi_factory

this is the reproducer in eic container:

ddsim --compactFile $DETECTOR_PATH/epic_inner_detector.xml --outputFile test.edm4hep.root --enableGun --numberOfEvents 10
DETECTOR_CONFIG=epic_inner_detector eicrecon test.edm4hep.root

catch (...) {
// Save everything already created even if we throw an exception
// This is so that we leave everything in a valid state just in case someone tries to catch the exception recover,
// such as EICrecon. (Remember that a missing collection in the podio frame will segfault if anyone tries to write that frame)
// Note that the collections themselves won't know that they exited early
LOG << "Exception in JFactory::Create, prefix=" << GetPrefix();

There are two questions that I wanted to discuss:

  1. The error message is lacking context. For example, std::exception::what() could tell user: JOmniFactory: Failed to get collection B0TrackerHits: Missing databundle with uniquename 'B0TrackerHits', but that is not visible. Would it make sense to add that to the message?
  2. Are we supposed to be able to opt-out of those? I see a difference between eicrecon::PulseNoise_factory and eicrecon::SiliconTrackerDigi_factory in that the later is about an optional collection:
    https://github.com/eic/EICrecon/blob/0bb708dfcf8f61e0aaf5e4c21e60da672d596a0b/src/global/tracking/tracking.cc#L71
    https://github.com/eic/EICrecon/blob/0bb708dfcf8f61e0aaf5e4c21e60da672d596a0b/src/factories/meta/CollectionCollector_factory.h#L20-L22
    https://github.com/eic/EICrecon/blob/0bb708dfcf8f61e0aaf5e4c21e60da672d596a0b/src/extensions/jana/JOmniFactory.h#L125-L128
    Are we supposed to have control of what is considered exceptional and what is not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions