Skip to content

OpHitFinder always attempts to read a potentially non-existing data product #35

@PetrilloAtWork

Description

@PetrilloAtWork

The OpHitFinder module appears to check for generated beam gates:

std::vector<const sim::BeamGateInfo*> beamGateArray;
try {
evt.getView(fGenModule, beamGateArray);
}
catch (art::Exception const& err) {
if (err.categoryCode() != art::errors::ProductNotFound) throw;
}

If I am not mistaken, this generated beam gate data product (std::vector<sim::BeamGateInfo>) is not used in the module, and from the code it's clear that it was considered optional. What is worse, a data product reading is always attempted. This complicates the debugging of detector data jobs, which do not have any generated beam gate by definition, since it throws (and then catches) an exception per event.

Possible solutions:

  1. completely remove that branch of code
    1. also remove the (mandatory) configuration parameter with the input tag (breaking change)
    2. make the parameter optional
      1. ignore it or not read it at all
      2. when specified, emit a warning that it's ignored
  2. leave the branch of code, but execute it only if the configured input tag is not empty()
    1. also make the configuration parameter an empty tag by default
    2. leave the configuration parameter mandatory

I can implement the changes that LArSoft decides are the more appropriate.

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