ATLAS Offline Software
RpcCablingTester.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 def RpcCablingTestAlgCfg(flags, name = "RpcCablingTestAlg", JSONFile="",**kwargs):
4  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5  from AthenaConfiguration.ComponentFactory import CompFactory
6  from MuonConfig.MuonCablingConfig import NRPCCablingConfigCfg
7  from AthenaCommon.Constants import DEBUG
8  result = ComponentAccumulator()
9  result.merge(NRPCCablingConfigCfg(flags, JSONFile = JSONFile, OutputLevel = DEBUG ))
10  event_algo = CompFactory.Muon.RpcCablingTestAlg(name, OutputLevel = DEBUG, **kwargs)
11  result.addEventAlgo(event_algo, primary = True)
12  return result
13 
14 if __name__ == "__main__":
15  from AthenaConfiguration.AllConfigFlags import initConfigFlags
16  from MuonCondTest.MdtCablingTester import SetupArgParser
17  parser = SetupArgParser()
18  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/UnitTestInput/Run3MC.ESD.pool.root"])
19  args = parser.parse_args()
20 
21  flags = initConfigFlags()
22  flags.Muon.enableNRPC = True
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  from MuonCondTest.MdtCablingTester import setupServicesCfg
30  cfg = setupServicesCfg(flags)
31 
32  cfg.merge( RpcCablingTestAlgCfg(flags))
33  if len(args.cablingMap):
34  cfg.getCondAlgo("MuonNRPC_CablingAlg").JSONFile = args.cablingMap
35  cfg.getService("MessageSvc").debugLimit = 2147483647
36  cfg.getService("MessageSvc").verboseLimit = 2147483647
37  cfg.getService("MessageSvc").infoLimit = 2147483647
38 
39  cfg.printConfig(withDetails=True, summariseProps=True)
40  flags.dump()
41 
42  sc = cfg.run(1)
43  if not sc.isSuccess():
44  import sys
45  sys.exit("Execution failed")
46 
47 
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.MuonCablingConfig.NRPCCablingConfigCfg
def NRPCCablingConfigCfg(flags, name="MuonNRPC_CablingAlg", **kwargs)
Definition: MuonCablingConfig.py:6
Constants
some useful constants -------------------------------------------------—
python.RpcCablingTester.RpcCablingTestAlgCfg
def RpcCablingTestAlgCfg(flags, name="RpcCablingTestAlg", JSONFile="", **kwargs)
Definition: RpcCablingTester.py:3
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19