Skip to content

Commit 11872f2

Browse files
authored
Merge pull request #45209 from fwyzard/Initialise_EcalElectronicsMappingHost
Initialise the `EcalElectronicsMappingHost` with null detids
2 parents 23d93b4 + 8f1aa81 commit 11872f2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

EventFilter/EcalRawToDigi/plugins/alpaka/EcalElectronicsMappingHostESProducer.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <alpaka/alpaka.hpp>
2+
13
#include "FWCore/Framework/interface/ESTransientHandle.h"
24
#include "FWCore/ParameterSet/interface/ParameterSet.h"
35
#include "CondFormats/DataRecord/interface/EcalMappingElectronicsRcd.h"
@@ -32,6 +34,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
3234
int const size = 0x3FFFFF;
3335
auto product = std::make_unique<EcalElectronicsMappingHost>(size, cms::alpakatools::host());
3436

37+
// fill the whole collection with null detids
38+
alpaka::QueueCpuBlocking queue{cms::alpakatools::host()};
39+
alpaka::memset(queue, product->buffer(), 0x00);
40+
3541
// fill in eb
3642
auto const& barrelValues = mapping.barrelItems();
3743
for (unsigned int i = 0; i < barrelValues.size(); ++i) {

EventFilter/EcalRawToDigi/plugins/alpaka/UnpackPortable.dev.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::ecal::raw {
202202

203203
ElectronicsIdGPU eid{fed2dcc(fed), ttid, stripid, xtalid};
204204
auto const didraw = isBarrel ? compute_ebdetid(eid) : eid2did[eid.linearIndex()].rawid();
205-
// FIXME: what kind of channels are these guys
205+
// skip channels with an invalid detid
206206
if (didraw == 0)
207207
continue;
208208

0 commit comments

Comments
 (0)