diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py index e28a698abda466118d97c41e35a7e9b25341036f..c0c3a880fe0bd4a6c9a8062829092e034b3ebbf9 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py @@ -156,48 +156,6 @@ class HLTSimulationGetter(Configured): from TrigFTKSim.TrigFTKSimConf import FTKMergerAlgo FTKMerger = FTKMergerAlgo( "FTKMergerAlgo" , OutputLevel=INFO) 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.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.doHLT(): log.info("configuring HLT Steering") @@ -208,13 +166,18 @@ class HLTSimulationGetter(Configured): 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 + + # this ROIB converter should only be scheduled if + # - we run on data + # - L1Calo simulation has not been scheduled + # - and ROIB converter has not been scheduled yet before + if globalflags.DataSource()=='data' \ + and not hasattr( topSequence, 'CPCMX' ) \ + and not hasattr( topSequence, 'RoiB2TopoInputDataCnv' ): + log.info("Setting up RoiB2TopoInputDataCnv") + from L1TopoSimulation.L1TopoSimulationConfig import RoiB2TopoInputDataCnv + roib2Topo = RoiB2TopoInputDataCnv() + 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()) @@ -223,7 +186,6 @@ class HLTSimulationGetter(Configured): if not TriggerFlags.doFEX() and TriggerFlags.doHypo(): log.info("configuring merged HLT for re-running (Hypo only)") 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 = True # always needs to run if the HLT is simulated diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py index b1981cc832bba80a3201bfc2234cc4d7bb284157..2024cea30e9e3ac0bd09848596701e2e9b59a965 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py @@ -167,13 +167,25 @@ class ByteStreamUnpackGetter(Configured): extr.EFResultKey="" else: extr.HLTResultKey="" - + + # + # Configure DataScouting + # + from RecExConfig.InputFilePeeker import inputFileSummary + if inputFileSummary['bs_metadata']['Stream'].startswith('calibration_DataScouting_') or TriggerFlags.doAlwaysUnpackDSResult(): + for stag in inputFileSummary['stream_tags']: + if (stag['stream_type'] == 'calibration') and (stag['stream_name'].startswith('DataScouting_')): + ds_tag = stag['stream_name'][0:15] + ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "HLT::HLTResult/"+ds_tag ] + extr.DSResultKeys += [ ds_tag ] + else: #if data doesn't have HLT info set HLTResult keys as empty strings to avoid warnings # but the extr alg must run extr.L2ResultKey="" extr.EFResultKey="" extr.HLTResultKey="" + extr.DSResultKeys=[] topSequence += extr @@ -256,15 +268,15 @@ class HLTTriggerResultGetter(Configured): log.debug("the stream found in 'bs_metadata' is "+stream) if "express" in stream: from TrigEDMConfig.TriggerEDM import getTypeAndKey,EDMDetails - type,key=getTypeAndKey("TrigOperationalInfo#HLT_EXPRESS_OPI_EF") + type,key=getTypeAndKey("TrigOperationalInfo#HLT_EXPRESS_OPI_HLT") if EDMDetails[type].has_key('collection'): colltype = EDMDetails[type]['collection'] - log.info("Adding HLT_EXPRESS_OPI_EF to ESD for stream "+stream) + log.info("Adding HLT_EXPRESS_OPI_HLT to ESD for stream "+stream) from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addStreamESD(colltype, key) return True else: - log.warning("Could not determine stream of bytestream file, not adding HLT_EXPRESS_OPI_EF to ESD.") + log.warning("Could not determine stream of bytestream file, not adding HLT_EXPRESS_OPI_HLT to ESD.") return False def configure(self): @@ -322,7 +334,7 @@ class HLTTriggerResultGetter(Configured): #Are we adding operational info objects in ESD? added=self._AddOPIToESD() if added: - log.debug("Operational Info object HLT_EXPRESS_OPI_EF with extra information about express stream prescaling added to the data.") + log.debug("Operational Info object HLT_EXPRESS_OPI_HLT with extra information about express stream prescaling added to the data.") diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py index 0b6639e05bb71633657f7290918c0fb7fb84f957..cc9a530714c69a6df57af83d083a44e7b3936686 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py @@ -57,6 +57,9 @@ class Lvl1SimulationGetter (Configured): from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() + + + print "JOERG in Lvl1SimulationGetter : ", TriggerFlags.fakeLVL1() , TriggerFlags.doLVL1() if (not TriggerFlags.fakeLVL1()) and TriggerFlags.doLVL1(): @@ -135,6 +138,7 @@ class Lvl1SimulationGetter (Configured): topSequence += alg if TriggerFlags.doLucid(): + print "JOERG setting up LUCID" from TrigT1Lucid.TrigT1LucidConf import LVL1__TrigT1Lucid alg = LVL1__TrigT1Lucid() @@ -149,6 +153,7 @@ class Lvl1SimulationGetter (Configured): else: log.warning("%s input (%s) missing, not adding to the topSequence" % (alg.getName(), sgKey)) TriggerFlags.doLucid.set_Value(False) + print "JOERG ",topSequence if TriggerFlags.doL1Topo(): diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py index e3a48d4b1136f0fb1708a057be2b393b2901d1fd..6d3e178786397a47f0e2d4c10d7ca2bc264129a4 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py @@ -171,6 +171,14 @@ class doMergedHLTResult(JobProperty): _flags.append(doMergedHLTResult) +class doAlwaysUnpackDSResult(JobProperty): + """ if False disable decoding of DS results for all files but for real DS files """ + statusOn=True + allowedType=['bool'] + StoredValue=True + +_flags.append(doAlwaysUnpackDSResult) + class EDMDecodingVersion(JobProperty): """ if 1, Run1 decoding version is set; if 2, Run2 """ statusOn=True @@ -845,7 +853,16 @@ class outputL1TopoConfigFile(JobProperty): def __call__(self): if self.get_Value() == "": - return "L1Topoconfig_"+TriggerFlags.triggerMenuSetup()+"_" + TriggerFlags.menuVersion() + ".xml" + # triggerMenuSetup contains the prescale mode in many + # cases, e.g. MC_pp_v5_tight_mc_prescale. Prescaling is + # not available for L1Topo, therefore that part is being + # removed. + import re + menuSetup = TriggerFlags.triggerMenuSetup() + m = re.match('(.*v\d).*', menuSetup) + if m: + menuSetup = m.groups()[0] + return "L1Topoconfig_" + menuSetup + "_" + TriggerFlags.menuVersion() + ".xml" else: return self.get_Value() @@ -1031,11 +1048,12 @@ 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', + 'Physics_pp_v5_cosmics_prescale', + 'Physics_pp_v5_tight_physics_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 - 'MC_HI_v3', + 'MC_HI_v3', 'MC_HI_v3_tight_mc_prescale', ] _default_menu='MC_pp_v5_tight_mc_prescale' @@ -1108,6 +1126,7 @@ class L1PrescaleSet(JobProperty): 'L1Prescales100_MC_HI_v1','L1PrescalesNone_MC_HI_v1', 'L1Prescales100_Physics_HI_v2','L1PrescalesNone_Physics_HI_v2', 'L1Prescales100_MC_HI_v2','L1PrescalesNone_MC_HI_v2', + 'tight_physics_prescale', ] StoredValue = '' _flags.append(L1PrescaleSet) @@ -1155,6 +1174,7 @@ class HLTPrescaleSet(JobProperty): 'HLTPrescales100_MC_HI_v1','HLTPrescalesNone_MC_HI_v1', 'HLTPrescales100_Physics_HI_v2','HLTPrescalesNone_Physics_HI_v2', 'HLTPrescales100_MC_HI_v2','HLTPrescalesNone_MC_HI_v2', + 'tight_physics_prescale', ] StoredValue = '' _flags.append(HLTPrescaleSet)