Commit 4b7d4a39 authored by Rafal Bielski's avatar Rafal Bielski
Browse files

Clean up Trigger configuration from incorrect assumptions of recAlgs.doTrigger

parent e4ff1288
......@@ -13,7 +13,9 @@ def setMinimalCaloSetup() :
svcMgr.TrigCaloDataAccessSvc.OutputLevel=ERROR
if not hasattr(svcMgr,'RegSelSvcDefault'):
from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
svcMgr += RegSelSvcDefault()
regsel = RegSelSvcDefault()
regsel.enableCalo = True
svcMgr += regsel
......
......@@ -63,7 +63,9 @@ def HLTCaloMonitoringTool():
from AthenaCommon.AppMgr import ServiceMgr
if not hasattr(ServiceMgr,"RegSelSvcDefault"):
from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
ServiceMgr += RegSelSvcDefault()
regsel = RegSelSvcDefault()
regsel.enableCalo = True
ServiceMgr += regsel
#HLTFullCalo = HLTCaloTool(name = 'HLTFullCalo',
# histoPathBase = "/Trigger/HLT")
......
......@@ -145,7 +145,9 @@ class HLTSimulationGetter(Configured):
log.info("Loading RegionSelector")
from AthenaCommon.AppMgr import ServiceMgr
from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
ServiceMgr += RegSelSvcDefault()
regsel = RegSelSvcDefault()
regsel.enableCalo = TriggerFlags.doCalo()
ServiceMgr += regsel
# Configure the Data Preparation for Calo
if TriggerFlags.doCalo():
......
......@@ -8,7 +8,6 @@ from AthenaCommon.GlobalFlags import globalflags
from AthenaCommon.AppMgr import ServiceMgr
from RecExConfig.Configured import Configured
from RecExConfig.RecAlgsFlags import recAlgs
from RecExConfig.RecFlags import rec
from TrigRoiConversion.TrigRoiConversionConf import RoiWriter
......@@ -305,11 +304,10 @@ class HLTTriggerResultGetter(Configured):
xaodcnvrt = xAODConversionGetter()
xAODContainers = xaodcnvrt.xaodlist
if recAlgs.doTrigger() or TriggerFlags.doTriggerConfigOnly():
if ConfigFlags.Trigger.EDMVersion <= 2:
tdt = TrigDecisionGetterRun2() # noqa: F841
else:
tdt = TrigDecisionGetter() # noqa: F841
if ConfigFlags.Trigger.EDMVersion <= 2 and (rec.doTrigger() or TriggerFlags.doTriggerConfigOnly()):
tdt = TrigDecisionGetterRun2() # noqa: F841
elif ConfigFlags.Trigger.EDMVersion >= 3 and TriggerFlags.readBS():
tdt = TrigDecisionGetter() # noqa: F841
# Temporary hack to add Run-3 navigation to ESD and AOD
if (rec.doESD() or rec.doAOD()) and ConfigFlags.Trigger.EDMVersion == 3:
......
......@@ -8,7 +8,6 @@ from AthenaCommon.Include import include # to include old style job options
from AthenaCommon.AppMgr import theApp
from RecExConfig.RecFlags import rec
from RecExConfig.RecAlgsFlags import recAlgs
from RecExConfig.Configured import Configured
......@@ -41,7 +40,7 @@ class Lvl1ResultBuilderGetter(Configured):
topSequence = AlgSequence()
if recAlgs.doTrigger():
if rec.doTrigger():
if (rec.doESD() or rec.doAOD()) and (not(rec.readAOD() or \
rec.readESD())):
if jobproperties.Global.InputFormat() == 'bytestream':
......
......@@ -15,6 +15,11 @@ from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
from AthenaCommon.AppMgr import ServiceMgr, ToolSvc
from AthenaCommon.Include import include
assertMsg = 'This file is meant for Trigger configuration in RAWtoESD/RAWtoALL data reconstruction.'
assert rec.doTrigger(), assertMsg + ' Since rec.doTrigger is disabled, this file should not be included.'
assert not recAlgs.doTrigger(), assertMsg + \
' Trigger selection should not run in offline reconstruction, so recAlgs.doTrigger should be False'
# First check is HLT psk is ok, if not, turn trigger off.
if tf.configForStartup() != 'HLToffline':
include( "TriggerJobOpts/TriggerConfigCheckHLTpsk.py" )
......@@ -130,14 +135,13 @@ if rec.doTrigger():
getattr(ToolSvc, toolName).LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
#---------------------------------------------------------------------------
if recAlgs.doTrigger():
try:
from TriggerJobOpts.T0TriggerGetter import T0TriggerGetter
triggerGetter = T0TriggerGetter()
except Exception:
from AthenaCommon.Resilience import treatException
treatException("Could not import TriggerJobOpts.TriggerGetter . Switched off !" )
recAlgs.doTrigger=False
elif rec.doWriteBS():
try:
from TriggerJobOpts.T0TriggerGetter import T0TriggerGetter
triggerGetter = T0TriggerGetter()
except Exception:
from AthenaCommon.Resilience import treatException
treatException("Could not import TriggerJobOpts.TriggerGetter . Switched off !" )
recAlgs.doTrigger=False
if rec.doWriteBS():
include( "ByteStreamCnvSvc/RDP_ByteStream_jobOptions.py" )
## end of configure the HLT config
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment