|
|
Go to the documentation of this file.
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);
62 digisEBToken_{produces<OutputProduct>(ps.getParameter<
std::string>(
"digisLabelEB"))},
63 digisEEToken_{produces<OutputProduct>(ps.getParameter<
std::string>(
"digisLabelEE"))},
64 eMappingToken_{esConsumes<ecal::raw::ElectronicsMappingGPU, EcalMappingElectronicsRcd>()},
65 fedsToUnpack_{ps.getParameter<std::vector<int>>(
"FEDs")} {
66 config_.maxChannelsEB = ps.getParameter<uint32_t>(
"maxChannelsEB");
67 config_.maxChannelsEE = ps.getParameter<uint32_t>(
"maxChannelsEE");
80 auto const& eMappingProduct = eMappingHandle->
getProduct(ctx.stream());
105 outputCPU_ = {cms::cuda::make_host_unique<uint32_t[]>(2, ctx.stream())};
116 uint32_t currentCummOffset = 0;
120 auto const nbytes =
data.size();
127 std::memcpy(inputCPU.
data.get() + currentCummOffset,
data.data(), nbytes);
133 currentCummOffset += nbytes;
void produce(edm::Event &, edm::EventSetup const &) override
edm::EDPutTokenT< OutputProduct > digisEBToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)
constexpr uint32_t nbytes_per_fed_max
void acquire(edm::Event const &, edm::EventSetup const &, edm::WaitingTaskWithArenaHolder) override
edm::EDPutTokenT< OutputProduct > digisEEToken_
std::vector< int > fedsToUnpack_
Product const & getProduct(cudaStream_t) const
EcalRawToDigiGPU(edm::ParameterSet const &ps)
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void entryPoint(InputDataCPU const &, InputDataGPU &, OutputDataGPU &, ScratchDataGPU &, OutputDataCPU &, ConditionsProducts const &, cudaStream_t, uint32_t const, uint32_t const)
edm::ESGetToken< ecal::raw::ElectronicsMappingGPU, EcalMappingElectronicsRcd > eMappingToken_
ecal::raw::ConfigurationParameters config_
constexpr uint32_t nfeds_max
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
DigisCollection<::calo::common::DevStoragePolicy > digisEE
static void fillDescriptions(edm::ConfigurationDescriptions &)
ecal::raw::OutputDataGPU outputGPU_
static std::atomic< unsigned int > counter
DigisCollection<::calo::common::DevStoragePolicy > digisEB
cms::cuda::host::unique_ptr< uint32_t[]> nchannels
ecal::raw::OutputDataCPU outputCPU_
void allocate(ConfigurationParameters const &config, cudaStream_t cudaStream)
T getParameter(std::string const &) const
char data[epos_bytes_allocation]
~EcalRawToDigiGPU() override
constexpr auto empty_event_size
host::impl::make_host_unique_selector< T >::non_array make_host_unique(cudaStream_t stream)
cms::cuda::ContextState cudaState_