CMS 3D CMS Logo

SiPixelDigisHost.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiPixelDigiSoA_interface_SiPixelDigisHost_h
2 #define DataFormats_SiPixelDigiSoA_interface_SiPixelDigisHost_h
3 
6 
7 // TODO: The class is created via inheritance of the PortableDeviceCollection.
8 // This is generally discouraged, and should be done via composition.
9 // See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
10 class SiPixelDigisHost : public PortableHostCollection<SiPixelDigisSoA> {
11 public:
12  SiPixelDigisHost() = default;
13  template <typename TQueue>
14  explicit SiPixelDigisHost(size_t maxFedWords, TQueue queue)
15  : PortableHostCollection<SiPixelDigisSoA>(maxFedWords + 1, queue) {}
16 
17  void setNModulesDigis(uint32_t nModules, uint32_t nDigis) {
19  nDigis_h = nDigis;
20  }
21 
22  uint32_t nModules() const { return nModules_h; }
23  uint32_t nDigis() const { return nDigis_h; }
24 
25 private:
26  uint32_t nModules_h = 0;
27  uint32_t nDigis_h = 0;
28 };
29 
30 #endif // DataFormats_SiPixelDigiSoA_interface_SiPixelDigisHost_h
uint32_t nDigis() const
uint32_t nModules() const
SiPixelDigisHost(size_t maxFedWords, TQueue queue)
void setNModulesDigis(uint32_t nModules, uint32_t nDigis)
SiPixelDigisHost()=default