14 from AthenaCommon.Logging
import logging
15 log = logging.getLogger(
'test_menu_cf')
23 from AthenaCommon
import JobProperties
24 JobProperties.jobPropertiesDisallowed =
True
27 flags.Trigger.doHLT =
True
28 flags.Trigger.EDMVersion = 3
29 flags.Common.isOnline =
True
30 flags.Input.Files = []
32 from TriggerJobOpts.TriggerConfigFlags
import ROBPrefetching
33 flags.Trigger.triggerMenuSetup =
"Dev_pp_run3_v1"
34 flags.Trigger.ROBPrefetchingOptions = [ROBPrefetching.StepRoI]
35 flags.Trigger.enableL1MuonPhase1 =
False
36 flags.Trigger.enabledSignatures = [
'Muon',
'Tau',
'MinBias',
'Bphysics',
'Egamma',
'Electron',
'Photon',
'MET',
'Jet',
'Bjet',
'Calib']
37 log.info(
"Running on these signatures: %s",flags.Trigger.enabledSignatures)
40 flags.Trigger.doCFEmulationTest =
True
41 flags.Trigger.generateMenuDiagnostics =
True
43 import TriggerMenuMT.HLT.Config.ControlFlow.HLTCFConfig
44 TriggerMenuMT.HLT.Config.ControlFlow.HLTCFConfig.log.setLevel(DEBUG)
49 from TriggerMenuMT.CFtest.generateCFChains
import generateCFChains
50 from TriggerMenuMT.CFtest.EmuStepProcessingConfig
import generateEmuEvents, generateChainsManually, generateEmuMenu
52 if args.menuType ==
'menuManual':
55 chains =
list(itertools.chain(*menu.chainsInMenu.values()))
56 elif args.menuType ==
'emuMenuTest':
60 elif args.menuType ==
'emuManual':
65 log.error(
"Input parameter %s not accepted",args.menuType)
70 from TrigConfigSvc.TrigConfigSvcCfg
import generateL1Menu
76 from TriggerMenuMT.HLT.Config.GenerateMenuMT
import makeHLTTree
79 from TriggerMenuMT.HLT.Config.Utility.MenuPrescaleSet
import AutoPrescaleSetGen
80 AutoPrescaleSetGen().
generate(flags, store=
True)
85 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
89 parser = flags.getArgumentParser()
91 parser.add_argument(
'--menuType', default=
'emuMenuTest',
92 help=
'use either menu or manual chain building')
95 args = flags.fillFromArgs(parser=parser)
96 log.info(
'Setup options:')
97 log.info(
' %20s = %s' ,
'menuType', args.menuType)
100 _allflags = flags.clone()
102 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
107 from TriggerJobOpts.TriggerConfig
import triggerRunCfg
108 menu =
triggerRunCfg(flags, menu=functools.partial(makeMenu, args=args))
110 cfg.printConfig(withDetails=
False, summariseProps=
True, printDefaults=
True)
112 from AthenaConfiguration.AccumulatorCache
import AccumulatorDecorator
113 AccumulatorDecorator.printStats()
115 from AthenaCommon.CFElements
import isSequence
116 for alg
in menu.getSequence(
"HLTAllSteps").Members:
120 if "TriggerSummary" in alg.getName():
121 alg.OutputLevel = DEBUG
126 if __name__ ==
"__main__":
128 sys.exit(
main().
run().isFailure())