ATLAS Offline Software
TestSCT_CablingConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/AthenaJobConfigRun3
4 
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 
8 
11 
12  from SCT_Cabling.SCT_CablingConfig import SCT_CablingCondAlgCfg
13  cfg.merge(SCT_CablingCondAlgCfg(flags))
14 
15  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
16  geoCfg=GeoModelCfg(flags)
17  cfg.merge(geoCfg)
18 
19  from AthenaCommon.Constants import INFO
20  SCT_CablingTool = CompFactory.SCT_CablingTool()
21  SCT_CablingTool.DataSource = "COOLVECTOR"
22  SCT_CablingTool.OutputLevel = INFO
23 
24  SCT_TestCablingAlg=CompFactory.SCT_TestCablingAlg
25  testAlg = SCT_TestCablingAlg(SCT_CablingTool = SCT_CablingTool,
26  OutputLevel = INFO)
27  cfg.addEventAlgo(testAlg)
28 
29  return cfg
30 
31 
32 if __name__=="__main__":
33  from AthenaCommon.Logging import log
34  from AthenaCommon.Constants import DEBUG
35  log.setLevel(DEBUG)
36 
37  from AthenaConfiguration.AllConfigFlags import initConfigFlags
38  flags = initConfigFlags()
39  flags.Input.Files = []
40  flags.Input.isMC = True
41  flags.Input.RunNumbers = [300000]
42  flags.Input.TimeStamps = [1500000000]
43  # https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConditionsRun1RunNumbers
44  from AthenaConfiguration.TestDefaults import defaultGeometryTags, defaultConditionsTags
45  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
46  flags.IOVDb.GlobalTag = defaultConditionsTags.autoconfigure(flags)
47  flags.Detector.GeometrySCT = True
48  flags.lock()
49 
50  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
51  cfg=MainServicesCfg(flags)
52 
53  from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
54  cfg.merge(McEventSelectorCfg(flags))
55 
56  cfg.merge(SCT_TestCablingAlgCfg(flags))
57 
58  # IOVDbSvc = cfg.getService("IOVDbSvc")
59  #
60 
66 
67  cfg.run(maxEvents=20)
python.TestSCT_CablingConfig.SCT_TestCablingAlgCfg
def SCT_TestCablingAlgCfg(flags)
Definition: TestSCT_CablingConfig.py:9
SCT_TestCablingAlg
Definition: SCT_TestCablingAlg.h:35
python.SCT_CablingConfig.SCT_CablingCondAlgCfg
def SCT_CablingCondAlgCfg(flags, name="SCT_CablingCondAlgFromCoraCool")
Definition: SCT_CablingConfig.py:22
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.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16