CMS 3D CMS Logo

SiPixelDigisDevice.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiPixelDigiSoA_interface_SiPixelDigisDevice_h
2 #define DataFormats_SiPixelDigiSoA_interface_SiPixelDigisDevice_h
3 
4 #include <cstdint>
5 
6 #include <alpaka/alpaka.hpp>
7 
11 
12 template <typename TDev>
13 class SiPixelDigisDevice : public PortableDeviceCollection<SiPixelDigisSoA, TDev> {
14 public:
15  SiPixelDigisDevice() = default;
16  template <typename TQueue>
17  explicit SiPixelDigisDevice(size_t maxFedWords, TQueue queue)
18  : PortableDeviceCollection<SiPixelDigisSoA, TDev>(maxFedWords + 1, queue) {}
19 
20  // Constructor which specifies the SoA size
21  explicit SiPixelDigisDevice(size_t maxFedWords, TDev const &device)
22  : PortableDeviceCollection<SiPixelDigisSoA, TDev>(maxFedWords + 1, device) {}
23 
24  void setNModules(uint32_t nModules) { nModules_h = nModules; }
25 
26  uint32_t nModules() const { return nModules_h; }
27  uint32_t nDigis() const { return this->view().metadata().size() - 1; }
28 
29 private:
30  uint32_t nModules_h = 0;
31 };
32 
33 #endif // DataFormats_SiPixelDigiSoA_interface_SiPixelDigisDevice_h
SiPixelDigisDevice(size_t maxFedWords, TDev const &device)
uint32_t nModules() const
void setNModules(uint32_t nModules)
SiPixelDigisDevice()=default
uint32_t nDigis() const
SiPixelDigisDevice(size_t maxFedWords, TQueue queue)