ATLAS Offline Software
GlobalL1TopoSimulation_ctest.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 from AthenaCommon.Logging import logging
7 logger = logging.getLogger(__name__)
8 from AthenaCommon.Constants import VERBOSE
9 logger.setLevel(VERBOSE)
10 
11 import sys
12 
13 if __name__ == '__main__':
14  from AthenaCommon.Logging import logging
15 
16  from AthenaCommon.Constants import DEBUG
17 
18 
19  log = logging.getLogger('globalSim')
20  log.setLevel(DEBUG)
21  algLogLevel = DEBUG
22 
23  from AthenaConfiguration.AllConfigFlags import initConfigFlags
24  flags = initConfigFlags()
25  parser = flags.getArgumentParser()
26 
27  parser.add_argument(
28  "-ifex",
29  "--doCaloInput",
30  action="store_true",
31  dest="doCaloInput",
32  help="Decoding L1Calo inputs",
33  default=False,
34  required=False)
35 
36  from AthenaConfiguration.TestDefaults import defaultTestFiles
37  flags.Input.Files = defaultTestFiles.RAW_RUN3
38 
39 
40  flags.Concurrency.NumThreads = 1
41  flags.Concurrency.NumConcurrentEvents = 1
42 
43  flags.Scheduler.ShowDataDeps = True
44  flags.Scheduler.CheckDependencies = True
45  flags.Scheduler.ShowDataFlow = True
46  flags.Trigger.EDMVersion = 3
47  flags.Trigger.enableL1CaloPhase1 = True
48 
49 
50  flags.Output.AODFileName = 'AOD.pool.root'
51  flags.Trigger.triggerMenuSetup = 'PhysicsP1_pp_run3_v1'
52 
53  flags.GeoModel.AtlasVersion="ATLAS-R3S-2021-03-01-00"
54  flags.Common.isOnline = not flags.Input.isMC
55 
56 
57  args = flags.fillFromArgs(parser=parser)
58  flags.dump()
59 
60  flags.lock()
61 
62  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
63  acc = MainServicesCfg(flags)
64 
65  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
66  acc.merge(ByteStreamReadCfg(flags, type_names=['CTP_RDO/CTP_RDO']))
67 
68  # Generate run3 L1 menu
69  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg, generateL1Menu
70  acc.merge(L1ConfigSvcCfg(flags))
71  generateL1Menu(flags)
72 
73  subsystems = ('jFex', 'eFex')
74  from add_subsystems import add_subsystems
75 
76  acc.merge(add_subsystems(flags,
77  subsystems,
78  args,
79  OutputLevel=flags.Exec.OutputLevel))
80 
81  from GlobalSimulation.GlobalL1TopoSimulation import (
82  GlobalL1TopoSimulationCfg,
83  )
84 
85  acc.merge(GlobalL1TopoSimulationCfg(flags, algLogLevel))
86 
87 
88  roib2topo = CompFactory.LVL1.RoiB2TopoInputDataCnv(
89  name='RoiB2TopoInputDataCnv')
90 
91  roib2topo.OutputLevel = algLogLevel
92  acc.addEventAlgo(roib2topo, sequenceName="AthAlgSeq")
93 
94  from L1TopoByteStream.L1TopoByteStreamConfig import L1TopoByteStreamCfg
95  acc.merge(L1TopoByteStreamCfg(flags), sequenceName='AthAlgSeq')
96 
97  if acc.run().isFailure():
98  sys.exit(1)
99 
100 
L1TopoByteStreamConfig.L1TopoByteStreamCfg
def L1TopoByteStreamCfg(flags)
Definition: L1TopoByteStreamConfig.py:40
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:184
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
add_subsystems
Definition: add_subsystems.py:1
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:198
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
GlobalL1TopoSimulation.GlobalL1TopoSimulationCfg
def GlobalL1TopoSimulationCfg(flags, algLogLevel=None)
Definition: GlobalL1TopoSimulation.py:18