Skip to content
Snippets Groups Projects
Commit 72d9c363 authored by Peter Onyisi's avatar Peter Onyisi Committed by Vakhtang Tsulaia
Browse files

Correctly load ROOT backend for LWHists (fix CI)

parent f5f7732c
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ if DQMonFlags.doMonitoring():
from LumiBlockComps.TrigLiveFractionCondAlgDefault import TrigLiveFractionCondAlgDefault
TrigLiveFractionCondAlgDefault()
def doOldStylePostSetup():
def doOldStylePostSetup(addlSequences=[]):
#------------------------#
# Trigger chain steering #
#------------------------#
......@@ -59,22 +59,25 @@ if DQMonFlags.doMonitoring():
# now the DQ tools are private, extract them from the set of monitoring algorithms
toolset = set()
from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
for _ in topSequence:
if isinstance(_, AthenaMonManager):
toolset.update(_.AthenaMonTools)
# in MT the initialization can be in random order ... force all managers to have common setup
_.FileKey = DQMonFlags.monManFileKey()
_.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup()
_.DataType = DQMonFlags.monManDataType()
_.Environment = DQMonFlags.monManEnvironment()
_.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval()
_.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval()
_.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval()
_.ManualRunLBSetup = DQMonFlags.monManManualRunLBSetup()
_.Run = DQMonFlags.monManRun()
_.LumiBlock = DQMonFlags.monManLumiBlock()
_.ROOTBackend = (jobproperties.ConcurrencyFlags.NumThreads()>0)
local_logger.info(f'Configuring LWHist ROOT backend flag to {jobproperties.ConcurrencyFlags.NumThreads()>0} because NumThreads is {jobproperties.ConcurrencyFlags.NumThreads()}')
for sq in [topSequence] + addlSequences:
for _ in sq:
if isinstance(_, AthenaMonManager):
toolset.update(_.AthenaMonTools)
# in MT the initialization can be in random order ... force all managers to have common setup
_.FileKey = DQMonFlags.monManFileKey()
_.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup()
_.DataType = DQMonFlags.monManDataType()
_.Environment = DQMonFlags.monManEnvironment()
_.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval()
_.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval()
_.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval()
_.ManualRunLBSetup = DQMonFlags.monManManualRunLBSetup()
_.Run = DQMonFlags.monManRun()
_.LumiBlock = DQMonFlags.monManLumiBlock()
_.ROOTBackend = (jobproperties.ConcurrencyFlags.NumThreads()>0)
for tool in toolset:
# stop lumi access if we're in MC or enableLumiAccess == False
......@@ -388,6 +391,7 @@ if DQMonFlags.doMonitoring():
include("AthenaMonitoring/TrigDecTool_jobOptions.py")
doOldStylePreSetup()
addlSequences=[]
if DQMonFlags.doHLTMon():
try:
include("TrigHLTMonitoring/HLTMonitoring_topOptions.py")
......@@ -402,9 +406,10 @@ if DQMonFlags.doMonitoring():
if DQMonFlags.doCTPMon():
try:
include("TrigT1CTMonitoring/TrigT1CTMonitoringJobOptions_forRecExCommission.py")
addlSequences.append(CTPMonSeq)
except Exception:
treatException("DataQualitySteering_jobOptions.py: exception when setting up central trigger monitoring")
doOldStylePostSetup()
doOldStylePostSetup(addlSequences)
ConfigFlags.dump()
ComponentAccumulator.CAtoGlobalWrapper(AthenaMonitoringCfg, ConfigFlags)
......
......@@ -489,6 +489,7 @@ initialize()
joSvc->set( client + ".Environment", m_d->m_environmentProp );
// LWHists not thread-safe. Use alg property to use ROOT backend in MT mode.
ATH_MSG_DEBUG("Setting LWHist ROOT backend flag to " << m_d->m_rootBackend);
LWHistControls::setROOTBackend(m_d->m_rootBackend);
if( m_monTools.size() > 0 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment