CMS 3D CMS Logo

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

#include <EcalTimeBiasCorrectionsGPU.h>

Classes

struct  Product
 

Public Member Functions

 EcalTimeBiasCorrectionsGPU (EcalTimeBiasCorrections const &)
 
Product const & getProduct (cudaStream_t) const
 
 ~EcalTimeBiasCorrectionsGPU ()=default
 

Static Public Member Functions

static std::string name ()
 

Private Attributes

std::vector< float, cms::cuda::HostAllocator< float > > ebTimeCorrAmplitudeBins_
 
std::vector< float, cms::cuda::HostAllocator< float > > ebTimeCorrShiftBins_
 
std::vector< float, cms::cuda::HostAllocator< float > > eeTimeCorrAmplitudeBins_
 
std::vector< float, cms::cuda::HostAllocator< float > > eeTimeCorrShiftBins_
 
cms::cuda::ESProduct< Productproduct_
 

Detailed Description

Definition at line 13 of file EcalTimeBiasCorrectionsGPU.h.

Constructor & Destructor Documentation

◆ EcalTimeBiasCorrectionsGPU()

EcalTimeBiasCorrectionsGPU::EcalTimeBiasCorrectionsGPU ( EcalTimeBiasCorrections const &  values)

Definition at line 6 of file EcalTimeBiasCorrectionsGPU.cc.

6  {
7  ebTimeCorrAmplitudeBins_.reserve(values.EBTimeCorrAmplitudeBins.size());
8  for (const auto& ebTimeCorrAmplitudeBin : values.EBTimeCorrAmplitudeBins) {
9  ebTimeCorrAmplitudeBins_.emplace_back(ebTimeCorrAmplitudeBin);
10  }
11 
12  ebTimeCorrShiftBins_.reserve(values.EBTimeCorrAmplitudeBins.size());
13  for (const auto& ebTimeCorrShiftBin : values.EBTimeCorrShiftBins) {
14  ebTimeCorrShiftBins_.emplace_back(ebTimeCorrShiftBin);
15  }
16 
17  eeTimeCorrAmplitudeBins_.reserve(values.EETimeCorrAmplitudeBins.size());
18  for (const auto& eeTimeCorrAmplitudeBin : values.EETimeCorrAmplitudeBins) {
19  eeTimeCorrAmplitudeBins_.emplace_back(eeTimeCorrAmplitudeBin);
20  }
21 
22  eeTimeCorrShiftBins_.reserve(values.EETimeCorrAmplitudeBins.size());
23  for (const auto& eeTimeCorrShiftBin : values.EETimeCorrShiftBins) {
24  eeTimeCorrShiftBins_.emplace_back(eeTimeCorrShiftBin);
25  }
26 }

References ebTimeCorrAmplitudeBins_, ebTimeCorrShiftBins_, eeTimeCorrAmplitudeBins_, eeTimeCorrShiftBins_, and contentValuesCheck::values.

◆ ~EcalTimeBiasCorrectionsGPU()

EcalTimeBiasCorrectionsGPU::~EcalTimeBiasCorrectionsGPU ( )
default

Member Function Documentation

◆ getProduct()

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

Definition at line 28 of file EcalTimeBiasCorrectionsGPU.cc.

28  {
29  auto const& product = product_.dataForCurrentDeviceAsync(
30  cudaStream, [this](EcalTimeBiasCorrectionsGPU::Product& product, cudaStream_t cudaStream) {
31  // to get the size of vectors later on
32  // should be removed and host conditions' objects used directly
35 
36  // allocate
37  product.ebTimeCorrAmplitudeBins =
38  cms::cuda::make_device_unique<float[]>(ebTimeCorrAmplitudeBins_.size(), cudaStream);
39  product.ebTimeCorrShiftBins = cms::cuda::make_device_unique<float[]>(ebTimeCorrShiftBins_.size(), cudaStream);
40  product.eeTimeCorrAmplitudeBins =
41  cms::cuda::make_device_unique<float[]>(eeTimeCorrAmplitudeBins_.size(), cudaStream);
42  product.eeTimeCorrShiftBins = cms::cuda::make_device_unique<float[]>(eeTimeCorrShiftBins_.size(), cudaStream);
43  // transfer
48  });
49 
50  return product;
51 }

References cms::cuda::copyAsync(), EcalTimeBiasCorrectionsGPU::Product::ebTimeCorrAmplitudeBins, ebTimeCorrAmplitudeBins_, EcalTimeBiasCorrectionsGPU::Product::ebTimeCorrAmplitudeBinsSize, EcalTimeBiasCorrectionsGPU::Product::ebTimeCorrShiftBins, ebTimeCorrShiftBins_, EcalTimeBiasCorrectionsGPU::Product::eeTimeCorrAmplitudeBins, eeTimeCorrAmplitudeBins_, EcalTimeBiasCorrectionsGPU::Product::eeTimeCorrAmplitudeBinsSize, EcalTimeBiasCorrectionsGPU::Product::eeTimeCorrShiftBins, eeTimeCorrShiftBins_, and product_.

