CMS 3D CMS Logo

SiStripDetInfo.h
Go to the documentation of this file.
1 #ifndef CalibFormats_SiStripObjects_SiStripDetInfo_h
2 #define CalibFormats_SiStripObjects_SiStripDetInfo_h
3 // -*- C++ -*-
4 //
5 // Package: CalibFormats/SiStripObjects
6 // Class : SiStripDetInfo
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Fri, 28 May 2021 20:02:00 GMT
19 //
20 
21 // system include files
22 
23 // user include files
24 #include <map>
25 #include <vector>
26 #include <cstdint>
27 // forward declarations
28 
30 public:
31  struct DetInfo {
32  DetInfo() {}
33  DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
34  : nApvs(_nApvs), stripLength(_stripLength), thickness(_thickness) {}
35 
36  unsigned short nApvs;
37  double stripLength;
38  float thickness;
39  };
40 
41  SiStripDetInfo(std::map<uint32_t, DetInfo> iDetData, std::vector<uint32_t> iIDs) noexcept
42  : detData_{std::move(iDetData)}, detIds_{std::move(iIDs)} {}
43 
44  SiStripDetInfo() = default;
45  ~SiStripDetInfo() = default;
46 
47  SiStripDetInfo(const SiStripDetInfo&) = default;
48  SiStripDetInfo& operator=(const SiStripDetInfo&) = default;
49  SiStripDetInfo(SiStripDetInfo&&) = default;
51 
52  // ---------- const member functions ---------------------
53  const std::vector<uint32_t>& getAllDetIds() const noexcept { return detIds_; }
54 
55  const std::pair<unsigned short, double> getNumberOfApvsAndStripLength(uint32_t detId) const;
56 
57  const float& getThickness(uint32_t detId) const;
58 
59  const std::map<uint32_t, DetInfo>& getAllData() const noexcept { return detData_; }
60 
61  // ---------- static member functions --------------------
62 
63  // ---------- member functions ---------------------------
64 
65 private:
66  // ---------- member data --------------------------------
67  std::map<uint32_t, DetInfo> detData_;
68  std::vector<uint32_t> detIds_;
69 };
70 
71 #endif
std::map< uint32_t, DetInfo > detData_
std::vector< uint32_t > detIds_
SiStripDetInfo()=default
DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
~SiStripDetInfo()=default
SiStripDetInfo & operator=(const SiStripDetInfo &)=default
const std::map< uint32_t, DetInfo > & getAllData() const noexcept
SiStripDetInfo(std::map< uint32_t, DetInfo > iDetData, std::vector< uint32_t > iIDs) noexcept
const std::vector< uint32_t > & getAllDetIds() const noexcept
def move(src, dest)
Definition: eostools.py:511
const float & getThickness(uint32_t detId) const