16 #include <alpaka/alpaka.hpp> 47 std::vector<int>
feds(54);
48 for (uint32_t
i = 0;
i < 54; ++
i)
50 desc.add<std::vector<int>>(
"FEDs",
feds);
51 desc.add<uint32_t>(
"maxChannelsEB", 61200);
52 desc.add<uint32_t>(
"maxChannelsEE", 14648);
61 digisDevEBToken_{produces(ps.getParameter<
std::string>(
"digisLabelEB"))},
62 digisDevEEToken_{produces(ps.getParameter<
std::string>(
"digisLabelEE"))},
64 fedsToUnpack_{ps.getParameter<std::vector<int>>(
"FEDs")} {
65 config_.maxChannelsEB = ps.getParameter<uint32_t>(
"maxChannelsEB");
66 config_.maxChannelsEE = ps.getParameter<uint32_t>(
"maxChannelsEE");
69 #ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED 70 producesTemporarily(
"edm::DeviceProduct<alpaka_cuda_async::EcalDigiDeviceCollection>",
72 producesTemporarily(
"edm::DeviceProduct<alpaka_cuda_async::EcalDigiDeviceCollection>",
88 auto const&
data = rawDataHandle->FEDData(fed);
89 auto const nbytes =
data.size();
99 auto&
queue =
event.queue();
109 auto digiViewEB = cms::alpakatools::make_device_view<uint32_t>(alpaka::getDev(
queue), digisDevEB.view().size());
110 auto digiViewEE = cms::alpakatools::make_device_view<uint32_t>(alpaka::getDev(
queue), digisDevEE.view().size());
111 alpaka::memset(
queue, digiViewEB, 0);
112 alpaka::memset(
queue, digiViewEE, 0);
115 uint32_t currentCummOffset = 0;
116 uint32_t fedCounter = 0;
118 auto const&
data = rawDataHandle->FEDData(fed);
119 auto const nbytes =
data.size();
126 std::memcpy(inputHost.
data.data() + currentCummOffset,
data.data(), nbytes);
128 inputHost.
offsets[fedCounter] = currentCummOffset;
129 inputHost.
feds[fedCounter] = fed;
132 currentCummOffset += nbytes;
135 assert(currentCummOffset == size);
139 if (fedCounter > 0) {
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
device::ESGetToken< EcalElectronicsMappingDevice, EcalMappingElectronicsRcd > eMappingToken_
T getParameter(std::string const &) const
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
device::EDPutToken< OutputProduct > digisDevEEToken_
void unpackRaw(Queue &queue, InputDataHost const &inputHost, EcalDigiDeviceCollection &digisDevEB, EcalDigiDeviceCollection &digisDevEE, EcalElectronicsMappingDevice const &mapping, uint32_t const nfedsWithData, uint32_t const nbytesTotal)
~EcalRawToDigiPortable() override=default
device::EDPutToken< OutputProduct > digisDevEBToken_
EcalDigiDeviceCollection OutputProduct
void produce(device::Event &, device::EventSetup const &) override
std::vector< int > fedsToUnpack_
ecal::raw::ConfigurationParameters config_
PortableCollection< EcalDigiSoA > EcalDigiDeviceCollection
EcalRawToDigiPortable(edm::ParameterSet const &ps)
char data[epos_bytes_allocation]
static void fillDescriptions(edm::ConfigurationDescriptions &)
#define DEFINE_FWK_ALPAKA_MODULE(name)