ATLAS Offline Software
SCT_TdaqEnabledTestAlgConfig.py
Go to the documentation of this file.
1 """Define method to configure and test SCT_TdaqEnabledTestAlg
2 
3 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4 """
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 
8 def SCT_TdaqEnabledTestAlgCfg(flags, name="SCT_TdaqEnabledTestAlg", **kwargs):
9  """Return a configured SCT_TdaqEnabledTestAlg"""
10  acc = ComponentAccumulator()
11  from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_TdaqEnabledToolCfg
12  kwargs.setdefault("SCT_TdaqEnabledTool", acc.popToolsAndMerge(SCT_TdaqEnabledToolCfg(flags)))
13  acc.addEventAlgo(CompFactory.SCT_TdaqEnabledTestAlg(name, **kwargs))
14  return acc
15 
16 if __name__=="__main__":
17  from AthenaCommon.Logging import log
18  from AthenaCommon.Constants import INFO
19  log.setLevel(INFO)
20 
21  from AthenaConfiguration.AllConfigFlags import initConfigFlags
22  flags = initConfigFlags()
23  flags.Input.Files = []
24  flags.Input.isMC = False
25  flags.Input.ProjectName = "data16_13TeV"
26  flags.Input.RunNumbers = [310809]
27  flags.Input.TimeStamps = [1476741326] # LB 18 of run 310809, 10/17/2016 @ 9:55pm (UTC)
28  flags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2017-06"
29  from AthenaConfiguration.TestDefaults import defaultGeometryTags
30  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
31  flags.Detector.GeometrySCT = True
32  flags.lock()
33 
34  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
35  cfg = MainServicesCfg(flags)
36 
37  from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
38  cfg.merge(McEventSelectorCfg(flags))
39 
40  algkwargs = {}
41  algkwargs["OutputLevel"] = INFO
42  cfg.merge(SCT_TdaqEnabledTestAlgCfg(flags, **algkwargs))
43 
44  cfg.run(maxEvents=20)
python.SCT_TdaqEnabledTestAlgConfig.SCT_TdaqEnabledTestAlgCfg
def SCT_TdaqEnabledTestAlgCfg(flags, name="SCT_TdaqEnabledTestAlg", **kwargs)
Definition: SCT_TdaqEnabledTestAlgConfig.py:8
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
python.McEventSelectorConfig.McEventSelectorCfg
def McEventSelectorCfg(flags, **kwargs)
Definition: McEventSelectorConfig.py:5
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.SCT_ConditionsToolsConfig.SCT_TdaqEnabledToolCfg
def SCT_TdaqEnabledToolCfg(flags, name="InDetSCT_TdaqEnabledTool", **kwargs)
Definition: SCT_ConditionsToolsConfig.py:509