ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonVertexValidation
python
HitDumperRun.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
#
4
5
6
def
splitOnComma
(inputs):
7
files = []
8
for
item
in
inputs: files.extend(item.split(
','
))
9
10
return
files
11
12
13
def
GetArgsFromParser
():
14
from
argparse
import
ArgumentParser
15
16
parser = ArgumentParser()
17
parser.add_argument(
"-i"
,
"--inputFile"
, required=
True
, help=
"Input files to run on. Files can be comma or space separated"
, nargs=
"+"
)
18
parser.add_argument(
"-o"
,
"--outputFile"
, default=
"MSVtxVal_out.NTUP.root"
, help=
"output root file"
)
19
parser.add_argument(
"--maxEvents"
, default=-1, type=int, help=
"How many events shall be run maximally"
)
20
parser.add_argument(
"--skipEvents"
, default=0, type=int, help=
"How many events shall be skipped"
)
21
parser.add_argument(
"--threads"
, default=1, type=int, help=
"number of threads"
)
22
23
args = parser.parse_args()
24
args.inputFile =
splitOnComma
(args.inputFile)
# to support comma separated input files
25
26
return
args
27
28
29
def
execute
(cfg):
30
cfg.printConfig(withDetails=
True
, summariseProps=
True
)
31
if
not
cfg.run().isSuccess(): exit(1)
32
33
34
if
__name__ ==
"__main__"
:
35
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
36
from
MuonConfig.MuonConfigUtils
import
SetupMuonStandaloneCA
37
38
args =
GetArgsFromParser
()
39
flags = initConfigFlags()
40
flags.Concurrency.NumThreads = args.threads
41
flags.Exec.MaxEvents = args.maxEvents
42
flags.Exec.SkipEvents = args.skipEvents
43
flags.Concurrency.NumConcurrentEvents = args.threads
44
flags.Input.Files = args.inputFile
45
flags.Scheduler.ShowDataDeps =
True
46
flags.Scheduler.ShowDataFlow =
True
47
flags.lock()
48
49
cfg = SetupMuonStandaloneCA(flags)
50
from
MuonPRDTest.HitValAlgReco
import
HitValAlgRecoCfg
51
cfg.merge(HitValAlgRecoCfg(flags, outFile=args.outputFile,
52
doTruth=
False
, doMuEntry=
False
,
53
doSimHits=
False
, doSDOs=
False
,
54
doDigits=
False
, doRDOs=
False
,
55
doPRDs=
True
,
56
doMMPRD=
True
, doSTGCPRD=
True
,
57
doRPCPRD=
True
, doMDTPRD=
True
,
58
doTGCPRD=
True
, doCSCPRD=
False
,
59
TgcPrdKey=
"TGC_MeasurementsAllBCs"
,
60
isData=
not
flags.Input.isMC
61
))
62
cfg.printConfig(withDetails=
True
, summariseProps=
True
)
63
64
flags.dump(evaluate =
True
)
65
execute
(cfg)
HitDumperRun.splitOnComma
splitOnComma(inputs)
Definition
HitDumperRun.py:6
HitDumperRun.GetArgsFromParser
GetArgsFromParser()
Definition
HitDumperRun.py:13
HitDumperRun.execute
execute(cfg)
Definition
HitDumperRun.py:29
Generated on
for ATLAS Offline Software by
1.17.0