ATLAS Offline Software
testHoughAlgorithm.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
4  from argparse import ArgumentParser
5 
6  parser = ArgumentParser()
7  parser.add_argument("-o", "--output", dest="output", default='', help="Text file containing each cabling channel", metavar="FILE")
8  parser.add_argument("--inputFile", "-i", default=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/UnitTestInput/Run3MC.ESD.pool.root"],
9  help="Input file to run on ", nargs="+")
10  return parser
11 
12 
13 if __name__ == "__main__":
14  from AthenaConfiguration.AllConfigFlags import initConfigFlags
16 
17  flags = initConfigFlags()
18  flags.Concurrency.NumThreads = 1
19  flags.Concurrency.NumConcurrentEvents = 1
20 
21  flags.Scheduler.CheckDependencies = True
22  flags.Scheduler.ShowDataDeps = True
23  flags.Scheduler.ShowDataFlow = True
24  flags.Scheduler.ShowControlFlow = True
25  flags.Scheduler.EnableVerboseViews = True
26  flags.Scheduler.AutoLoadUnmetDependencies = True
27 
28 
29  flags.Output.ESDFileName = args.output
30  flags.Input.Files = args.inputFile
31  flags.lock()
32 
33  from MuonCondTest.MdtCablingTester import setupServicesCfg
34  cfg = setupServicesCfg(flags)
35  from MuonConfig.MuonSegmentFindingConfig import MuonLayerHoughAlgCfg, MuonLayerHoughToolCfg
36  cfg.merge(MuonLayerHoughAlgCfg(flags,
37  MuonLayerScanTool=cfg.popToolsAndMerge(
39  DebugHough=False))))
40 
41  from MuonHoughDataNtuple.MuonHoughDataNtuple import MakeMuonHoughDataNtuple
42  cfg.merge(MakeMuonHoughDataNtuple(flags))
43  cfg.printConfig(withDetails=True, summariseProps=True)
44  flags.dump()
45 
46  sc = cfg.run(1)
47  if not sc.isSuccess():
48  import sys
49  sys.exit("Execution failed")
50 
51 
python.MdtCablingTester.setupServicesCfg
def setupServicesCfg(flags)
Definition: MdtCablingTester.py:17
MuonHoughDataNtuple.MakeMuonHoughDataNtuple
def MakeMuonHoughDataNtuple(flags, name="MuonHoughDataNtuple", **kwargs)
Definition: MuonHoughDataNtuple.py:6
python.testHoughAlgorithm.SetupArgParser
def SetupArgParser()
Definition: testHoughAlgorithm.py:3
python.MuonSegmentFindingConfig.MuonLayerHoughToolCfg
def MuonLayerHoughToolCfg(flags, name="MuonLayerHoughTool", **kwargs)
Definition: MuonSegmentFindingConfig.py:396
python.MuonSegmentFindingConfig.MuonLayerHoughAlgCfg
def MuonLayerHoughAlgCfg(flags, name="MuonLayerHoughAlg", **kwargs)
Definition: MuonSegmentFindingConfig.py:402
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
confTool.parse_args
def parse_args()
Definition: confTool.py:35