4 CA module to configure the (standalone) HLT for athena and athenaHLT.
5 There is a separate entry point for each application to tailor some
6 flags and services. All common code should go to runLTCfg(flags).
9 athena [options] TriggerJobOpts/runHLT.py [flags]
10 athenaHLT [options] TriggerJobOpts.runHLT [flags]
12 python -m TriggerJobOpts.runHLT # not recommended (due to missing LD_PRELOADs)
15 from AthenaConfiguration.ComponentFactory
import CompFactory
18 """Deny access to a few flags and lock"""
21 raise RuntimeError(
"Concurrency flags cannot be used in the HLT to ensure "
22 "that the configuration is portable across different CPUs")
24 flags.Concurrency.NumProcs = bomb
25 flags.Concurrency.NumThreads = bomb
26 flags.Concurrency.NumConcurrentEvents = bomb
32 """Set default flags for running HLT"""
33 from AthenaConfiguration.Enums
import BeamType
35 flags.Trigger.doHLT =
True
36 flags.Trigger.EDMVersion = 3
37 flags.Beam.Type = BeamType.Collisions
38 flags.InDet.useDCS =
False
39 flags.Muon.MuonTrigger =
True
42 flags.Detector.GeometryALFA =
False
43 flags.Detector.GeometryFwdRegion =
False
44 flags.Detector.GeometryLucid =
False
47 flags.Scheduler.CheckDependencies =
True
48 flags.Scheduler.EnableVerboseViews =
True
49 flags.Input.FailOnUnknownCollections =
True
50 flags.Scheduler.AutoLoadUnmetDependencies =
False
54 """Main function to configure the HLT in athena and athenaHLT"""
55 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
56 from AthenaCommon.Logging
import logging
58 log = logging.getLogger(
'runHLT')
62 loadFromSG = [(
'xAOD::EventInfo',
'StoreGateSvc+EventInfo'),
63 (
'TrigConf::L1Menu',
'DetectorStore+L1TriggerMenu'),
64 (
'TrigConf::HLTMenu',
'DetectorStore+HLTTriggerMenu')]
66 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
69 from TriggerJobOpts.TriggerHistSvcConfig
import TriggerHistSvcConfig
73 from TriggerMenuMT.HLT.Config.GenerateMenuMT
import generateMenuMT
74 from TriggerJobOpts.TriggerConfig
import triggerRunCfg
78 from LumiBlockComps.LumiBlockMuWriterConfig
import LumiBlockMuWriterCfg
81 if flags.Trigger.doTransientByteStream
and flags.Trigger.doCalo:
82 from TriggerJobOpts.TriggerTransBSConfig
import triggerTransBSCfg_Calo
86 if flags.Trigger.doLVL1:
87 from TriggerJobOpts.Lvl1SimulationConfig
import Lvl1SimulationCfg
92 if flags.Overlay.doTrackOverlay:
93 from TrkEventCnvTools.TrkEventCnvToolsConfig
import TrkEventCnvSuperToolCfg
96 if flags.Common.isOnline:
97 from TrigOnlineMonitor.TrigOnlineMonitorConfig
import trigOpMonitorCfg
101 if log.getEffectiveLevel() <= logging.DEBUG:
102 cfg.printConfig(withDetails=
False, summariseProps=
True, printDefaults=
True)
106 cfg.addService(CompFactory.MessageSvc(setError=[
"HepMcParticleLink"]))
108 from AthenaConfiguration.AccumulatorCache
import AccumulatorDecorator
109 AccumulatorDecorator.printStats()
115 """Top-level cfg function when running in athenaHLT"""
123 from TrigPSC
import PscConfig
124 for flag_arg
in PscConfig.unparsedArguments:
125 flags.fillFromString(flag_arg)
136 """Top-level cfg function when running in athena"""
137 from AthenaConfiguration.Enums
import Format
143 flags.Common.isOnline =
lambda f:
not f.Input.isMC
147 parser = flags.getArgumentParser()
148 parser.add_argument(
'--postExec', metavar=
'CMD',
149 help=
'Commands executed after Python configuration')
152 args = flags.fillFromArgs(parser=parser)
154 if flags.Trigger.writeBS:
155 flags.Output.doWriteBS =
True
157 flags.Output.doWriteRDO =
True
158 if not flags.Output.RDOFileName:
159 flags.Output.RDOFileName =
'RDO_TRIG.pool.root'
163 if flags.Trigger.selectChains
or len(flags.Trigger.enabledSignatures)==1:
164 flags.Scheduler.ShowControlFlow =
True
165 flags.Scheduler.ShowDataDeps =
True
168 _allflags = flags.clone()
170 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
177 if flags.Input.Format
is Format.BS:
178 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
181 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
191 from AthenaConfiguration.Utils
import setupLoggingLevels
198 """This method is called by athenaHLT (with pre-populated flags)"""
203 if __name__ ==
"__main__":
204 from AthenaConfiguration.AllConfigFlags
import initConfigFlags