ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
ITkPixelByteStreamCnv
scripts
RunITkPixelEncodingMonitoring.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4
5
"""
6
7
Run encoding and monitoring of the RDO to pixel bytestream conversion
8
9
"""
10
from
argparse
import
ArgumentParser
11
12
# Argument parsing
13
parser = ArgumentParser(
"RunITkPixelEncodingMonitoring.py"
)
14
parser.add_argument(
"-V"
,
"--verboseAccumulators"
, default=
False
,
15
action=
"store_true"
,
16
help=
"Print full details of the AlgSequence"
)
17
parser.add_argument(
"-S"
,
"--verboseStoreGate"
, default=
False
,
18
action=
"store_true"
,
19
help=
"Dump the StoreGate(s) each event iteration"
)
20
parser.add_argument(
"--maxEvents"
,default=10, type=int,
21
help=
"The number of events to run. 0 skips execution"
)
22
parser.add_argument(
"--inputFile"
,
23
default=
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/RDO/ATLAS-P2-RUN4-03-00-00/mc21_14TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.RDO.e8481_s4149_r14700/RDO.33629020._000047.pool.root.1"
,
24
help=
"The input RDO file to use"
)
25
args = parser.parse_args()
26
27
# Some info about the job
28
print
(
"----Run encoding and monitoring of the RDO to pixel bytestream conversion----"
)
29
print
()
30
31
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
32
flags = initConfigFlags()
33
34
# make logging more verbose
35
from
AthenaCommon.Logging
import
log
36
from
AthenaCommon.Constants
import
DEBUG, INFO
37
log.setLevel(INFO)
38
39
flags.Input.isMC =
True
40
import
glob
41
flags.Input.Files = glob.glob(args.inputFile)
42
43
flags.Detector.GeometryCalo =
False
44
flags.Detector.GeometryMuon =
False
45
46
# This should run serially for the moment.
47
flags.Concurrency.NumThreads = 1
48
flags.Concurrency.NumConcurrentEvents = 1
49
50
log.debug(
'Lock config flags now.'
)
51
flags.lock()
52
53
# make logging more verbose
54
from
AthenaCommon.Logging
import
log
55
from
AthenaCommon.Constants
import
INFO
#DEBUG
56
log.setLevel(INFO)
57
58
59
if
args.verboseAccumulators:
60
cfg.printConfig(withDetails=
True
)
61
if
args.verboseStoreGate:
62
cfg.getService(
"StoreGateSvc"
).Dump =
True
63
64
log.debug(
'Dumping of ConfigFlags now.'
)
65
flags.dump()
66
67
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
68
cfg=MainServicesCfg(flags)
69
70
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
71
cfg.merge(PoolReadCfg(flags))
72
73
from
ITkPixelCabling.ITkPixelCablingAlgConfig
import
ITkPixelCablingAlgCfg
74
cfg.merge(ITkPixelCablingAlgCfg(flags, name=
"ITkPixelCablingAlg"
, UseTestCabling=
True
))
75
76
# Adds the encoding alg
77
from
ITkPixelByteStreamCnv.ITkPixelByteStreamCnvConfig
import
ITkPixelEncodingAlgCfg
78
cfg.merge( ITkPixelEncodingAlgCfg(flags, doMonitoring =
True
, doExpertPlots =
True
) )
79
80
# loop over the number of events specified as arguments (default to 10)
81
cfg.run(args.maxEvents)
print
void print(char *figname, TCanvas *c1)
Definition
TRTCalib_StrawStatusPlots.cxx:26
Constants
Generated on
for ATLAS Offline Software by
1.17.0