From ca38ec709d6fccc4f33cd0081759a0bbd7b2a21f Mon Sep 17 00:00:00 2001 From: Jon Burr <jon.burr@cern.ch> Date: Fri, 13 Jan 2023 14:03:49 +0100 Subject: [PATCH] NavConverterCfg: configurable chains + compression --- .../TrigNavTools/python/NavConverterConfig.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py b/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py index 04388b89f49c..78c58e381a6c 100644 --- a/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py +++ b/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py @@ -5,11 +5,16 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaCommon.Logging import logging + +from typing import Optional + log = logging.getLogger("NavConverterConfig") -def NavConverterCfg(flags): +def NavConverterCfg(flags, *, chains: Optional[list[str]]=None, doCompression: bool=True): """Configures Run 1/2 to Run 3 navigation conversion algorithm for all triggers""" + if chains is None: + chains = ['HLT_e26_lhtight_nod0_e15_etcut_L1EM7_Zee', 'HLT_mu4'] acc = ComponentAccumulator() from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg tdt = acc.getPrimaryAndMerge(TrigDecisionToolCfg(flags)) @@ -33,8 +38,8 @@ def NavConverterCfg(flags): log.info("Assuming these collections are relevant for trigger: %s", " ".join(types)) cnvAlg.Collections = types # example of chain collection: comment if all chains are to be processed - cnvAlg.Chains = ["HLT_mu4"] - cnvAlg.doCompression = True + cnvAlg.Chains = chains + cnvAlg.doCompression = doCompression acc.addEventAlgo(cnvAlg) checker = CompFactory.Trig.NavigationTesterAlg() @@ -42,12 +47,12 @@ def NavConverterCfg(flags): # in conversion job Run2 TDT is setup as default, we need to setup an alternative to access Run 3 format run3tdt = CompFactory.Trig.TrigDecisionTool("Run3TrigDecisionTool", - HLTSummary = "HLTNav_R2ToR3Summary", + HLTSummary = outputName, NavigationFormat = 'TrigComposite', AcceptMultipleInstance=True) acc.addPublicTool(run3tdt) checker.RetrievalToolRun3Nav = CompFactory.Trig.R3IParticleRetrievalTool(TrigDecisionTool = run3tdt) - checker.Chains=['HLT_e26_lhtight_nod0_e15_etcut_L1EM7_Zee', 'HLT_mu4'] #TODO automate this + checker.Chains=chains #TODO automate this acc.addEventAlgo(checker) return acc -- GitLab