ATLAS Offline Software
Loading...
Searching...
No Matches
run_hypo_mult_from_json.py
Go to the documentation of this file.
1#!/usr/bin/env python
2# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
4#
5# python script to run an Athena job to run the eEmMult Algorithm
6# usage: run_hypo_mult.py --evtMax 10
7#
8import os
9
10
11if __name__ == '__main__':
12
13 from add_subsystems import add_subsystems
14
15 from AthenaConfiguration.AllConfigFlags import initConfigFlags
16 flags = initConfigFlags()
17 parser = flags.getArgumentParser()
18
19 parser.add_argument(
20 "-ifex",
21 "--doCaloInput",
22 action="store_true",
23 dest="doCaloInput",
24 help="Decoding L1Calo inputs",
25 default=False,
26 required=False)
27
28 parser.add_argument(
29 "--dump",
30 action="store_true",
31 help="Write out dumps",
32 default=False)
33
34 parser.add_argument(
35 "--dumpTerse",
36 action="store_true",
37 help="Write out dumps: tersely",
38 default=False)
39
40
41 # from AthenaConfiguration.TestDefaults import defaultTestFiles
42 from AthenaConfiguration.TestDefaults import (defaultGeometryTags,
43 defaultConditionsTags)
44 # flags.Input.Files = defaultTestFiles.RAW_RUN3_DATA24 # this works
45 flags.Input.Files = ['/eos/atlas/atlascerngroupdisk/det-l1calo/OfflineSoftware/TestFiles/data23_13p6TeV.DAOD_L1CALO1.with_gFexDataTowers50.root'] # buttinger
46 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
47 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA24
48
49 flags.Output.AODFileName = 'AOD.pool.root'
50 flags.Concurrency.NumThreads = 1
51 flags.Concurrency.NumConcurrentEvents = 1
52 flags.Trigger.doLVL1 = True
53
54 flags.Scheduler.ShowDataDeps = True
55 flags.Scheduler.CheckDependencies = True
56 flags.Scheduler.ShowDataFlow = True
57 flags.Trigger.EDMVersion = 3
58 flags.Trigger.enableL1CaloPhase1 = True
59
60 # Enable only calo for this test
61 from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
62
63 setupDetectorFlags(flags, ['LAr','Tile','MBTS'], toggle_geometry=True)
64
65 args = flags.fillFromArgs(parser=parser)
66 flags.lock()
67 flags.dump()
68
69 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
70 acc = MainServicesCfg(flags)
71
72
73
77
78 from AthenaConfiguration.Enums import Format
79 if flags.Input.Format == Format.POOL:
80 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
81 acc.merge(PoolReadCfg(flags))
82 else:
83 subsystems = ('eFex',)
84 acc.merge(add_subsystems(flags, subsystems, args, OutputLevel=flags.Exec.OutputLevel))
85
86 from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
87 acc.merge(ByteStreamReadCfg(flags))
88
89 from TrigCaloRec.TrigCaloRecConfig import hltCaloCellSeedlessMakerCfg
90 acc.merge(hltCaloCellSeedlessMakerCfg(flags, roisKey=''))
91
92 # add in the Algorithm to be run
93 from GlobalSimAlgCfg_hypo_mult_from_json import GlobalSimulationAlgCfg
94 acc.merge(GlobalSimulationAlgCfg(flags, dump='GS_DUMP' in os.environ))
95
96 acc.getService("StoreGateSvc").Dump = True
97
98 if acc.run().isFailure():
99 import sys
100 sys.exit(1)
101
102