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");
80 auto const&
data = rawDataHandle->FEDData(fed);
81 auto const nbytes =
data.size();
91 auto&
queue =
event.queue();
101 auto digiViewEB = cms::alpakatools::make_device_view<uint32_t>(alpaka::getDev(
queue), digisDevEB.view().size());
102 auto digiViewEE = cms::alpakatools::make_device_view<uint32_t>(alpaka::getDev(
queue), digisDevEE.view().size());
103 alpaka::memset(
queue, digiViewEB, 0);
104 alpaka::memset(
queue, digiViewEE, 0);
107 uint32_t currentCummOffset = 0;
108 uint32_t fedCounter = 0;
110 auto const&
data = rawDataHandle->FEDData(fed);
111 auto const nbytes =
data.size();
118 std::memcpy(inputHost.
data.data() + currentCummOffset,
data.data(), nbytes);
120 inputHost.
offsets[fedCounter] = currentCummOffset;
121 inputHost.
feds[fedCounter] = fed;
124 currentCummOffset += nbytes;
127 assert(currentCummOffset == size);
131 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)