ATLAS Offline Software
SCT_ConditionsSummaryTestAlgConfig.py
Go to the documentation of this file.
1 """Define method to configure and test SCT_ConditionsSummaryTestAlg
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_ConditionsSummaryTestAlgCfg(flags, name="SCT_ConditionsSummaryTestAlg", **kwargs):
9  """Return a configured SCT_ConditionsSummaryTestAlg"""
10  acc = ComponentAccumulator()
11  from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_ConditionsSummaryToolCfg
12  InDetSCT_ConditionsSummaryToolWithoutFlagged = acc.popToolsAndMerge(SCT_ConditionsSummaryToolCfg(flags,withFlaggedCondTool=False))
13  kwargs.setdefault("SCT_ConditionsSummaryTool", InDetSCT_ConditionsSummaryToolWithoutFlagged)
14  acc.addEventAlgo(CompFactory.SCT_ConditionsSummaryTestAlg(name, **kwargs))
15  return acc
16 
17 if __name__=="__main__":
18  from AthenaCommon.Logging import log
19  from AthenaCommon.Constants import INFO
20  log.setLevel(INFO)
21 
22  from AthenaConfiguration.AllConfigFlags import initConfigFlags
23  flags = initConfigFlags()
24  flags.Input.Files = []
25  flags.Input.isMC = False
26  flags.Input.ProjectName = "data17_13TeV"
27  flags.Input.RunNumbers = [310809]
28  flags.Input.TimeStamps = [1476741326] # LB 18 of run 310809, 10/17/2016 @ 9:55pm (UTC)
29  flags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2017-06"
30  from AthenaConfiguration.TestDefaults import defaultGeometryTags
31  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
32  flags.Detector.GeometrySCT = True
33  flags.lock()
34 
35  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
36  cfg = MainServicesCfg(flags)
37 
38  from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
39  cfg.merge(McEventSelectorCfg(flags))
40 
41  cfg.merge(SCT_ConditionsSummaryTestAlgCfg(flags))
42 
43  cfg.run(maxEvents=20)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.SCT_ConditionsSummaryTestAlgConfig.SCT_ConditionsSummaryTestAlgCfg
def SCT_ConditionsSummaryTestAlgCfg(flags, name="SCT_ConditionsSummaryTestAlg", **kwargs)
Definition: SCT_ConditionsSummaryTestAlgConfig.py:8
python.SCT_ConditionsToolsConfig.SCT_ConditionsSummaryToolCfg
def SCT_ConditionsSummaryToolCfg(flags, name="InDetSCT_ConditionsSummaryTool", **kwargs)
Definition: SCT_ConditionsToolsConfig.py:80
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