ATLAS Offline Software
Loading...
Searching...
No Matches
testByteSreamDecoding.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2from MuonGeoModelTestR4.testGeoModel import MuonPhaseIITestDefaults
3
5 from argparse import ArgumentParser
6
7 parser = ArgumentParser()
8 parser.add_argument("--threads", type=int, help="number of threads", default=1)
9 parser.add_argument("--inputFile", "-i", default= MuonPhaseIITestDefaults.DATA_BS,
10 help="Input file to run on ", nargs="+")
11 parser.add_argument("--useSqLite", action="store_true", default = False,
12 help="Schedule whether the phase II geometry shall be used")
13 parser.add_argument("--doRdoDecoding", action="store_true", default = False,
14 help="Decode the Rdos to PRD objects afterwards")
15 parser.add_argument("--nEvents", help="Number of events to run", type = int ,default = -1)
16 parser.add_argument("--skipEvents", help="Number of events to skip", type = int, default = 0)
17
18 return parser
19if __name__ == "__main__":
20 from AthenaConfiguration.AllConfigFlags import initConfigFlags
21 from MuonGeoModelTestR4.testGeoModel import setupServicesCfg
22
23 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
24 from MuonConfig.MuonConfigUtils import executeTest, configureCondTag
25
26 args = SetupArgParser().parse_args()
27
28
29 flags = initConfigFlags()
30 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R3
31 flags.GeoModel.SQLiteDB = args.useSqLite
32 from AthenaConfiguration.TestDefaults import defaultGeometryTags
33 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
34
35
36 flags.Input.Files = args.inputFile
37 configureCondTag(flags)
38
39 flags.Concurrency.NumThreads = args.threads
40 flags.Concurrency.NumConcurrentEvents = args.threads
41 flags.Exec.MaxEvents = args.nEvents
42 flags.Exec.SkipEvents = args.skipEvents
43
44 flags.Scheduler.CheckDependencies = True
45 flags.Scheduler.ShowDataDeps = True
46 flags.Scheduler.ShowDataFlow = True
47 flags.Scheduler.ShowControlFlow = True
48 flags.Scheduler.EnableVerboseViews = True
49 flags.Scheduler.AutoLoadUnmetDependencies = True
50
51 flags.PerfMon.doFullMonMT = True
52 flags.lock()
53
54 cfg = setupServicesCfg(flags)
55
56 cfg.merge(MuonGeoModelCfg(flags))
57
58 if flags.Muon.usePhaseIIGeoSetup:
59 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
60 cfg.merge(ActsGeometryContextAlgCfg(flags))
61
62 from MuonConfig.MuonBytestreamDecodeConfig import MuonByteStreamDecodersCfg
63 cfg.merge(MuonByteStreamDecodersCfg(flags))
64
65 if args.doRdoDecoding:
66 from MuonConfig.MuonRdoDecodeConfig import MuonRDOtoPRDConvertorsCfg
67 cfg.merge(MuonRDOtoPRDConvertorsCfg(flags))
68
69 executeTest(cfg)