diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py index 19d6f7067f88ca1038fae1671f7e32e5e51ada41..cd241f6d90bc3974226356e22b29aeb334553777 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py @@ -414,11 +414,6 @@ def triggerPOOLOutputCfg(flags, decObj, decObjHypoOut, edmSet): menuwriter = TrigConf__xAODMenuWriterMT() menuwriter.IsHLTJSONConfig = True menuwriter.IsL1JSONConfig = True - from .TriggerFlags import TriggerFlags - if TriggerFlags.triggerMenuSetup != 'LS2_v1': - menuwriter.IsL1JSONConfig = False - log = logging.getLogger( "triggerPOOLOutputCfg" ) - log.warn("Menu other than LS2_v1 (%s), will continue to take the L1 menu from XML rather than JSON. See ATR-20873", TriggerFlags.triggerMenuSetup) acc.addEventAlgo( menuwriter ) return acc diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigGetter.py index bd352f494e28386b77a8e012c8bf4e1306c8a43f..335b08a20af4400567ae81157e9e12f3684c7ff4 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigGetter.py @@ -243,15 +243,20 @@ class TriggerConfigGetter(Configured): EDMDecodingVersion() # In most use cases this needs to be called much earlier than in HLTTriggerResultGetter if TriggerFlags.EDMDecodingVersion() >= 3: - # Run-3 Trigger Configuration Services - from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc, getHLTConfigSvc - svcMgr += getL1ConfigSvc() - svcMgr += getHLTConfigSvc() - - # Needed for TrigConf::xAODMenuWriterMT - from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvc - svcMgr += TrigConfigSvc("TrigConfigSvc") - svcMgr.TrigConfigSvc.PriorityList = ["none", "ds", "xml"] + if self.hasxAODMeta: + if not hasattr(svcMgr, 'xAODConfigSvc'): + from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc + svcMgr += TrigConf__xAODConfigSvc('xAODConfigSvc') + else: # Does not have xAODMeta + # Run-3 Trigger Configuration Services + from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc, getHLTConfigSvc + svcMgr += getL1ConfigSvc() + svcMgr += getHLTConfigSvc() + + # Needed for TrigConf::xAODMenuWriterMT + from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvc + svcMgr += TrigConfigSvc("TrigConfigSvc") + svcMgr.TrigConfigSvc.PriorityList = ["none", "ds", "xml"] else: # non-MT (Run-2) Trigger Configuration @@ -450,10 +455,6 @@ class TriggerConfigGetter(Configured): menuwriter = TrigConf__xAODMenuWriterMT() menuwriter.IsHLTJSONConfig = True menuwriter.IsL1JSONConfig = True - - if TriggerFlags.triggerMenuSetup != 'LS2_v1': - menuwriter.IsL1JSONConfig = False - log.warn("Menu other than LS2_v1 (%s), will continue to take the L1 menu from XML rather than JSON. See ATR-20873", TriggerFlags.triggerMenuSetup) topAlgs += menuwriter # The metadata objects to add to the output: