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
SiStripDetInfo::getAllDetIds
const std::vector< uint32_t > & getAllDetIds() const noexcept
Definition: SiStripDetInfo.h:53
SiStripDetInfo::operator=
SiStripDetInfo & operator=(const SiStripDetInfo &)=default
SiStripDetInfo::~SiStripDetInfo
~SiStripDetInfo()=default
SiStripDetInfo::DetInfo::DetInfo
DetInfo()
Definition: SiStripDetInfo.h:32
watchdog.const
const
Definition: watchdog.py:83
SiStripDetInfo::SiStripDetInfo
SiStripDetInfo(std::map< uint32_t, DetInfo > iDetData, std::vector< uint32_t > iIDs) noexcept
Definition: SiStripDetInfo.h:41
SiStripDetInfo::DetInfo::nApvs
unsigned short nApvs
Definition: SiStripDetInfo.h:34
SiStripDetInfo::getNumberOfApvsAndStripLength
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Definition: SiStripDetInfo.cc:19
SiStripDetInfo::getAllData
const std::map< uint32_t, DetInfo > & getAllData() const noexcept
Definition: SiStripDetInfo.h:59
SiStripDetInfo::getThickness
const float & getThickness(uint32_t detId) const
Definition: SiStripDetInfo.cc:35
SiStripDetInfo::DetInfo
Definition: SiStripDetInfo.h:31
SiStripDetInfo::detData_
std::map< uint32_t, DetInfo > detData_
Definition: SiStripDetInfo.h:67
SiStripDetInfo::DetInfo::stripLength
double stripLength
Definition: SiStripDetInfo.h:37
eostools.move
def move(src, dest)
Definition: eostools.py:511
SiStripDetInfo::detIds_
std::vector< uint32_t > detIds_
Definition: SiStripDetInfo.h:68
SiStripDetInfo
Definition: SiStripDetInfo.h:29
SiStripDetInfo::SiStripDetInfo
SiStripDetInfo()=default
SiStripDetInfo::DetInfo::thickness
float thickness
Definition: SiStripDetInfo.h:38
SiStripDetInfo::DetInfo::DetInfo
DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
Definition: SiStripDetInfo.h:33