From 8f1aa817ce43c5fd4c8b9c928647c74605afdd98 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Wed, 12 Jun 2024 22:51:52 +0200 Subject: [PATCH] Initialise the EcalElectronicsMappingHost with null detids --- .../plugins/alpaka/EcalElectronicsMappingHostESProducer.cc | 6 ++++++ .../EcalRawToDigi/plugins/alpaka/UnpackPortable.dev.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/EventFilter/EcalRawToDigi/plugins/alpaka/EcalElectronicsMappingHostESProducer.cc b/EventFilter/EcalRawToDigi/plugins/alpaka/EcalElectronicsMappingHostESProducer.cc index 32708b201ef2d..2212a046ceb35 100644 --- a/EventFilter/EcalRawToDigi/plugins/alpaka/EcalElectronicsMappingHostESProducer.cc +++ b/EventFilter/EcalRawToDigi/plugins/alpaka/EcalElectronicsMappingHostESProducer.cc @@ -1,3 +1,5 @@ +#include + #include "FWCore/Framework/interface/ESTransientHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondFormats/DataRecord/interface/EcalMappingElectronicsRcd.h" @@ -32,6 +34,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { int const size = 0x3FFFFF; auto product = std::make_unique(size, cms::alpakatools::host()); + // fill the whole collection with null detids + alpaka::QueueCpuBlocking queue{cms::alpakatools::host()}; + alpaka::memset(queue, product->buffer(), 0x00); + // fill in eb auto const& barrelValues = mapping.barrelItems(); for (unsigned int i = 0; i < barrelValues.size(); ++i) { diff --git a/EventFilter/EcalRawToDigi/plugins/alpaka/UnpackPortable.dev.cc b/EventFilter/EcalRawToDigi/plugins/alpaka/UnpackPortable.dev.cc index 374a5a9c2c87f..6f7b2fd28f085 100644 --- a/EventFilter/EcalRawToDigi/plugins/alpaka/UnpackPortable.dev.cc +++ b/EventFilter/EcalRawToDigi/plugins/alpaka/UnpackPortable.dev.cc @@ -202,7 +202,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::ecal::raw { ElectronicsIdGPU eid{fed2dcc(fed), ttid, stripid, xtalid}; auto const didraw = isBarrel ? compute_ebdetid(eid) : eid2did[eid.linearIndex()].rawid(); - // FIXME: what kind of channels are these guys + // skip channels with an invalid detid if (didraw == 0) continue;