diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py index 4fe9e2f7318d260f95ea3f016abd53b4cbee880f..e28a698abda466118d97c41e35a7e9b25341036f 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py @@ -66,16 +66,16 @@ def monitoringTools(steering): return False return True - try: - Set = set - except NameError: - from sets import Set - setOfEnabled = Set(TriggerFlags.enableMonitoring()) # this is set of enabled monitoring targets + #try: + # Set = set + #except NameError: + # from sets import Set + setOfEnabled = set(TriggerFlags.enableMonitoring()) # this is set of enabled monitoring targets log.info("requested targets: "+str(setOfEnabled)+" pruning other tools") # prune subalgorithms for alg in steering.getChildren(): - tokeep = [ x for x in alg.AthenaMonTools if len(Set(x.target()) & setOfEnabled) != 0 ] + tokeep = [ x for x in alg.AthenaMonTools if len(set(x.target()) & setOfEnabled) != 0 ] log.debug( "will keep "+str( [ x.getFullName() for x in tokeep ]) ) toscratch = list(set(alg.AthenaMonTools)-set(tokeep)) log.debug( "will scratch "+str( [ x.getFullName() for x in toscratch ]) ) @@ -139,7 +139,7 @@ class HLTSimulationGetter(Configured): from RecExConfig.ObjKeyStore import objKeyStore if ( not objKeyStore.isInInput( "xAOD::EventInfo_v1") ) and ( not hasattr( topSequence, "xAODMaker::EventInfoCnvAlg" ) ): from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg - topSequence+=xAODMaker__EventInfoCnvAlg() + topSequence += xAODMaker__EventInfoCnvAlg() log.info("Loading RegionSelector") @@ -155,57 +155,67 @@ class HLTSimulationGetter(Configured): # FTK algorithm inclusions from TrigFTKSim.TrigFTKSimConf import FTKMergerAlgo FTKMerger = FTKMergerAlgo( "FTKMergerAlgo" , OutputLevel=INFO) - topSequence+= FTKMerger + topSequence += FTKMerger - if TriggerFlags.doLVL2(): - log.info("configuring LVL2") - from TrigSteering.TrigSteeringConfig import TrigSteer_L2, ReruningTrigSteer_L2 - if TriggerFlags.doFEX(): - log.info("configuring LVL2 for normal running (FEX + Hypo)") - TrigSteer_L2 = TrigSteer_L2('TrigSteer_L2', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) - TrigSteer_L2.doHypo = TriggerFlags.doHypo() - - if not TriggerFlags.doFEX() and TriggerFlags.doHypo(): - log.info("configuring LVL2 for re-running (Hypo only)") - TrigSteer_L2 = ReruningTrigSteer_L2('TrigSteer_L2', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) - - # if not TriggerFlags.writeBS(): - from TrigEDMConfig.TriggerEDM import getL2PreregistrationList, getEDMLibraries - TrigSteer_L2.Navigation.ClassesToPreregister = getL2PreregistrationList() - - TrigSteer_L2.Navigation.Dlls = getEDMLibraries() - - monitoringTools(TrigSteer_L2) - topSequence += TrigSteer_L2 + ## if TriggerFlags.doLVL2(): + ## log.info("configuring LVL2") + ## from TrigSteering.TrigSteeringConfig import TrigSteer_L2, ReruningTrigSteer_L2 + ## if TriggerFlags.doFEX(): + ## log.info("configuring LVL2 for normal running (FEX + Hypo)") + ## TrigSteer_L2 = TrigSteer_L2('TrigSteer_L2', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) + ## TrigSteer_L2.doHypo = TriggerFlags.doHypo() + ## + ## if not TriggerFlags.doFEX() and TriggerFlags.doHypo(): + ## log.info("configuring LVL2 for re-running (Hypo only)") + ## TrigSteer_L2 = ReruningTrigSteer_L2('TrigSteer_L2', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) + ## + ## # if not TriggerFlags.writeBS(): + ## from TrigEDMConfig.TriggerEDM import getL2PreregistrationList, getEDMLibraries + ## TrigSteer_L2.Navigation.ClassesToPreregister = getL2PreregistrationList() + ## + ## TrigSteer_L2.Navigation.Dlls = getEDMLibraries() + ## + ## monitoringTools(TrigSteer_L2) + ## topSequence += TrigSteer_L2 - if TriggerFlags.doEF(): - log.info("configuring EF") - from TrigSteering.TrigSteeringConfig import TrigSteer_EF,ReruningAfterL2TrigSteer_EF - if TriggerFlags.doFEX(): - TrigSteer_EF = TrigSteer_EF('TrigSteer_EF', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) - TrigSteer_EF.doHypo = TriggerFlags.doHypo() - - if not TriggerFlags.doFEX() and TriggerFlags.doHypo(): - TrigSteer_EF = ReruningAfterL2TrigSteer_EF('TrigSteer_EF', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) - - # if not TriggerFlags.writeBS(): - from TrigEDMConfig.TriggerEDM import getEFPreregistrationList, getEDMLibraries - TrigSteer_EF.Navigation.ClassesToPreregister = getEFPreregistrationList() - - TrigSteer_EF.Navigation.Dlls = getEDMLibraries() - - monitoringTools(TrigSteer_EF) - topSequence += TrigSteer_EF + ## if TriggerFlags.doEF(): + ## log.info("configuring EF") + ## from TrigSteering.TrigSteeringConfig import TrigSteer_EF,ReruningAfterL2TrigSteer_EF + ## if TriggerFlags.doFEX(): + ## TrigSteer_EF = TrigSteer_EF('TrigSteer_EF', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) + ## TrigSteer_EF.doHypo = TriggerFlags.doHypo() + ## + ## if not TriggerFlags.doFEX() and TriggerFlags.doHypo(): + ## TrigSteer_EF = ReruningAfterL2TrigSteer_EF('TrigSteer_EF', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) + ## + ## # if not TriggerFlags.writeBS(): + ## from TrigEDMConfig.TriggerEDM import getEFPreregistrationList, getEDMLibraries + ## TrigSteer_EF.Navigation.ClassesToPreregister = getEFPreregistrationList() + ## + ## TrigSteer_EF.Navigation.Dlls = getEDMLibraries() + ## + ## monitoringTools(TrigSteer_EF) + ## topSequence += TrigSteer_EF - ### merged system if TriggerFlags.doHLT(): - log.info("configuring merged HLT") - + log.info("configuring HLT Steering") + from TrigSteering.TrigSteeringConfig import TrigSteer_HLT, ReruningTrigSteer_HLT - #, ReruningAfterL2TrigSteer_EF if TriggerFlags.doFEX(): + from RecExConfig.RecFlags import rec + from AthenaCommon.GlobalFlags import globalflags + + # schedule the conversion of the L1Calo ROIB data to topo simulation input + if globalflags.DataSource()=='data': + if not hasattr( topSequence, 'RoiB2TopoInputDataCnv' ): + log.info("Setting up RoiB2TopoInputDataCnv") + from L1TopoSimulation.L1TopoSimulationConfig import RoiB2TopoInputDataCnv + roib2Topo = RoiB2TopoInputDataCnv() + roib2Topo.OutputLevel = DEBUG # getHLTOutputLevel() + topSequence += roib2Topo + log.info("configuring HLT merged system, for normal running (FEX + Hypo)") TrigSteer_HLT = TrigSteer_HLT('TrigSteer_HLT', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) TrigSteer_HLT.doHypo = TriggerFlags.doHypo() @@ -215,35 +225,35 @@ class HLTSimulationGetter(Configured): TrigSteer_HLT = ReruningTrigSteer_HLT('TrigSteer_HLT', hltFile=TriggerFlags.inputHLTconfigFile(), lvl1File=TriggerFlags.inputLVL1configFile()) # if not TriggerFlags.writeBS(): - TrigSteer_HLT.doL1TopoSimulation = TriggerFlags.doL1Topo() # this later needs to be extented to also run when we take data with L1Topo + # TrigSteer_HLT.doL1TopoSimulation = TriggerFlags.doL1Topo() # this later needs to be extented to also run when we take data with L1Topo + TrigSteer_HLT.doL1TopoSimulation = True # always needs to run if the HLT is simulated - from TrigEDMConfig.TriggerEDM import getHLTPreregistrationList, getEDMLibraries - TrigSteer_HLT.Navigation.ClassesToPreregister = getHLTPreregistrationList() + from TrigEDMConfig.TriggerEDM import getHLTPreregistrationList, getEDMLibraries + TrigSteer_HLT.Navigation.ClassesToPreregister = getHLTPreregistrationList() - TrigSteer_HLT.Navigation.Dlls = getEDMLibraries() + TrigSteer_HLT.Navigation.Dlls = getEDMLibraries() monitoringTools(TrigSteer_HLT) topSequence += TrigSteer_HLT - if TriggerFlags.writeBS(): + if TriggerFlags.writeBS(): # declare objects to go to BS (from the lists above) - if TriggerFlags.doLVL2(): - from TrigEDMConfig.TriggerEDM import getL2BSList - TrigSteer_L2.Navigation.ClassesToPayload = getL2BSList() - TrigSteer_L2.Navigation.ClassesToPreregister = [] - - if TriggerFlags.doEF(): - from TrigEDMConfig.TriggerEDM import getEFBSList - TrigSteer_EF.Navigation.ClassesToPayload = getEFBSList() - TrigSteer_EF.Navigation.ClassesToPreregister = [] - try: - from TrigEDMConfig.TriggerEDM import getEFDSList - TrigSteer_EF.Navigation.ClassesToPayload_DSonly = getEFDSList() - except ImportError: - log.warning("DataScouting not available in this release") + ## if TriggerFlags.doLVL2(): + ## from TrigEDMConfig.TriggerEDM import getL2BSList + ## TrigSteer_L2.Navigation.ClassesToPayload = getL2BSList() + ## TrigSteer_L2.Navigation.ClassesToPreregister = [] + ## + ## if TriggerFlags.doEF(): + ## from TrigEDMConfig.TriggerEDM import getEFBSList + ## TrigSteer_EF.Navigation.ClassesToPayload = getEFBSList() + ## TrigSteer_EF.Navigation.ClassesToPreregister = [] + ## try: + ## from TrigEDMConfig.TriggerEDM import getEFDSList + ## TrigSteer_EF.Navigation.ClassesToPayload_DSonly = getEFDSList() + ## except ImportError: + ## log.warning("DataScouting not available in this release") - ### merged system if TriggerFlags.doHLT(): from TrigEDMConfig.TriggerEDM import getHLTBSList TrigSteer_HLT.Navigation.ClassesToPayload = getHLTBSList() @@ -268,14 +278,13 @@ class HLTSimulationGetter(Configured): ToolSvc += TrigSerializeConvHelper #do not activate T/P of EF classes at L2 - if TriggerFlags.doLVL2(): - from TrigEDMConfig.TriggerEDM import getL2BSTypeList - TrigSerToolTP.ActiveClasses = getL2BSTypeList() - if TriggerFlags.doEF(): - from TrigEDMConfig.TriggerEDM import getL2BSTypeList, getEFBSTypeList - TrigSerToolTP.ActiveClasses = getL2BSTypeList() + getEFBSTypeList() - - ### merged system + ## if TriggerFlags.doLVL2(): + ## from TrigEDMConfig.TriggerEDM import getL2BSTypeList + ## TrigSerToolTP.ActiveClasses = getL2BSTypeList() + ## if TriggerFlags.doEF(): + ## from TrigEDMConfig.TriggerEDM import getL2BSTypeList, getEFBSTypeList + ## TrigSerToolTP.ActiveClasses = getL2BSTypeList() + getEFBSTypeList() + if TriggerFlags.doHLT(): from TrigEDMConfig.TriggerEDM import getHLTBSTypeList TrigSerToolTP.ActiveClasses = getHLTBSTypeList() @@ -284,6 +293,7 @@ class HLTSimulationGetter(Configured): result = HLTTriggerResultGetter() return True + def postConfigure(self, menu): log = logging.getLogger("HLTTriggergetter.py") log.info("postConfigure: update steering configuration from the menu") diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py index 6df6a09b120a008204570a8049c7b2ccab8751cf..b1981cc832bba80a3201bfc2234cc4d7bb284157 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py @@ -275,6 +275,10 @@ class HLTTriggerResultGetter(Configured): # set EDMDecodingVersion EDMDecodingVersion() + # Set AODFULL for data unless it was set explicitly already + if TriggerFlags.AODEDMSet.isDefault() and globalflags.DataSource()=='data': + TriggerFlags.AODEDMSet = 'AODFULL' + from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() log.info("BS unpacking (TF.readBS): %d" % TriggerFlags.readBS() ) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py index 5248f90156d24ed20b6042f4404ead5673ec331e..0b6639e05bb71633657f7290918c0fb7fb84f957 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py @@ -154,7 +154,7 @@ class Lvl1SimulationGetter (Configured): if TriggerFlags.doL1Topo(): from L1TopoSimulation.L1TopoSimulationConfig import L1TopoSimulation topSequence += L1TopoSimulation() - + #topSequence.L1TopoSimulation.OutputLevel = DEBUG log.info("adding ctp simulation to the topSequence") diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerOnlineGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerOnlineGetter.py index f89a349a2f2983f987db4fa1c86615d4300b607d..492f023b91052a0bd783b968a31cfd85e61cd05b 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerOnlineGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerOnlineGetter.py @@ -31,6 +31,7 @@ class Lvl1SimulationGetter (Configured): _output = {"CTP_Decision":"CTP_Decision", "LVL1_ROI":"LVL1_ROI"} def configure(self): + log = logging.getLogger( "Lvl1TriggerOnlineGetter.py" ) from AthenaServices.AthenaServicesConf import AthenaOutputStream @@ -42,7 +43,7 @@ class Lvl1SimulationGetter (Configured): if not hasattr( ServiceMgr, 'LVL1ConfigSvc' ): from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc LVL1ConfigSvc = LVL1ConfigSvc("LVL1ConfigSvc") - LVL1ConfigSvc.XMLFile = TriggerFlags.inputLVL1configFile() + LVL1ConfigSvc.XMLMenuFile = TriggerFlags.inputLVL1configFile() ServiceMgr += LVL1ConfigSvc else: log.info( "LVL1ConfigSvc already created. Will ignore configuration from xml file="+TriggerFlags.inputLVL1configFile()\ @@ -56,7 +57,13 @@ class Lvl1SimulationGetter (Configured): topSequence += LVL1__TrigT1MBTS() topSequence += L1Muctpi() - + + if TriggerFlags.doL1Topo(): + log.info("adding l1topo simulation to the topSequence") + from L1TopoSimulation.L1TopoSimulationConfig import L1TopoSimulation + topSequence += L1TopoSimulation() + topSequence.L1TopoSimulation.OutputLevel = DEBUG + log.info("adding ctp simulation to the topSequence") topSequence += CTPSimulation("CTPSimulation") diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py index 589b7854a0d7c3ded148ad05751fde780da11c22..84741f62fab59ea54ebd668be3207477213d3697 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py @@ -45,9 +45,6 @@ class T0TriggerGetter(Configured): return True self._done=True - # make sure we write the full AOD EDM - TriggerFlags.AODEDMSet = "AODFULL" - # setup configuration services from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter cfg = TriggerConfigGetter() diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py index fafe7594e0200d3ec5088e47168e6fa742a54e83..e3a48d4b1136f0fb1708a057be2b393b2901d1fd 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py @@ -156,7 +156,7 @@ class doHLT(JobProperty): TriggerFlags.doLVL2.lock() else: TriggerFlags.doLVL2.set_Off() - log = logging.getLogger( 'TriggerJobOpts.TriggerFlags' ) + log = logging.getLogger( 'TriggerFlags.doHLT' ) log.info("doHLT is True: force doLVL2=False and doEF=False" ) @@ -425,7 +425,7 @@ class triggerUseFrontier(JobProperty): allowedType=['bool'] StoredValue = False def _do_action(self): - log = logging.getLogger( 'TriggerJobOpts.TriggerFlags' ) + log = logging.getLogger( 'TriggerFlags.triggerUseFrontier' ) log.info("Setting TriggerFlags.triggerUseFrontier to %r" % self.get_Value()) _flags.append(triggerUseFrontier) @@ -483,7 +483,7 @@ class triggerConfig(JobProperty): """ setup some consistency """ from TriggerJobOpts.TriggerFlags import TriggerFlags as tf - log = logging.getLogger( 'TriggerJobOpts.TriggerFlags' ) + log = logging.getLogger( 'TriggerFlags.triggerConfig' ) log.info("triggerConfig: \""+self.get_Value()+"\"") # We split the string passed to the flag configs = self.get_Value().split(":") @@ -619,8 +619,6 @@ class triggerConfig(JobProperty): log.info("triggerConfig: Setting tf.triggerMenuSetup to " + tf.triggerMenuSetup()) else: ### We read the menu from xml - tf.readLVL1configFromXML=True - tf.readHLTconfigFromXML=True if "L1CaloCalib" in configs[1]: if configs[1].split("=")[-1] == "True" or configs[1].split("=")[-1] == "true": log.info("Setting L1CaloCalib from TriggerConfig command to %s " % configs[1].split("=")[-1]) @@ -634,6 +632,9 @@ class triggerConfig(JobProperty): tf.triggerMenuSetup = 'default' else: tf.triggerMenuSetup = configs[-1] + + tf.readLVL1configFromXML=True + tf.readHLTconfigFromXML=True log.info("triggerConfig: MCRECO menu from xml (%s)" % tf.triggerMenuSetup()) # This part was there in the original (old) csc_reco_trigger.py snippet @@ -698,7 +699,7 @@ class readLVL1configFromXML(JobProperty): def _do_action(self): """ setup some consistency """ import os - log = logging.getLogger( 'TriggerJobOpts.TriggerFlags' ) + log = logging.getLogger( 'TriggerFlags.readLVL1configFromXML' ) import TriggerMenu.l1.Lvl1Flags @@ -736,7 +737,7 @@ class readHLTconfigFromXML(JobProperty): """ Disable all subcontainers defining slices ON/OFF flags """ import os - log = logging.getLogger( 'TriggerJobOpts.TriggerFlags' ) + log = logging.getLogger( 'TriggerFlags.readHLTconfigFromXML' ) ## loop over all properties in the container # from AthenaCommon.JobProperties import JobPropertyContainer @@ -755,13 +756,15 @@ class readHLTconfigFromXML(JobProperty): TriggerFlags.inputHLTconfigFile = TriggerFlags.outputHLTconfigFile() else: if TriggerFlags.inputHLTconfigFile != 'NONE': + TriggerFlags.inputHLTconfigFile = "HLTconfig_"+TriggerFlags.triggerMenuSetup()+"_" + TriggerFlags.menuVersion() + ".xml" nightlyPaths=os.environ['XMLPATH'].split(':') for p in nightlyPaths: #print p+"/TriggerMenuXML/HLTconfig_"+TriggerFlags.triggerMenuSetup()+"_" + TriggerFlags.menuVersion() + ".xml" - if os.path.exists(p+"/TriggerMenuXML/HLTconfig_"+TriggerFlags.triggerMenuSetup()+"_" + TriggerFlags.menuVersion() + ".xml") is True: - log.info("The HLT xml file is found in "+p+"/TriggerMenuXML/") + full_path_name = p+"/TriggerMenuXML/"+TriggerFlags.inputHLTconfigFile() + if os.path.exists(full_path_name) is True: + log.info("The HLT xml file is: "+full_path_name) success = True break else: @@ -1028,6 +1031,7 @@ class triggerMenuSetup(JobProperty): # Run 2 'MC_pp_v5', 'MC_pp_v5_no_prescale', 'MC_pp_v5_tight_mc_prescale', 'MC_pp_v5_loose_mc_prescale','MC_pp_v5_special_mc_prescale', # for development and simulation 'Physics_pp_v5', # for testing algorithms and software quality during LS1, later for data taking + 'Physics_pp_v5_cosmics_prescale', 'LS1_v1', # for P1 detector commissioning (cosmics, streamers) 'DC14', 'DC14_no_prescale', 'DC14_tight_mc_prescale', 'DC14_loose_mc_prescale', # for DC14 'Physics_HI_v3', 'Physics_HI_v3_no_prescale', # for 2015 lead-lead menu @@ -1035,7 +1039,7 @@ class triggerMenuSetup(JobProperty): ] _default_menu='MC_pp_v5_tight_mc_prescale' - _default_cosmic_menu='Physics_pp_v4_cosmics_prescale' + _default_cosmic_menu='Physics_pp_v5_cosmics_prescale' _default_InitialBeam_menu='MC_InitialBeam_v3_no_prescale' StoredValue = _default_menu