From b143e0772f4acd0d3b9cdb2e546d687d33e29a29 Mon Sep 17 00:00:00 2001 From: mmusich Date: Tue, 27 Feb 2024 14:17:29 +0100 Subject: [PATCH] add failsafes for protecting the alpaka customization agains Fake HLT menus --- .../Configuration/python/customizeHLTforAlpaka.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py index d1ca276fb3e4d..a9bdb2feae097 100644 --- a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py +++ b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py @@ -190,6 +190,10 @@ def customizeHLTforAlpakaParticleFlowClustering(process): pfRecHits = cms.InputTag("hltPFRecHitSoAProducerHCALCPUSerial"), ) + ## failsafe for fake menus + if(not hasattr(process,'hltParticleFlowClusterHBHE')): + return process + process.hltLegacyPFClusterProducer = cms.EDProducer("LegacyPFClusterProducer", src = cms.InputTag("hltPFClusterSoAProducer"), pfClusterParams = cms.ESInputTag("pfClusterParamsESProducer:"), @@ -725,6 +729,10 @@ def customizeHLTforAlpakaPixelRecoVertexing(process): src = cms.InputTag("hltPixelVerticesCPUSerial") ) + ## failsafe for fake menus + if(not hasattr(process,'hltTrimmedPixelVertices')): + return process + process.HLTRecopixelvertexingTask = cms.ConditionalTask( process.HLTRecoPixelTracksTask, process.hltPixelVerticesSoA, @@ -905,7 +913,9 @@ def customizeHLTforAlpakaEcalLocalReco(process): if hasattr(process, 'hltEcalUncalibRecHitSoA'): delattr(process, 'hltEcalUncalibRecHitSoA') - process.HLTDoFullUnpackingEgammaEcalTask = cms.ConditionalTask(process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask, process.HLTPreshowerTask) + ## failsafe for fake menus + if hasattr(process, 'HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask') and hasattr(process, 'HLTPreshowerTask'): + process.HLTDoFullUnpackingEgammaEcalTask = cms.ConditionalTask(process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask, process.HLTPreshowerTask) return process