ATLAS Offline Software
SCT_ByteStreamErrorsTestAlgConfig.py
Go to the documentation of this file.
1 """Define method to configure and test SCT_ByteStreamErrorsTestAlg
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_ByteStreamErrorsTestAlgCfg(flags, name="SCT_ByteStreamErrorsTestAlg", **kwargs):
9  """Return a configured SCT_ByteStreamErrorsTestAlg"""
10  acc = ComponentAccumulator()
11  from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_ByteStreamErrorsToolCfg
12  kwargs.setdefault("ByteStreamErrorsTool", acc.popToolsAndMerge(SCT_ByteStreamErrorsToolCfg(flags)))
13  acc.addEventAlgo(CompFactory.SCT_ByteStreamErrorsTestAlg(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.isMC = False
24  flags.Input.Files = ["./myESD.pool.root"]
25  flags.Input.ProjectName = "data17_13TeV" # q431 input
26  flags.Input.RunNumbers = [330470] # q431 input
27  flags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2018-03" # q431 setup
28  from AthenaConfiguration.TestDefaults import defaultGeometryTags
29  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
30  flags.Detector.GeometrySCT = True
31  flags.lock()
32 
33  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
34  cfg = MainServicesCfg(flags)
35 
36  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
37  cfg.merge(PoolReadCfg(flags))
38 
39  algkwargs = {}
40  algkwargs["OutputLevel"] = INFO
41  cfg.merge(SCT_ByteStreamErrorsTestAlgCfg(flags, **algkwargs))
42 
43  cfg.run(maxEvents=25)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.SCT_ByteStreamErrorsTestAlgConfig.SCT_ByteStreamErrorsTestAlgCfg
def SCT_ByteStreamErrorsTestAlgCfg(flags, name="SCT_ByteStreamErrorsTestAlg", **kwargs)
Definition: SCT_ByteStreamErrorsTestAlgConfig.py:8
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
python.SCT_ConditionsToolsConfig.SCT_ByteStreamErrorsToolCfg
def SCT_ByteStreamErrorsToolCfg(flags, name="SCT_ByteStreamErrorsTool", **kwargs)
Definition: SCT_ConditionsToolsConfig.py:12