CMS 3D CMS Logo

SiStripDelay.h
Go to the documentation of this file.
1 #ifndef SiStripObjects_SiStripDelay_h
2 #define SiStripObjects_SiStripDelay_h
3 // -*- C++ -*-
4 //
5 // Package: SiStripObjects
6 // Class : SiStripDelay
7 //
28 #include <vector>
29 #include <memory>
30 #include <boost/unordered_map.hpp>
31 
33 {
34  public:
36  virtual ~SiStripDelay() {};
37 
38  SiStripDelay(const SiStripDelay&) = delete;
39  const SiStripDelay& operator=(const SiStripDelay&) = delete;
40 
41  inline SiStripDelay(const SiStripBaseDelay& baseDelay, const int sumSign,
42  const std::pair<std::string, std::string> & recordLabelPair)
43  {
44  fillNewDelay(baseDelay, sumSign, recordLabelPair);
45  }
46 
47  void fillNewDelay(const SiStripBaseDelay& baseDelay, const int sumSign,
48  const std::pair<std::string, std::string> & recordLabelPair);
49 
51  float getDelay(const uint32_t detId) const;
52 
54  bool makeDelay();
55 
57  void clear();
58 
65  inline const SiStripBaseDelay * getBaseDelay(const uint32_t index) const
66  {
67  return baseDelayVector_[index];
68  }
69 
70  inline size_t getNumberOfTags() const
71  {
72  return baseDelayVector_.size();
73  }
74  inline std::string getRcdName(const uint32_t index) const
75  {
76  return recordLabelPair_[index].first;
77  }
78  inline std::string getLabelName(const uint32_t index) const
79  {
80  return recordLabelPair_[index].second;
81  }
82  inline int getTagSign(const uint32_t index) const
83  {
84  return sumSignVector_[index];
85  }
86 
88  void printSummary(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
90  void printDebug(std::stringstream& ss, const TrackerTopology* tTopo) const;
91 
92  private:
93  // ---------- member data --------------------------------
94 
95  std::vector<const SiStripBaseDelay *> baseDelayVector_;
96  std::vector<int> sumSignVector_;
97  std::vector<std::pair<std::string, std::string> > recordLabelPair_;
98  boost::unordered_map<uint32_t, double> delays_;
99 };
100 
101 #endif
void fillNewDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
Definition: SiStripDelay.cc:18
std::vector< std::pair< std::string, std::string > > recordLabelPair_
Definition: SiStripDelay.h:97
std::vector< const SiStripBaseDelay * > baseDelayVector_
Definition: SiStripDelay.h:95
std::string getLabelName(const uint32_t index) const
Definition: SiStripDelay.h:78
int getTagSign(const uint32_t index) const
Definition: SiStripDelay.h:82
std::string getRcdName(const uint32_t index) const
Definition: SiStripDelay.h:74
bool makeDelay()
Builds the boost::unordered_map.
Definition: SiStripDelay.cc:35
boost::unordered_map< uint32_t, double > delays_
Definition: SiStripDelay.h:98
float getDelay(const uint32_t detId) const
Return the delay combining all the baseDelays.
Definition: SiStripDelay.cc:26
const SiStripBaseDelay * getBaseDelay(const uint32_t index) const
Definition: SiStripDelay.h:65
size_t getNumberOfTags() const
Definition: SiStripDelay.h:70
void clear()
Empty all the containers.
virtual ~SiStripDelay()
Definition: SiStripDelay.h:36
const SiStripDelay & operator=(const SiStripDelay &)=delete
std::vector< int > sumSignVector_
Definition: SiStripDelay.h:96
void printDebug(std::stringstream &ss, const TrackerTopology *tTopo) const
Prints the delays for all the detIds.
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints the average value of the delays for all layers and wheels in the SiStripTracker.
SiStripDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
Definition: SiStripDelay.h:41