Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PetrilloAtWork opened this issue Nov 19, 2024 · 1 comment

Comments

@PetrilloAtWork
Copy link
Contributor

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.

@knoepfel
Copy link
Member

@PetrilloAtWork, thanks for catching this. Please feel free to create a PR that removes that branch of code as well as the configuration parameter (option 1.i).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants