Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:35:10

0001 #ifndef CalibTracker_SiPixelESProducers_interface_SiPixelGainCalibrationForHLTGPU_h
0002 #define CalibTracker_SiPixelESProducers_interface_SiPixelGainCalibrationForHLTGPU_h
0003 
0004 #include "CondFormats/SiPixelObjects/interface/SiPixelGainCalibrationForHLT.h"
0005 #include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
0006 
0007 class SiPixelGainCalibrationForHLT;
0008 class SiPixelGainForHLTonGPU;
0009 struct SiPixelGainForHLTonGPU_DecodingStructure;
0010 class TrackerGeometry;
0011 
0012 class SiPixelGainCalibrationForHLTGPU {
0013 public:
0014   explicit SiPixelGainCalibrationForHLTGPU(const SiPixelGainCalibrationForHLT &gains, const TrackerGeometry &geom);
0015   ~SiPixelGainCalibrationForHLTGPU();
0016 
0017   const SiPixelGainForHLTonGPU *getGPUProductAsync(cudaStream_t cudaStream) const;
0018   const SiPixelGainForHLTonGPU *cpuProduct() const { return gainForHLTonHost_; }
0019   const SiPixelGainCalibrationForHLT *originalProduct() { return gains_; }
0020 
0021 private:
0022   const SiPixelGainCalibrationForHLT *gains_ = nullptr;
0023   SiPixelGainForHLTonGPU *gainForHLTonHost_ = nullptr;
0024   struct GPUData {
0025     ~GPUData();
0026     SiPixelGainForHLTonGPU *gainForHLTonGPU = nullptr;
0027     SiPixelGainForHLTonGPU_DecodingStructure *gainDataOnGPU = nullptr;
0028   };
0029   cms::cuda::ESProduct<GPUData> gpuData_;
0030 };
0031 
0032 #endif  // CalibTracker_SiPixelESProducers_interface_SiPixelGainCalibrationForHLTGPU_h