ATLAS Offline Software
Loading...
Searching...
No Matches
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
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory import CompFactory
7
8
10 cfg=ComponentAccumulator()
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
32if __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)
SCT_TestCablingAlg exercises the routines of the SCT cabling tool.