Skip to content

Instantly share code, notes, and snippets.

@mmusich
Created March 27, 2024 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmusich/8953a8ce069342feed46c4d67ccb9054 to your computer and use it in GitHub Desktop.
Save mmusich/8953a8ce069342feed46c4d67ccb9054 to your computer and use it in GitHub Desktop.
diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
index 655a9660556..34fd2254d35 100644
--- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
+++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
@@ -231,6 +231,23 @@ def customiseForOffline(process):
for prod in esproducers_by_type(process, 'OnlineBeamSpotESProducer'):
prod.timeThreshold = int(1e6)
+ # For running HLT offline and relieve the strain on Frontier so it will no longer inject a
+ # transaction id which tells Frontier to add a unique "&freshkey" to many query URLs.
+ # That was intended as a feature to only be used by the Online HLT, to guarantee that fresh conditions
+ # from the database were loaded at each Lumi section
+ # Seee CMSHLT-3123 for further details
+ if hasattr(process, 'GlobalTag'):
+ # Set ReconnectEachRun and RefreshEachRun to False
+ process.GlobalTag.ReconnectEachRun = cms.untracked.bool(False)
+ process.GlobalTag.RefreshEachRun = cms.untracked.bool(False)
+
+ if hasattr(process.GlobalTag, 'toGet'):
+ # Filter out PSet objects containing only 'record' and 'refreshTime'
+ process.GlobalTag.toGet = [
+ pset for pset in process.GlobalTag.toGet
+ if set(pset.parameterNames_()) != {'record', 'refreshTime'}
+ ]
+
return process
def checkHLTfor43774(process):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment