49 std::vector<int>
feds(54);
50 for (uint32_t
i = 0;
i < 54; ++
i)
52 desc.
add<std::vector<int>>(
"FEDs",
feds);
53 desc.
add<uint32_t>(
"maxChannelsEB", 61200);
54 desc.
add<uint32_t>(
"maxChannelsEE", 14648);
59 confDesc.
add(label, desc);
64 digisEBToken_{produces<OutputProduct>(ps.getParameter<
std::string>(
"digisLabelEB"))},
65 digisEEToken_{produces<OutputProduct>(ps.getParameter<
std::string>(
"digisLabelEE"))},
66 eMappingToken_{esConsumes<ecal::raw::ElectronicsMappingGPU, EcalMappingElectronicsRcd>()},
67 maxFedSize_{ps.getParameter<uint32_t>(
"maxFedSize")},
68 fedsToUnpack_{ps.getParameter<std::vector<int>>(
"FEDs")} {
69 config_.maxChannelsEB = ps.getParameter<uint32_t>(
"maxChannelsEB");
70 config_.maxChannelsEE = ps.getParameter<uint32_t>(
"maxChannelsEE");
83 auto const& eMappingProduct = eMappingHandle->getProduct(ctx.stream());
108 outputCPU_ = {cms::cuda::make_host_unique<uint32_t[]>(2, ctx.stream())};
111 outputCPU_.nchannels[1] = 0;
122 uint32_t currentCummOffset = 0;
125 auto const&
data = rawDataHandle->FEDData(fed);
126 auto const nbytes =
data.size();
133 std::memcpy(inputCPU.data.get() + currentCummOffset,
data.data(), nbytes);
135 inputCPU.offsets[
counter] = currentCummOffset;
139 currentCummOffset += nbytes;
161 outputCPU_.nchannels.reset();
constexpr uint32_t nbytes_per_fed_max
void entryPoint(InputDataCPU const &, InputDataGPU &, OutputDataGPU &, ScratchDataGPU &, OutputDataCPU &, ConditionsProducts const &, cudaStream_t, uint32_t const, uint32_t const)
EcalRawToDigiGPU(edm::ParameterSet const &ps)
const uint32_t maxFedSize_
#define DEFINE_FWK_MODULE(type)
edm::ESGetToken< ecal::raw::ElectronicsMappingGPU, EcalMappingElectronicsRcd > eMappingToken_
constexpr uint32_t nfeds_max
std::vector< int > fedsToUnpack_
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::EDPutTokenT< OutputProduct > digisEEToken_
constexpr auto empty_event_size
void produce(edm::Event &, edm::EventSetup const &) override
ecal::raw::OutputDataGPU outputGPU_
ecal::raw::ConfigurationParameters config_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
cms::cuda::ContextState cudaState_
ecal::raw::OutputDataCPU outputCPU_
DigisCollection<::calo::common::DevStoragePolicy > digisEE
DigisCollection<::calo::common::DevStoragePolicy > digisEB
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void acquire(edm::Event const &, edm::EventSetup const &, edm::WaitingTaskWithArenaHolder) override
~EcalRawToDigiGPU() override
char data[epos_bytes_allocation]
static std::atomic< unsigned int > counter
cms::cuda::host::unique_ptr< uint32_t[]> nchannels
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void allocate(ConfigurationParameters const &config, cudaStream_t cudaStream)
host::impl::make_host_unique_selector< T >::non_array make_host_unique(cudaStream_t stream)
edm::EDPutTokenT< OutputProduct > digisEBToken_