ATLAS Offline Software
TrigValAlgsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def TrigEDMCheckerCfg(flags, name="TrigEDMChecker", doDumpAll=True):
7  from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg
9  edmchecker = CompFactory.TrigEDMChecker(
10  name,
11  doDumpAll = doDumpAll,
12  TriggerDecisionTool = cfg.getPrimaryAndMerge(TrigDecisionToolCfg(flags)) )
13 
14  if doDumpAll:
15  from MuonConfig.MuonRecToolsConfig import MuonEDMPrinterToolCfg
16  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg, MuonIdHelperSvcCfg
17  cfg.merge(MuonGeoModelCfg(flags))
18  cfg.merge(MuonIdHelperSvcCfg(flags))
19  edmchecker.MuonPrinter = CompFactory.Rec.MuonPrintingTool(
20  MuonStationPrinter = cfg.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags)) )
21 
22  cfg.addEventAlgo(edmchecker)
23 
24  return cfg
25 
26 
27 def TrigEDMAuxCheckerCfg(flags, name="TrigEDMAuxChecker"):
28  cfg = ComponentAccumulator()
29 
30  alg = CompFactory.TrigEDMAuxChecker(name, AuxContainerList=getEDMAuxList(flags))
31  cfg.addEventAlgo(alg)
32  return cfg
33 
34 
35 def getEDMAuxList(flags):
36  from TrigEDMConfig.TriggerEDM import getTriggerEDMList
37  tlist=getTriggerEDMList(flags, key=flags.Trigger.AODEDMSet)
38  objlist=[]
39  for t,kset in tlist.items():
40  for k in kset:
41  if 'Aux.' in k:
42  s = k.split('.',1)[0] + "."
43  # Types of these collections from Run 2 do not inherit from xAOD::AuxContainerBase, so can't test them here
44  if flags.Trigger.EDMVersion == 2 and "HLT_xAOD__JetContainer" in s or "xTrigDecisionAux" in s or "TrigNavigationAux" in s:
45  continue
46  objlist += [s]
47  return objlist
48 
49 
50 if __name__ == '__main__':
51  from AthenaConfiguration.AllConfigFlags import initConfigFlags
52  from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags
53  flags = initConfigFlags()
54  flags.Input.Files = defaultTestFiles.RAW_RUN3
55  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
56  flags.lock()
57 
59  cfg.merge( TrigEDMCheckerCfg(flags) )
60  cfg.merge( TrigEDMAuxCheckerCfg(flags) )
61  cfg.wasMerged()
python.TrigValAlgsConfig.TrigEDMCheckerCfg
def TrigEDMCheckerCfg(flags, name="TrigEDMChecker", doDumpAll=True)
Definition: TrigValAlgsConfig.py:6
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MuonRecToolsConfig.MuonEDMPrinterToolCfg
def MuonEDMPrinterToolCfg(flags, name="MuonEDMPrinterTool", **kwargs)
Definition: MuonRecToolsConfig.py:10
python.TrigValAlgsConfig.TrigEDMAuxCheckerCfg
def TrigEDMAuxCheckerCfg(flags, name="TrigEDMAuxChecker")
Definition: TrigValAlgsConfig.py:27
python.TriggerEDM.getTriggerEDMList
def getTriggerEDMList(flags, key, runVersion=-1)
Definition: TriggerEDM.py:149
python.MuonGeometryConfig.MuonIdHelperSvcCfg
def MuonIdHelperSvcCfg(flags)
Definition: MuonGeometryConfig.py:15
python.TriggerInterface.TrigDecisionToolCfg
def TrigDecisionToolCfg(flags)
Definition: TriggerInterface.py:14
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.TrigValAlgsConfig.getEDMAuxList
def getEDMAuxList(flags)
Definition: TrigValAlgsConfig.py:35