Update add_filter with checks and append suffix Decision if necessary
Driven by the comment from @pkoppenb here this MR introduces checks to add_filter
and adds suffix Decision
if not present in the line name.
This would avoid mistakes by users who have to type Decision
explicitly. So the code would change from:
filter = add_filter("filter_name",f"HLT_PASS('{line_name}Decision', '{line_name2}Decision')")
to
filter = add_filter("filter_name",f"HLT_PASS('{line_name}', '{line_name2}')")
To be tested with: Analysis!892 (merged)
Merge request reports
Activity
added Configuration DPA-WP3 enhancement labels
assigned to @amathad
- Resolved by Abhijit Mathad
The tests of this change will be in tutorial MR (!682 (merged)) but I haven't changed anything in
DaVinciExamples
orDaVinciTutorials
.Perhaps we want to at-least change
DaVinciExamples
, to show users that they need not specifyDecision
suffix?Edited by Abhijit Mathad
- Resolved by Eduardo Rodrigues
Hey, can the various lines and check not be simplfied with a regex a bit like https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Moore/python/Moore/config.py#L39-41? I confess I did not try hard but it seems doable?
- Resolved by Abhijit Mathad
- Resolved by Abhijit Mathad
@dfazzini : This version of
add_filter
always require that there isHLT_PASS
and builds a new one with theDecision
suffix added. Therefore, it clashes with an existing test i.e.test_add_void_filter
. Is this okay? Can this test be removed?
mentioned in merge request Analysis!892 (merged)
mentioned in merge request !682 (merged)