CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  inline SiStripDelay(const SiStripBaseDelay& baseDelay, const int sumSign,
39  const std::pair<std::string, std::string> & recordLabelPair)
40  {
41  fillNewDelay(baseDelay, sumSign, recordLabelPair);
42  }
43 
44  void fillNewDelay(const SiStripBaseDelay& baseDelay, const int sumSign,
45  const std::pair<std::string, std::string> & recordLabelPair);
46 
48  float getDelay(const uint32_t detId) const;
49 
51  bool makeDelay();
52 
54  void clear();
55 
62  inline const SiStripBaseDelay * getBaseDelay(const uint32_t index) const
63  {
64  return baseDelayVector_[index];
65  }
66 
67  inline size_t getNumberOfTags() const
68  {
69  return baseDelayVector_.size();
70  }
71  inline std::string getRcdName(const uint32_t index) const
72  {
73  return recordLabelPair_[index].first;
74  }
75  inline std::string getLabelName(const uint32_t index) const
76  {
77  return recordLabelPair_[index].second;
78  }
79  inline int getTagSign(const uint32_t index) const
80  {
81  return sumSignVector_[index];
82  }
83 
85  void printSummary(std::stringstream& ss) const;
87  void printDebug(std::stringstream& ss) const;
88 
89  private:
90 
91  SiStripDelay(const SiStripDelay&); // stop default
92  const SiStripDelay& operator=(const SiStripDelay&); // stop default
93 
94  // ---------- member data --------------------------------
95 
96  std::vector<const SiStripBaseDelay *> baseDelayVector_;
97  std::vector<int> sumSignVector_;
98  std::vector<std::pair<std::string, std::string> > recordLabelPair_;
99  boost::unordered_map<uint32_t, double> delays_;
100 };
101 
102 #endif
void printSummary(std::stringstream &ss) const
Prints the average value of the delays for all layers and wheels in the SiStripTracker.
void fillNewDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
Definition: SiStripDelay.cc:19
std::vector< std::pair< std::string, std::string > > recordLabelPair_
Definition: SiStripDelay.h:98
std::vector< const SiStripBaseDelay * > baseDelayVector_
Definition: SiStripDelay.h:96
std::string getLabelName(const uint32_t index) const
Definition: SiStripDelay.h:75
void printDebug(std::stringstream &ss) const
Prints the delays for all the detIds.
int getTagSign(const uint32_t index) const
Definition: SiStripDelay.h:79
std::string getRcdName(const uint32_t index) const
Definition: SiStripDelay.h:71
bool makeDelay()
Builds the boost::unordered_map.
Definition: SiStripDelay.cc:36
const SiStripDelay & operator=(const SiStripDelay &)
boost::unordered_map< uint32_t, double > delays_
Definition: SiStripDelay.h:99
float getDelay(const uint32_t detId) const
Return the delay combining all the baseDelays.
Definition: SiStripDelay.cc:27
const SiStripBaseDelay * getBaseDelay(const uint32_t index) const
Definition: SiStripDelay.h:62
size_t getNumberOfTags() const
Definition: SiStripDelay.h:67
void clear()
Empty all the containers.
virtual ~SiStripDelay()
Definition: SiStripDelay.h:36
std::vector< int > sumSignVector_
Definition: SiStripDelay.h:97
SiStripDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
Definition: SiStripDelay.h:38