46 digisCollectionToken_(produces<
cms::
cuda::Product<
ecal::DigisCollection<
calo::
common::DevStoragePolicy>>>(
47 ps.getParameter<
std::
string>(
"digisLabelEB"))) {}
57 size_ = pdigis.size();
61 digis_.ids = cms::cuda::make_device_unique<uint32_t[]>(
size_, ctx.stream());
65 auto idstmp = cms::cuda::make_host_unique<uint32_t[]>(
size_, ctx.stream());
70 for (
const auto&
pdigi : pdigis) {
73 idstmp.get()[
i] =
pdigi.id();
87 cudaMemcpyAsync(
digis_.ids.get(), idstmp.get(),
size_ *
sizeof(uint32_t), cudaMemcpyHostToDevice, ctx.stream()));
91 cudaMemcpyHostToDevice,
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
uint16_t raw() const
get the raw word
const edm::EDPutTokenT< cms::cuda::Product< ecal::DigisCollection< calo::common::DevStoragePolicy > > > digisCollectionToken_
void acquire(edm::Event const &event, edm::EventSetup const &setup, edm::WaitingTaskWithArenaHolder holder) override
ecal::DigisCollection<::calo::common::DevStoragePolicy > digis_
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< EBDigiCollectionPh2 > digiCollectionToken_
static constexpr int MAXSAMPLES
Namespace of DDCMS conversion namespace.
~EcalPhase2DigiToGPUProducer() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::Event &evt, edm::EventSetup const &setup) override
cms::cuda::ContextState cudaState_
EcalPhase2DigiToGPUProducer(const edm::ParameterSet &ps)
#define cudaCheck(ARG,...)