24 const std::vector<double, cms::cuda::HostAllocator<double>>
weights_;
38 weights_([
tmp = ps.getParameter<
std::
vector<double>>(
"weights")] {
39 return std::vector<double, cms::cuda::HostAllocator<double>>(
tmp.begin(),
tmp.end());
41 digisToken_{consumes<InputProduct>(ps.getParameter<
edm::InputTag>(
"digisLabelEB"))},
42 recHitsToken_{produces<OutputProduct>(ps.getParameter<
std::string>(
"recHitsLabelEB"))} {}
49 desc.add<std::vector<double>>(
"weights",
79 auto const &digis = ctx.
get(digisProduct);
81 const uint32_t
size = digis.size;
87 cudaCheck(cudaMemcpyAsync(weights_d.get(),
90 cudaMemcpyHostToDevice,
static void fillDescriptions(edm::ConfigurationDescriptions &)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const std::vector< double, cms::cuda::HostAllocator< double > > weights_
const edm::EDGetTokenT< InputProduct > digisToken_
UncalibratedRecHit<::calo::common::DevStoragePolicy > recHits
~EcalUncalibRecHitPhase2WeightsProducerGPU() override=default
void produce(edm::Event &, edm::EventSetup const &) override
void phase2Weights(ecal::DigisCollection< calo::common::DevStoragePolicy > const &, EventOutputDataGPU &, cms::cuda::device::unique_ptr< double[]> &, cudaStream_t)
#define DEFINE_FWK_MODULE(type)
static constexpr int MAXSAMPLES
const edm::EDPutTokenT< OutputProduct > recHitsToken_
void allocate(uint32_t digi_size, cudaStream_t cudaStream)
ecal::weights::EventOutputDataGPU eventOutputDataGPU_
#define cudaCheck(ARG,...)
const T & get(const Product< T > &data)
EcalUncalibRecHitPhase2WeightsProducerGPU(edm::ParameterSet const &ps)