Refactor line-specific persistence control flow
This MR moves the line-specific persistence logic into the line object itself. In short, a line now explicitly defines the DataHandle
objects it would like to be requested on a positive decision, and ensures this output will exist when the line fires.
The original HltLine
has been moved to Moore.lines
and is now defined as a DecisionLine
base class with a Hlt2DecisionLine
derived class. The latter takes care of ensuring that the algorithms which must run to a line's requested output are actually run (e.g. the reconstruction for PersistReco). This is done by inserting a CF node containing the algorithms after the line's decision CF node.
As a side effect, the truth-matching logic is now able to truth-match all objects a line requests to be persisted, rather than just the 'candidate-producer algorithm'.
These changes pave the way for writing additional use-case-specific DecisionLine
-like objects. For example, it might make sense to define a LuminosityDecisionLine
, such that Moore can recognise luminosity lines and feed their output into a raw bank, or a SprucingDecisionLine
, if there is some Sprucing-specific logic required at some point.
The persistence configuration in Moore still needs to reach back into the HLT2 configuration to retrieve 'the reconstruction' in order to configure the packers. I'm hoping the changes in this MR will allow for further refactor that makes this link less implicit.
Closes #226 (closed).
Requires LHCb!2928 (merged) for the Hlt2Conf.test_generic_example_with_reco
test to pass.