From 4a91df01157bf661d1b7bb5aab976b66e6016b35 Mon Sep 17 00:00:00 2001 From: Oleg Kuprash <oleg.kuprash@cern.ch> Date: Thu, 5 Nov 2020 12:48:26 +0100 Subject: [PATCH] Move HLTTriggerGetter for MT ESDtoAOD step to the place where DataSource is properly configured --- .../RecExCommon/share/RecExCommon_topOptions.py | 17 +++++++++++++++++ .../share/skeleton.ESDtoAOD_tf.py | 14 ++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index fb953b93aec..d9be5e48cc7 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -568,6 +568,23 @@ if rec.doTrigger: treatException("Could not import TriggerJobOpts.TriggerGetter . Switched off !" ) recAlgs.doTrigger=False +#MT part +## Outputs +if rec.readESD() and rec.doAOD(): + # Don't run any trigger - only pass the HLT contents from ESD to AOD + if TriggerFlags.doMT(): + # Add HLT output + from TriggerJobOpts.HLTTriggerResultGetter import HLTTriggerResultGetter + hltOutput = HLTTriggerResultGetter() + # Add Trigger menu metadata + if rec.doFileMetaData(): + from RecExConfig.ObjKeyStore import objKeyStore + metadataItems = [ "xAOD::TriggerMenuContainer#TriggerMenu", + "xAOD::TriggerMenuAuxContainer#TriggerMenuAux." ] + objKeyStore.addManyTypesMetaData( metadataItems ) + else: # not TriggerFlags.doMT() + pass # See TriggerJobOpts/python/TriggerGetter.py for Run 2. Called by RecExCommon + AODFix_postTrigger() if globalflags.DataSource()=='geant4': diff --git a/Reconstruction/RecJobTransforms/share/skeleton.ESDtoAOD_tf.py b/Reconstruction/RecJobTransforms/share/skeleton.ESDtoAOD_tf.py index 9603a7832b7..0fe8679097e 100644 --- a/Reconstruction/RecJobTransforms/share/skeleton.ESDtoAOD_tf.py +++ b/Reconstruction/RecJobTransforms/share/skeleton.ESDtoAOD_tf.py @@ -58,20 +58,14 @@ if hasattr(runArgs,"outputAODFile"): if DQMonFlags.useTrigger() and rec.doTrigger(): DQMonFlags.useTrigger.set_Value_and_Lock(True) # Don't run any trigger - only pass the HLT contents from ESD to AOD + # Configure here, and extract HLT content in RecExCommon_topOptions + # after the rest of the job is configured from RecExConfig.RecAlgsFlags import recAlgs recAlgs.doTrigger.set_Value_and_Lock( False ) rec.doTrigger.set_Value_and_Lock( False ) - # Add HLT output - from TriggerJobOpts.HLTTriggerResultGetter import HLTTriggerResultGetter - hltOutput = HLTTriggerResultGetter() - # Add Trigger menu metadata - if rec.doFileMetaData(): - from RecExConfig.ObjKeyStore import objKeyStore - metadataItems = [ "xAOD::TriggerMenuContainer#TriggerMenu", - "xAOD::TriggerMenuAuxContainer#TriggerMenuAux." ] - objKeyStore.addManyTypesMetaData( metadataItems ) else: # not TriggerFlags.doMT() - pass # See TriggerJobOpts/python/TriggerGetter.py for Run 2. Called by RecExCommon + pass + if hasattr(runArgs,"outputTAGFile"): # should be used as outputTAGFile_e2a=myTAG.root so that it does not trigger AODtoTAG -- GitLab