◆ name()

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

Definition at line 35 of file EcalTimeBiasCorrectionsGPU.h.

35 { return std::string{"ecalTimeBiasCorrectionsGPU"}; }

References AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

◆ ebTimeCorrAmplitudeBins_

std::vector<float, cms::cuda::HostAllocator<float> > EcalTimeBiasCorrectionsGPU::ebTimeCorrAmplitudeBins_
private

Definition at line 39 of file EcalTimeBiasCorrectionsGPU.h.

Referenced by EcalTimeBiasCorrectionsGPU(), and getProduct().

◆ ebTimeCorrShiftBins_

std::vector<float, cms::cuda::HostAllocator<float> > EcalTimeBiasCorrectionsGPU::ebTimeCorrShiftBins_
private

Definition at line 40 of file EcalTimeBiasCorrectionsGPU.h.

Referenced by EcalTimeBiasCorrectionsGPU(), and getProduct().

◆ eeTimeCorrAmplitudeBins_

std::vector<float, cms::cuda::HostAllocator<float> > EcalTimeBiasCorrectionsGPU::eeTimeCorrAmplitudeBins_
private

Definition at line 41 of file EcalTimeBiasCorrectionsGPU.h.

Referenced by EcalTimeBiasCorrectionsGPU(), and getProduct().

◆ eeTimeCorrShiftBins_

std::vector<float, cms::cuda::HostAllocator<float> > EcalTimeBiasCorrectionsGPU::eeTimeCorrShiftBins_
private

Definition at line 42 of file EcalTimeBiasCorrectionsGPU.h.

Referenced by EcalTimeBiasCorrectionsGPU(), and getProduct().

◆ product_

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

Definition at line 45 of file EcalTimeBiasCorrectionsGPU.h.

Referenced by getProduct().

EcalTimeBiasCorrectionsGPU::eeTimeCorrAmplitudeBins_
std::vector< float, cms::cuda::HostAllocator< float > > eeTimeCorrAmplitudeBins_
Definition: EcalTimeBiasCorrectionsGPU.h:41
EcalTimeBiasCorrectionsGPU::Product::ebTimeCorrShiftBins
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > ebTimeCorrShiftBins
Definition: EcalTimeBiasCorrectionsGPU.h:17
EcalTimeBiasCorrectionsGPU::Product::eeTimeCorrAmplitudeBins
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > eeTimeCorrAmplitudeBins
Definition: EcalTimeBiasCorrectionsGPU.h:18
EcalTimeBiasCorrectionsGPU::Product::eeTimeCorrShiftBins
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > eeTimeCorrShiftBins
Definition: EcalTimeBiasCorrectionsGPU.h:19
EcalTimeBiasCorrectionsGPU::ebTimeCorrAmplitudeBins_
std::vector< float, cms::cuda::HostAllocator< float > > ebTimeCorrAmplitudeBins_
Definition: EcalTimeBiasCorrectionsGPU.h:39
EcalTimeBiasCorrectionsGPU::Product::eeTimeCorrAmplitudeBinsSize
int eeTimeCorrAmplitudeBinsSize
Definition: EcalTimeBiasCorrectionsGPU.h:20
EcalTimeBiasCorrectionsGPU::Product::ebTimeCorrAmplitudeBinsSize
int ebTimeCorrAmplitudeBinsSize
Definition: EcalTimeBiasCorrectionsGPU.h:20
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
EcalTimeBiasCorrectionsGPU::Product
Definition: EcalTimeBiasCorrectionsGPU.h:15
EcalTimeBiasCorrectionsGPU::Product::ebTimeCorrAmplitudeBins
edm::propagate_const_array< cms::cuda::device::unique_ptr< float[]> > ebTimeCorrAmplitudeBins
Definition: EcalTimeBiasCorrectionsGPU.h:16
EcalTimeBiasCorrectionsGPU::ebTimeCorrShiftBins_
std::vector< float, cms::cuda::HostAllocator< float > > ebTimeCorrShiftBins_
Definition: EcalTimeBiasCorrectionsGPU.h:40
EcalTimeBiasCorrectionsGPU::eeTimeCorrShiftBins_
std::vector< float, cms::cuda::HostAllocator< float > > eeTimeCorrShiftBins_
Definition: EcalTimeBiasCorrectionsGPU.h:42
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalTimeBiasCorrectionsGPU::product_
cms::cuda::ESProduct< Product > product_
Definition: EcalTimeBiasCorrectionsGPU.h:45
cms::cuda::copyAsync
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20