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 setNModules(uint32_t nModules) { nModules_h = nModules; }
18 
19  uint32_t nModules() const { return nModules_h; }
20  uint32_t nDigis() const { return view().metadata().size() - 1; }
21 
22 private:
23  uint32_t nModules_h = 0;
24 };
25 
26 #endif // DataFormats_SiPixelDigiSoA_interface_SiPixelDigisHost_h
uint32_t nDigis() const
uint32_t nModules() const
SiPixelDigisHost(size_t maxFedWords, TQueue queue)
SiPixelDigisHost()=default
void setNModules(uint32_t nModules)