ATLAS Offline Software
TgcDigiJitterTester.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 def TgcDigtJitterTestAlgCfg(flags, name="TgcCondDbTestAlg", **kwargs):
4  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5  result = ComponentAccumulator()
6  from AthenaConfiguration.ComponentFactory import CompFactory
7  from RngComps.RngCompsConfig import AthRNGSvcCfg
8  kwargs.setdefault("RndmSvc", result.getPrimaryAndMerge(AthRNGSvcCfg(flags)))
9  the_alg = CompFactory.TgcDigtJitterTestAlg(name, **kwargs)
10  result.addEventAlgo(the_alg, primary = True)
11  return result
12 if __name__ == "__main__":
13  from AthenaConfiguration.AllConfigFlags import initConfigFlags
14  from MuonCondTest.MdtCablingTester import SetupArgParser, setupServicesCfg
15 
16  parser = SetupArgParser()
17  parser.add_argument("--jsonFile", default="TGC_Digitization_timejitter.json",
18  help="If the test is run multiple times to ensure reproducibility, then the dump of the test can be resteered")
19  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/UnitTestInput/Run2MC.ESD.pool.root"])
20  args = parser.parse_args()
21 
22  flags = initConfigFlags()
23  flags.Concurrency.NumThreads = args.threads
24  flags.Concurrency.NumConcurrentEvents = args.threads # Might change this later, but good enough for the moment.
25  flags.Output.ESDFileName = args.output
26  flags.Input.Files = args.inputFile
27  flags.lock()
28 
29  cfg = setupServicesCfg(flags)
30  cfg.getService('MessageSvc').setVerbose = ["TgcDigitJitterData"]
31  from MuonConfig.MuonCondAlgConfig import TgcDigitJitterCondAlgCfg
32  cfg.merge(TgcDigitJitterCondAlgCfg(flags, readFromJSON = args.jsonFile))
33  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
34  cfg.merge(MuonIdHelperSvcCfg(flags))
35  cfg.merge(TgcDigtJitterTestAlgCfg(flags))
36  cfg.printConfig(withDetails=True, summariseProps=True)
37  flags.dump()
38  sc = cfg.run(1)
39  if not sc.isSuccess():
40  import sys
41  sys.exit("Execution failed")
python.TgcDigiJitterTester.TgcDigtJitterTestAlgCfg
def TgcDigtJitterTestAlgCfg(flags, name="TgcCondDbTestAlg", **kwargs)
Definition: TgcDigiJitterTester.py:3
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MdtCablingTester.setupServicesCfg
def setupServicesCfg(flags)
Definition: MdtCablingTester.py:17
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
python.MuonGeometryConfig.MuonIdHelperSvcCfg
def MuonIdHelperSvcCfg(flags)
Definition: MuonGeometryConfig.py:15
python.MuonCondAlgConfig.TgcDigitJitterCondAlgCfg
def TgcDigitJitterCondAlgCfg(flags, name="TgcDigitJitterCondAlg", **kwargs)
Definition: MuonCondAlgConfig.py:141
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
RngCompsConfig.AthRNGSvcCfg
def AthRNGSvcCfg(flags, name="AthRNGSvc")
Definition: RngCompsConfig.py:51