ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ConditionsSummaryTestAlgConfig.py
Go to the documentation of this file.
1"""Define method to configure and test SCT_ConditionsSummaryTestAlg
2
3Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4"""
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory import CompFactory
7
8def 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
17if __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)
SCT_ConditionsSummaryTestAlgCfg(flags, name="SCT_ConditionsSummaryTestAlg", **kwargs)