CMS 3D CMS Logo

SiPixelROCsStatusAndMappingWrapper.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiPixelESProducers_interface_SiPixelROCsStatusAndMappingWrapper_h
2 #define CalibTracker_SiPixelESProducers_interface_SiPixelROCsStatusAndMappingWrapper_h
3 
4 #include <set>
5 
6 #include <cuda_runtime.h>
7 
12 
14 class TrackerGeometry;
15 class SiPixelQuality;
16 
18 public:
20  TrackerGeometry const &trackerGeom,
21  SiPixelQuality const *badPixelInfo);
23 
24  bool hasQuality() const { return hasQuality_; }
25 
26  // returns pointer to GPU memory
27  const SiPixelROCsStatusAndMapping *getGPUProductAsync(cudaStream_t cudaStream) const;
28 
29  // returns pointer to GPU memory
30  const unsigned char *getModToUnpAllAsync(cudaStream_t cudaStream) const;
32  cudaStream_t cudaStream) const;
33 
34 private:
36  std::vector<unsigned char, cms::cuda::HostAllocator<unsigned char>> modToUnpDefault;
37  unsigned int size;
39 
40  SiPixelROCsStatusAndMapping *cablingMapHost = nullptr; // pointer to struct in CPU
41 
42  struct GPUData {
43  ~GPUData();
44  SiPixelROCsStatusAndMapping *cablingMapDevice = nullptr; // pointer to struct in GPU
45  };
47 
48  struct ModulesToUnpack {
50  unsigned char *modToUnpDefault = nullptr; // pointer to GPU
51  };
53 };
54 
55 #endif // CalibTracker_SiPixelESProducers_interface_SiPixelROCsStatusAndMappingWrapper_h
SiPixelROCsStatusAndMappingWrapper::ModulesToUnpack::modToUnpDefault
unsigned char * modToUnpDefault
Definition: SiPixelROCsStatusAndMappingWrapper.h:50
SiPixelROCsStatusAndMappingWrapper::cablingMap_
const SiPixelFedCablingMap * cablingMap_
Definition: SiPixelROCsStatusAndMappingWrapper.h:35
SiPixelROCsStatusAndMappingWrapper::getGPUProductAsync
const SiPixelROCsStatusAndMapping * getGPUProductAsync(cudaStream_t cudaStream) const
Definition: SiPixelROCsStatusAndMappingWrapper.cc:106
modules
Definition: MuonCleanerBySegments.cc:35
HostAllocator.h
SiPixelROCsStatusAndMappingWrapper
Definition: SiPixelROCsStatusAndMappingWrapper.h:17
SiPixelROCsStatusAndMapping.h
device_unique_ptr.h
SiPixelROCsStatusAndMappingWrapper::hasQuality_
bool hasQuality_
Definition: SiPixelROCsStatusAndMappingWrapper.h:38
SiPixelROCsStatusAndMappingWrapper::~SiPixelROCsStatusAndMappingWrapper
~SiPixelROCsStatusAndMappingWrapper()
Definition: SiPixelROCsStatusAndMappingWrapper.cc:104
SiPixelROCsStatusAndMappingWrapper::getModToUnpRegionalAsync
cms::cuda::device::unique_ptr< unsigned char[]> getModToUnpRegionalAsync(std::set< unsigned int > const &modules, cudaStream_t cudaStream) const
Definition: SiPixelROCsStatusAndMappingWrapper.cc:132
SiPixelROCsStatusAndMappingWrapper::cablingMapHost
SiPixelROCsStatusAndMapping * cablingMapHost
Definition: SiPixelROCsStatusAndMappingWrapper.h:40
cms::cuda::ESProduct
Definition: ESProduct.h:19
SiPixelROCsStatusAndMappingWrapper::SiPixelROCsStatusAndMappingWrapper
SiPixelROCsStatusAndMappingWrapper(SiPixelFedCablingMap const &cablingMap, TrackerGeometry const &trackerGeom, SiPixelQuality const *badPixelInfo)
Definition: SiPixelROCsStatusAndMappingWrapper.cc:23
SiPixelQuality
Definition: SiPixelQuality.h:27
SiPixelROCsStatusAndMappingWrapper::size
unsigned int size
Definition: SiPixelROCsStatusAndMappingWrapper.h:37
SiPixelFedCablingMap
Definition: SiPixelFedCablingMap.h:19
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
SiPixelROCsStatusAndMappingWrapper::hasQuality
bool hasQuality() const
Definition: SiPixelROCsStatusAndMappingWrapper.h:24
SiPixelROCsStatusAndMappingWrapper::GPUData::~GPUData
~GPUData()
Definition: SiPixelROCsStatusAndMappingWrapper.cc:169
SiPixelROCsStatusAndMappingWrapper::ModulesToUnpack::~ModulesToUnpack
~ModulesToUnpack()
Definition: SiPixelROCsStatusAndMappingWrapper.cc:171
SiPixelROCsStatusAndMappingWrapper::modToUnpDefault
std::vector< unsigned char, cms::cuda::HostAllocator< unsigned char > > modToUnpDefault
Definition: SiPixelROCsStatusAndMappingWrapper.h:36
SiPixelROCsStatusAndMappingWrapper::ModulesToUnpack
Definition: SiPixelROCsStatusAndMappingWrapper.h:48
SiPixelROCsStatusAndMappingWrapper::modToUnp_
cms::cuda::ESProduct< ModulesToUnpack > modToUnp_
Definition: SiPixelROCsStatusAndMappingWrapper.h:52
SiPixelROCsStatusAndMappingWrapper::GPUData
Definition: SiPixelROCsStatusAndMappingWrapper.h:42
SiPixelROCsStatusAndMappingWrapper::gpuData_
cms::cuda::ESProduct< GPUData > gpuData_
Definition: SiPixelROCsStatusAndMappingWrapper.h:46
SiPixelROCsStatusAndMapping
Definition: SiPixelROCsStatusAndMapping.h:14
ESProduct.h
SiPixelROCsStatusAndMappingWrapper::GPUData::cablingMapDevice
SiPixelROCsStatusAndMapping * cablingMapDevice
Definition: SiPixelROCsStatusAndMappingWrapper.h:44
SiPixelROCsStatusAndMappingWrapper::getModToUnpAllAsync
const unsigned char * getModToUnpAllAsync(cudaStream_t cudaStream) const
Definition: SiPixelROCsStatusAndMappingWrapper.cc:119
TrackerGeometry
Definition: TrackerGeometry.h:14