Skip to content
Snippets Groups Projects
Commit c6f65dd6 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

TriggerJobOpts: add forceConditions modifier

Add `forceConditions` modifier to be used with preloaded data in a
partition. This forces all conditions folders to the run from the input
file except the HLT prescale folder, which is needed to change prescales
in a partition.

Fixes ATR-22143.
parent 763fcf3e
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@
# Permanent fixes that are only applied online should be
# put into Trigger_topOptions_standalone.py
###############################################################
from __future__ import print_function
from AthenaCommon.AppMgr import theApp
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
......@@ -362,6 +361,45 @@ class useOnlineLumi(_modifier):
LuminosityCondAlgOnlineDefault()
class forceConditions(_modifier):
"""
Force all conditions (except prescales) to match run from input file
"""
def postSetup(self):
# Do not override these folders:
ignore = ['/TRIGGER/HLT/PrescaleKey'] # see ATR-22143
# All time-based folders (from IOVDbSvc DEBUG message, see athena!38274)
timebased = ['/TDAQ/OLC/CALIBRATIONS',
'/TDAQ/Resources/ATLAS/SCT/Robins',
'/SCT/DAQ/Config/Chip',
'/SCT/DAQ/Config/Geog',
'/SCT/DAQ/Config/MUR',
'/SCT/DAQ/Config/Module',
'/SCT/DAQ/Config/ROD',
'/SCT/DAQ/Config/RODMUR',
'/SCT/HLT/DCS/HV',
'/SCT/HLT/DCS/MODTEMP',
'/MUONALIGN/Onl/MDT/BARREL',
'/MUONALIGN/Onl/MDT/ENDCAP/SIDEA',
'/MUONALIGN/Onl/MDT/ENDCAP/SIDEC',
'/MUONALIGN/Onl/TGC/SIDEA',
'/MUONALIGN/Onl/TGC/SIDEC']
from RecExConfig.RecFlags import rec
from TrigCommon.AthHLT import get_sor_params
sor = get_sor_params(rec.RunNumber())
for i,f in enumerate(svcMgr.IOVDbSvc.Folders):
if any(name in f for name in ignore):
continue
if any(name in f for name in timebased):
svcMgr.IOVDbSvc.Folders[i] += '<forceTimestamp>%d</forceTimestamp>' % (sor['SORTime'] // int(1e9))
else:
svcMgr.IOVDbSvc.Folders[i] += '<forceRunNumber>%d</forceRunNumber>' % sor['RunNumber']
###############################################################
# Algorithm modifiers
###############################################################
......
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