Skip to content

Commit

Permalink
Merge pull request #44253 from mmusich/mm_dev_protect_fakeMenus_in_cu…
Browse files Browse the repository at this point in the history
…stomizeForAlpak_14_0_X

[14.0.X] add failsafes for protecting the alpaka customization against `Fake` HLT menus
  • Loading branch information
cmsbuild authored Feb 29, 2024
2 parents 7d90e91 + b143e07 commit 94ec3e3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion HLTrigger/Configuration/python/customizeHLTforAlpaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
pfClusterBuilder = process.hltParticleFlowClusterHBHE.pfClusterBuilder,
Expand Down Expand Up @@ -724,6 +728,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,
Expand Down Expand Up @@ -904,7 +912,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

Expand Down

0 comments on commit 94ec3e3

Please sign in to comment.