From bb837dc9196b41bb1985bfe6fa04ec29a168cfc0 Mon Sep 17 00:00:00 2001 From: Andrea Massironi Date: Thu, 11 Jun 2020 12:36:27 +0200 Subject: [PATCH] Enable ECAL rechits reconstruction on GPUs at HLT (#477) Extend the ECAL HLT cutomisation to run the ECAL rechit producer on GPU. Add an edm::LogError in case of too many channels for the rechits and uncalibrated rechits producers. --- .../EcalRecProducers/plugins/EcalRecHitProducerGPU.cc | 4 ++++ .../EcalRecProducers/plugins/EcalUncalibRecHitProducerGPU.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducerGPU.cc b/RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducerGPU.cc index 0a1260dffefd2..248248a4cca88 100644 --- a/RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducerGPU.cc +++ b/RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducerGPU.cc @@ -300,6 +300,10 @@ void EcalRecHitProducerGPU::acquire(edm::Event const& event, nee_ = eeUncalibRecHits.size; // std::cout << " [EcalRecHitProducerGPU::acquire] neb_:nee_ = " << neb_ << " : " << nee_ << std::endl; + if ((neb_ + nee_) > maxNumberHits_) { + edm::LogError("EcalRecHitProducerGPU") << "max number of channels exceeded. See options 'maxNumberHits' "; + } + int nchannelsEB = ebUncalibRecHits.size; // --> offsetForInput, first EB and then EE // conditions diff --git a/RecoLocalCalo/EcalRecProducers/plugins/EcalUncalibRecHitProducerGPU.cc b/RecoLocalCalo/EcalRecProducers/plugins/EcalUncalibRecHitProducerGPU.cc index 1ecbb9f5e5ece..cdf21e3240954 100644 --- a/RecoLocalCalo/EcalRecProducers/plugins/EcalUncalibRecHitProducerGPU.cc +++ b/RecoLocalCalo/EcalRecProducers/plugins/EcalUncalibRecHitProducerGPU.cc @@ -287,6 +287,10 @@ void EcalUncalibRecHitProducerGPU::acquire(edm::Event const& event, neb_ = ebDigis.ndigis; nee_ = eeDigis.ndigis; + if ((neb_ + nee_) > maxNumberHits_) { + edm::LogError("EcalUncalibRecHitProducerGPU") << "max number of channels exceeded. See options 'maxNumberHits' "; + } + // conditions setup.get().get(pedestalsHandle_); setup.get().get(gainRatiosHandle_);