File indexing completed on 2024-04-06 12:10:42
0001 #ifndef EventFilter_HcalRawToDigi_plugins_ElectronicsMappingGPU_h
0002 #define EventFilter_HcalRawToDigi_plugins_ElectronicsMappingGPU_h
0003
0004 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
0005
0006 #ifndef __CUDACC__
0007 #include "HeterogeneousCore/CUDACore/interface/ESProduct.h"
0008 #include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
0009 #endif
0010
0011 namespace hcal {
0012 namespace raw {
0013
0014 class ElectronicsMappingGPU {
0015 public:
0016 struct Product {
0017 ~Product();
0018
0019 uint32_t *eid2tid;
0020
0021 uint32_t *eid2did;
0022 };
0023
0024 #ifndef __CUDACC__
0025
0026
0027 ElectronicsMappingGPU(HcalElectronicsMap const &);
0028
0029
0030 ~ElectronicsMappingGPU() = default;
0031
0032
0033 Product const &getProduct(cudaStream_t) const;
0034
0035 private:
0036
0037
0038 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> eid2tid_;
0039 std::vector<uint32_t, cms::cuda::HostAllocator<uint32_t>> eid2did_;
0040
0041 cms::cuda::ESProduct<Product> product_;
0042 #endif
0043 };
0044
0045 }
0046 }
0047
0048 #endif