Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialise the EcalElectronicsMappingHost with null detids #45209

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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