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
const unsigned char * getModToUnpAllAsync(cudaStream_t cudaStream) const
const SiPixelROCsStatusAndMapping * getGPUProductAsync(cudaStream_t cudaStream) const
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
cms::cuda::ESProduct< ModulesToUnpack > modToUnp_
SiPixelROCsStatusAndMappingWrapper(SiPixelFedCablingMap const &cablingMap, TrackerGeometry const &trackerGeom, SiPixelQuality const *badPixelInfo)
std::vector< unsigned char, cms::cuda::HostAllocator< unsigned char > > modToUnpDefault
cms::cuda::device::unique_ptr< unsigned char[]> getModToUnpRegionalAsync(std::set< unsigned int > const &modules, cudaStream_t cudaStream) const