From 4190baf1967ab894e39cadbb00af1ac32ac72afa Mon Sep 17 00:00:00 2001 From: mmusich Date: Wed, 21 Feb 2024 19:06:28 +0100 Subject: [PATCH] Fix customizeHLTforAlpakaParticleFlowClustering: insert DQM_HcalReconstruction_v only if present in the HLT menu --- .../python/customizeHLTforAlpaka.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py index 1f3c3f42f3ada..d1ca276fb3e4d 100644 --- a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py +++ b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py @@ -245,12 +245,6 @@ def replaceItemsInSequence(process, itemsToReplace, replacingSequence): process.HLTPFClusterHBHECPUSerial = cms.Sequence(process.hltHBHERecHitToSoA+process.hltPFRecHitSoAProducerHCALCPUSerial+process.hltPFClusterSoAProducerCPUSerial) - # Add CPUSerial sequences to DQM_HcalReconstruction_v6 Path - dqmHcalRecoPathName = "DQM_HcalReconstruction_v6" - dqmHcalPath= getattr(process, dqmHcalRecoPathName) - dqmHcalRecoPathIndex = dqmHcalPath.index(process.hltHcalConsumerGPU) + 1 - dqmHcalPath.insert(dqmHcalRecoPathIndex , process.HLTPFClusterHBHECPUSerial) - # modify EventContent of DQMGPUvsCPU stream if hasattr(process, 'hltOutputDQMGPUvsCPU'): process.hltOutputDQMGPUvsCPU.outputCommands.extend([ @@ -258,6 +252,20 @@ def replaceItemsInSequence(process, itemsToReplace, replacingSequence): 'keep *_hltPFClusterSoAProducerCPUSerial_*_*', ]) + # Add CPUSerial sequences to DQM_HcalReconstruction_v Path + dqmHcalRecoPathName = None + for pathName in process.paths_(): + if pathName.startswith('DQM_HcalReconstruction_v'): + dqmHcalRecoPathName = pathName + break + + if dqmHcalRecoPathName == None: + return process + + dqmHcalPath = getattr(process, dqmHcalRecoPathName) + dqmHcalRecoPathIndex = dqmHcalPath.index(process.hltHcalConsumerGPU) + 1 + dqmHcalPath.insert(dqmHcalRecoPathIndex , process.HLTPFClusterHBHECPUSerial) + return process ## Pixel HLT in Alpaka