-
Notifications
You must be signed in to change notification settings - Fork 39
Trigger simulation modules now support input tags with process name [private] #870
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
Trigger simulation modules now support input tags with process name [private] #870
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates trigger simulation modules to support input tags with process names, not just module labels. Previously, these modules could only accept a base module label and would compose InputTags by adding threshold instance names. Now they accept full art::InputTag objects, correctly preserving process names when creating derived tags.
Key changes:
- Changed
TriggerGatesTagparameter type fromstd::stringtoart::InputTagacross multiple trigger modules - Added
makeTag/makeInputTaghelper functions that properly construct InputTags with conflict detection - Removed conditional compilation block in TriggerSimulationOnGates for cleaner code
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TriggerSimulationOnGates_module.cc | Updated to accept InputTag parameter, added makeTag helper, removed conditional compilation |
| TriggerEfficiencyPlots_module.cc | Updated to accept InputTag parameter and added makeTag helper |
| TriggerEfficiencyPlotsBase.h/.cxx | Updated to accept InputTag parameter and added makeInputTag helper |
| SlidingWindowTrigger_module.cc | Updated to accept InputTag parameter and added makeTag helper |
| SlidingWindowTriggerSimulation_module.cc | Updated to accept InputTag parameter and added makeTag helper |
| MajorityTriggerSimulation_module.cc | Updated to accept InputTag parameter and added makeTag helper |
| LVDSgates_module.cc | Updated makeTag/makeOutputInstanceName to handle InputTag parameters with additional validation |
| CMakeLists.txt | Added sbnalg dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| : inputTag.label() + inputTag.instance() | ||
| ; |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic has changed from the original. Previously, when inputTag.label() didn't match defModule, it would return either inputTag.label() if the instance was empty, or inputTag.label() + inputTag.instance() if the instance was not empty. Now it always returns inputTag.label() + inputTag.instance(), which means when instance is empty, it will just return the label. While this may be the intended behavior, this change in logic should be carefully verified to ensure it doesn't break existing functionality, especially since the concatenation logic has been simplified.
| : inputTag.label() + inputTag.instance() | |
| ; | |
| : (inputTag.instance().empty() | |
| ? inputTag.label() | |
| : inputTag.label() + inputTag.instance()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code appears to me fully equivalent, still returning inputTag.label() + inputTag.instance() if the instance is not empty, and inputTag.label() if the instance is empty (in which case it is the same as inputTag.label() + inputTag.instance()).
Good catches on names and strings. Co-authored-by: Copilot <[email protected]>
mvicenzi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
These modules are special in that they compose the list of input tags from a base tag and an instance name from a list. The simplistic tag creation logic did not account for base input tags with process names.
Now the base tag can be specified as a full input tag and an exception is raised if there is a conflict between the input tag instance and the instance in the list (if both are not empty — I expect the instance name of the input tag to be always empty; otherwise, a new protocol needs to be developed). Both module label and process name are correctly propagated.
The fix has been applied to all modules known to suffer from the issue; several of them are not commonly used, and a couple are actually deprecated and should be removed.