Skip to content

Commit

Permalink
HLT menu development for 12_3_X (branch: 12_4_X)
Browse files Browse the repository at this point in the history
  • Loading branch information
missirol committed May 17, 2022
1 parent 5ae62f4 commit d172cde
Show file tree
Hide file tree
Showing 18 changed files with 1,235 additions and 1,384 deletions.
32 changes: 16 additions & 16 deletions Configuration/HLT/python/addOnTestsHLT.py

Large diffs are not rendered by default.

53 changes: 37 additions & 16 deletions HLTrigger/Configuration/python/CustomConfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,19 @@ def _stage2(process):


def HLTRECO(process):

# --------------------------------------------
# remove ESSources and ESProducers from Tasks:
# - needed for HLT+RECO tests on GPU
# --------------------------------------------
# - when Reconstruction_cff is loaded, it brings in Tasks that include
# GPU-related ES modules with the same names as they have in HLT configs
# - in TSG tests, these GPU-related RECO Tasks are not included in the Schedule
# (because the "gpu" process-modifier is not used);
# this causes the ES modules not to be executed, thus making them unavailable to HLT producers
# - this workaround removes ES modules from Tasks, making their execution independent of the content of the Schedule;
# with reference to https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideAboutPythonConfigFile?rev=92#Behavior_when_an_ESProducer_ESSo,
# this workaround avoids "Case 3" by reverting to "Case 2"
# - this workaround only affects Tasks of non-HLT steps, as the addition of ES modules to Tasks is not supported in ConfDB
# (none of the Tasks used in the HLT step can contain ES modules in the first place, modulo customisations outside ConfDB)
"""Customisations for running HLT+RECO in the same job
- remove ESSources and ESProducers from Tasks (needed to run HLT+RECO tests on GPU)
- when Reconstruction_cff is loaded, it brings in Tasks that include
GPU-related ES modules with the same names as they have in HLT configs
- in TSG tests, these GPU-related RECO Tasks are not included in the Schedule
(because the "gpu" process-modifier is not used);
this causes the ES modules not to be executed, thus making them unavailable to HLT producers
- this workaround removes ES modules from Tasks, making their execution independent of the content of the Schedule;
with reference to https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideAboutPythonConfigFile?rev=92#Behavior_when_an_ESProducer_ESSo,
this workaround avoids "Case 3" by reverting to "Case 2"
- this workaround only affects Tasks of non-HLT steps, as the addition of ES modules to Tasks is not supported in ConfDB
(none of the Tasks used in the HLT step can contain ES modules in the first place, modulo customisations outside ConfDB)
"""
for taskName in process.tasks_():
task = process.tasks_()[taskName]
esModulesToRemove = set()
Expand All @@ -131,7 +129,30 @@ def HLTRECO(process):
esModulesToRemove.add(module)
for esModule in esModulesToRemove:
task.remove(esModule)
# --------------------------------------------

return process


def customiseGlobalTagForOnlineBeamSpot(process):
"""Customisation of GlobalTag for Online BeamSpot
- edits the GlobalTag ESSource to load the tags used to produce the HLT beamspot
- these tags are not available in the Offline GT, which is the GT presently used in HLT+RECO tests
- not loading these tags (i.e. not using this customisation) does not result in a runtime error,
but it leads to an HLT beamspot different to the one obtained when running HLT alone
"""
if hasattr(process, 'GlobalTag'):
if not hasattr(process.GlobalTag, 'toGet'):
process.GlobalTag.toGet = cms.VPSet()
process.GlobalTag.toGet += [
cms.PSet(
record = cms.string('BeamSpotOnlineLegacyObjectsRcd'),
tag = cms.string('BeamSpotOnlineLegacy')
),
cms.PSet(
record = cms.string('BeamSpotOnlineHLTObjectsRcd'),
tag = cms.string('BeamSpotOnlineHLT')
)
]

return process

Expand Down
Loading

0 comments on commit d172cde

Please sign in to comment.