from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() ### Create the Menu ### ####################### include("TrigSteering/pureSteering_menu.py") ### Setup TrigConfigSvc ### #################################### from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc log.info("setting up TrigConfigSvc:") svc = SetupTrigConfigSvc() svc.hltXmlFile = 'pureSteering_menu.xml' svc.l1XmlFile = 'l1.xml' try: svc.SetStates( 'xml' ) except: log.warning( 'failed to set state of TrigConfigSvc ...') try: svc.InitialiseSvc() except: log.warning( 'failed to activate TrigConfigSvc ...') ServiceMgr.TrigConfigSvc.OutputLevel=VERBOSE ServiceMgr.HLTConfigSvc.OutputLevel=VERBOSE ServiceMgr.LVL1ConfigSvc.OutputLevel=VERBOSE
#roifile=open("Lvl1Results.txt", "w") #for i in xrange(0,repeat): # roifile.write(RoIs) #roifile.write("\n") #roifile.close() #if "useBusyEventSetup" not in dir(): # useBusyEventSetup=False ### Setup TrigConfigSvc ### #################################### from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc log.info("setting up TrigConfigSvc:") svc = SetupTrigConfigSvc() svc.hltXmlFile = 'hlttest.xml' svc.l1topoXmlFile = 'TopoTestMenu.xml' svc.l1XmlFile = 'l1test.xml' try: svc.SetStates('xml') except: log.warning('failed to set state of TrigConfigSvc ...') try: svc.InitialiseSvc() except: log.warning('failed to activate TrigConfigSvc ...') ServiceMgr.TrigConfigSvc.OutputLevel = VERBOSE ServiceMgr.HLTConfigSvc.OutputLevel = VERBOSE ServiceMgr.LVL1ConfigSvc.OutputLevel = VERBOSE
from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc log.info('Creating the trigger configuration service wrapper') svc = SetupTrigConfigSvc() if TriggerFlags.readL1TopoConfigFromXML(): svc.l1topoXmlFile = TriggerFlags.inputL1TopoConfigFile() # given XML else: svc.l1topoXmlFile = TriggerFlags.outputL1TopoConfigFile( ) # generated in python if TriggerFlags.readLVL1configFromXML(): svc.l1XmlFile = TriggerFlags.inputLVL1configFile() # given XML else: svc.l1XmlFile = TriggerFlags.outputLVL1configFile() # generated in python if TriggerFlags.readHLTconfigFromXML(): svc.hltXmlFile = TriggerFlags.inputHLTconfigFile() # given XML else: svc.hltXmlFile = TriggerFlags.outputHLTconfigFile() # generated in python try: svc.SetStates(["xml"]) except Exception as ex: log.error('failed to set state of TrigConfigSvc, %s', str(ex)) try: svc.InitialiseSvc() except Exception as ex: log.error('failed to activate TrigConfigSvc, %s', str(ex)) # Enable PSK/LB monitoring if 'doMonitoring' in svcMgr.HLTConfigSvc.getProperties():
####################### ### MENUS AND STUFF ### ####################### from TriggerMenuPython.GenerateMenu import GenerateMenu GenerateMenu().generate() from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc _svc = SetupTrigConfigSvc() _svc.l1XmlFile = TriggerFlags.inputLVL1configFile() if TriggerFlags.readLVL1configFromXML() \ else TriggerFlags.outputLVL1configFile() _svc.hltXmlFile = TriggerFlags.inputHLTconfigFile() if TriggerFlags.readHLTconfigFromXML() \ else TriggerFlags.outputHLTconfigFile() try: _svc.SetStates(["xml"]) except: log.error('Failed to set state of TrigConfigSvc to ["xml"]') else: log.info('State of TrigConfigSvc set to ["xml"]') try: _svc.InitialiseSvc() except Exception, ex: log.error('Failed to activate TrigConfigSvc: %r' % ex) _sl = dict([(svc, getattr(svcMgr, svc)) for svc in ['LVL1ConfigSvc', 'HLTConfigSvc']
menu.addHLTChain(chain) chain = HLTChain('SingleMC_Jet', '6', 'DummyL2_Jet', 'EF') chain.addHLTSignature( 'EFInDet_Jet' ) chain.addTriggerTypeBit(34) chain.addStreamTag('jets') menu.addHLTChain(chain) menu.writeConfigFiles() ### Setup TrigConfigSvc ### #################################### from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc log.info("setting up TrigConfigSvc:") svc = SetupTrigConfigSvc() svc.hltXmlFile = 'newMenu.xml' svc.l1XmlFile = 'lvl1Menu.xml' try: svc.SetStates( 'xml' ) except: log.warning( 'failed to set state of TrigConfigSvc ...') try: svc.InitialiseSvc() except: log.warning( 'failed to activate TrigConfigSvc ...') ServiceMgr.TrigConfigSvc.OutputLevel=VERBOSE ServiceMgr.HLTConfigSvc.OutputLevel=VERBOSE ServiceMgr.LVL1ConfigSvc.OutputLevel=VERBOSE