diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py index 87c78481b9b5023bf5cbc1e88f2554c886cf789b..fb60b7ab553ebf3305932e0db7158aee3980639d 100755 --- a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py +++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py @@ -120,14 +120,15 @@ if data_type == 'pool': from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter cfg = TriggerConfigGetter() - from AthenaCommon.Configurable import Configurable - from AthenaConfiguration.ComponentAccumulator import appendCAtoAthena - from AthenaConfiguration.AllConfigFlags import ConfigFlags - Configurable.configurableRun3Behavior += 1 - from TrigDecisionTool.TrigDecisionToolConfig import getTrigDecisionTool - acc = getTrigDecisionTool(ConfigFlags) - appendCAtoAthena( acc ) - Configurable.configurableRun3Behavior -= 1 + if not hasattr(ToolSvc, 'TrigDecisionTool'): + from AthenaCommon.Configurable import Configurable + from AthenaConfiguration.ComponentAccumulator import appendCAtoAthena + from AthenaConfiguration.AllConfigFlags import ConfigFlags + Configurable.configurableRun3Behavior += 1 + from TrigDecisionTool.TrigDecisionToolConfig import getTrigDecisionTool + acc = getTrigDecisionTool(ConfigFlags) + appendCAtoAthena( acc ) + Configurable.configurableRun3Behavior -= 1 # enable slices for monitoring # otherwise enable slices via monFlags diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py index a6c9539d9bd9341ce23f2d89c5d11e8d9cb4b49f..ce3b56eb894a9c081e82b14ca20f9d411e7e9a70 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/T0TriggerGetter.py @@ -29,14 +29,16 @@ class T0TriggerGetter(Configured): cfg = TriggerConfigGetter() # noqa: F841 # preconfigure TrigDecisionTool - from AthenaCommon.Configurable import Configurable - from AthenaConfiguration.ComponentAccumulator import appendCAtoAthena - from AthenaConfiguration.AllConfigFlags import ConfigFlags - Configurable.configurableRun3Behavior += 1 - from TrigDecisionTool.TrigDecisionToolConfig import getTrigDecisionTool - acc = getTrigDecisionTool(ConfigFlags) - appendCAtoAthena( acc ) - Configurable.configurableRun3Behavior -= 1 + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc, 'TrigDecisionTool'): + from AthenaCommon.Configurable import Configurable + from AthenaConfiguration.ComponentAccumulator import appendCAtoAthena + from AthenaConfiguration.AllConfigFlags import ConfigFlags + Configurable.configurableRun3Behavior += 1 + from TrigDecisionTool.TrigDecisionToolConfig import getTrigDecisionTool + acc = getTrigDecisionTool(ConfigFlags) + appendCAtoAthena( acc ) + Configurable.configurableRun3Behavior -= 1 if withLVL1():