40 digisCollectionToken_(produces<
cms::
cuda::Product<
ecal::DigisCollection<
calo::
common::DevStoragePolicy>>>(
41 ps.getParameter<
std::
string>(
"digisLabelEB"))) {}
49 const uint32_t
size = pdigis.size();
55 digis.
ids = cms::cuda::make_device_unique<uint32_t[]>(
size, ctx.stream());
59 auto idstmp = cms::cuda::make_host_unique<uint32_t[]>(
size, ctx.stream());
64 for (
const auto&
pdigi : pdigis) {
67 idstmp.get()[
i] =
pdigi.id();
80 cudaMemcpyAsync(digis.
ids.get(), idstmp.get(),
size *
sizeof(uint32_t), cudaMemcpyHostToDevice, ctx.stream()));
84 cudaMemcpyHostToDevice,
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
StoragePolicy::template StorageSelector< uint16_t >::type data
uint16_t raw() const
get the raw word
StoragePolicy::template StorageSelector< uint32_t >::type ids
const edm::EDPutTokenT< cms::cuda::Product< ecal::DigisCollection< calo::common::DevStoragePolicy > > > digisCollectionToken_
#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
EcalPhase2DigiToGPUProducer(const edm::ParameterSet &ps)
#define cudaCheck(ARG,...)
const T & get(const Product< T > &data)