CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Attributes
EcalRechitADCToGeVConstantGPU Class Reference

#include <EcalRechitADCToGeVConstantGPU.h>

Classes

struct  Product
 

Public Member Functions

 EcalRechitADCToGeVConstantGPU (EcalADCToGeVConstant const &)
 
Product const & getProduct (cudaStream_t) const
 
 ~EcalRechitADCToGeVConstantGPU ()=default
 

Static Public Member Functions

static std::string name ()
 

Private Attributes

std::vector< float, cms::cuda::HostAllocator< float > > adc2gev_
 
cms::cuda::ESProduct< Productproduct_
 

Detailed Description

Definition at line 13 of file EcalRechitADCToGeVConstantGPU.h.

Constructor & Destructor Documentation

◆ EcalRechitADCToGeVConstantGPU()

EcalRechitADCToGeVConstantGPU::EcalRechitADCToGeVConstantGPU ( EcalADCToGeVConstant const &  values)

Definition at line 6 of file EcalRechitADCToGeVConstantGPU.cc.

7  : adc2gev_(2) // size is 2, one form EB and one for EE
8 {
9  adc2gev_[0] = values.getEBValue();
10  adc2gev_[1] = values.getEEValue();
11 }

References adc2gev_, and contentValuesCheck::values.

◆ ~EcalRechitADCToGeVConstantGPU()

EcalRechitADCToGeVConstantGPU::~EcalRechitADCToGeVConstantGPU ( )
default

Member Function Documentation

◆ getProduct()

EcalRechitADCToGeVConstantGPU::Product const & EcalRechitADCToGeVConstantGPU::getProduct ( cudaStream_t  cudaStream) const

Definition at line 13 of file EcalRechitADCToGeVConstantGPU.cc.

13  {
14  auto const& product = product_.dataForCurrentDeviceAsync(
15  cudaStream, [this](EcalRechitADCToGeVConstantGPU::Product& product, cudaStream_t cudaStream) {
16  // allocate
17  product.adc2gev = cms::cuda::make_device_unique<float[]>(adc2gev_.size(), cudaStream);
18  // transfer
19  cms::cuda::copyAsync(product.adc2gev, adc2gev_, cudaStream);
20  });
21 
22  return product;
23 }

References EcalRechitADCToGeVConstantGPU::Product::adc2gev, adc2gev_, cms::cuda::copyAsync(), and product_.

Referenced by EcalRecHitProducerGPU::acquire().

◆ name()

static std::string EcalRechitADCToGeVConstantGPU::name ( )
inlinestatic

Definition at line 31 of file EcalRechitADCToGeVConstantGPU.h.

31 { return std::string{"ecalRechitADCToGeVConstantGPU"}; }

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

Member Data Documentation

◆ adc2gev_

std::vector<float, cms::cuda::HostAllocator<float> > EcalRechitADCToGeVConstantGPU::adc2gev_
private

Definition at line 36 of file EcalRechitADCToGeVConstantGPU.h.

Referenced by EcalRechitADCToGeVConstantGPU(), and getProduct().

◆ product_

cms::cuda::ESProduct<Product> EcalRechitADCToGeVConstantGPU::product_
private

Definition at line 38 of file EcalRechitADCToGeVConstantGPU.h.

Referenced by getProduct().

EcalRechitADCToGeVConstantGPU::Product::adc2gev
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > adc2gev
Definition: EcalRechitADCToGeVConstantGPU.h:16
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalRechitADCToGeVConstantGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: EcalRechitADCToGeVConstantGPU.h:38
EcalRechitADCToGeVConstantGPU::adc2gev_
std::vector< float, cms::cuda::HostAllocator< float > > adc2gev_
Definition: EcalRechitADCToGeVConstantGPU.h:36
EcalRechitADCToGeVConstantGPU::Product
Definition: EcalRechitADCToGeVConstantGPU.h:15
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20