Skip to content

Commit

Permalink
Initialise the EcalElectronicsMappingHost with null detids
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Jun 12, 2024
1 parent 94a8581 commit 3e7d8d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <alpaka/alpaka.hpp>

#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "CondFormats/DataRecord/interface/EcalMappingElectronicsRcd.h"
Expand Down Expand Up @@ -32,6 +34,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
int const size = 0x3FFFFF;
auto product = std::make_unique<EcalElectronicsMappingHost>(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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3e7d8d4

Please sign in to comment.