ATLAS Offline Software
SCT_ConditionsParameterTestAlgConfig.py
Go to the documentation of this file.
1 """Define method to configure and test SCT_ConditionsParameterTestAlg
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_ConditionsParameterTestAlgCfg(flags, name="SCT_ConditionsParameterTestAlg", **kwargs):
9  """Return a configured SCT_ConditionsParameterTestAlg"""
10  acc = ComponentAccumulator()
11  from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_ConditionsParameterCfg
12  kwargs.setdefault("SCT_ConditionsParameterTool", acc.popToolsAndMerge(SCT_ConditionsParameterCfg(flags)))
13  acc.addEventAlgo(CompFactory.SCT_ConditionsParameterTestAlg(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 = "data12_8TeV"
26  flags.Input.RunNumbers = [215643]
27  flags.Input.TimeStamps = [1354748400] # LB 469 of run 215643, 2012-12-05 @ 11:00pm (UTC)
28  flags.IOVDb.GlobalTag = "COMCOND-BLKPA-RUN1-09"
29  flags.IOVDb.DatabaseInstance = "COMP200"
30  from AthenaConfiguration.TestDefaults import defaultGeometryTags
31  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN1_2012
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_ConditionsParameterTestAlgCfg(flags))
42 
43  cfg.run(maxEvents=20)
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.SCT_ConditionsParameterTestAlgConfig.SCT_ConditionsParameterTestAlgCfg
def SCT_ConditionsParameterTestAlgCfg(flags, name="SCT_ConditionsParameterTestAlg", **kwargs)
Definition: SCT_ConditionsParameterTestAlgConfig.py:8
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.SCT_ConditionsToolsConfig.SCT_ConditionsParameterCfg
def SCT_ConditionsParameterCfg(flags, name="SCT_ConditionsParameter", **kwargs)
Definition: SCT_ConditionsToolsConfig.py:26