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 //
29 #include <memory>
30 #include <unordered_map>
31 #include <vector>
32 
33 class SiStripDelay {
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,
42  const int sumSign,
43  const std::pair<std::string, std::string> &recordLabelPair) {
44  fillNewDelay(baseDelay, sumSign, recordLabelPair);
45  }
46 
47  void fillNewDelay(const SiStripBaseDelay &baseDelay,
48  const int sumSign,
49  const std::pair<std::string, std::string> &recordLabelPair);
50 
52  float getDelay(const uint32_t detId) const;
53 
55  bool makeDelay();
56 
58  void clear();
59 
66  inline const SiStripBaseDelay *getBaseDelay(const uint32_t index) const { return baseDelayVector_[index]; }
67 
68  inline size_t getNumberOfTags() const { return baseDelayVector_.size(); }
69  inline std::string getRcdName(const uint32_t index) const { return recordLabelPair_[index].first; }
70  inline std::string getLabelName(const uint32_t index) const { return recordLabelPair_[index].second; }
71  inline int getTagSign(const uint32_t index) const { return sumSignVector_[index]; }
72 
75  void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const;
77  void printDebug(std::stringstream &ss, const TrackerTopology *tTopo) const;
78 
79 private:
80  // ---------- member data --------------------------------
81 
82  std::vector<const SiStripBaseDelay *> baseDelayVector_;
83  std::vector<int> sumSignVector_;
84  std::vector<std::pair<std::string, std::string>> recordLabelPair_;
85  std::unordered_map<uint32_t, double> delays_;
86 };
87 
88 #endif
SiStripDelay::makeDelay
bool makeDelay()
Builds the boost::unordered_map.
Definition: SiStripDelay.cc:34
SiStripDelay::sumSignVector_
std::vector< int > sumSignVector_
Definition: SiStripDelay.h:83
TrackerTopology
Definition: TrackerTopology.h:16
SiStripDelay::printSummary
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Definition: SiStripDelay.cc:125
SiStripBaseDelay
Definition: SiStripBaseDelay.h:23
SiStripDelay::clear
void clear()
Empty all the containers.
Definition: SiStripDelay.cc:111
SiStripDelay::getRcdName
std::string getRcdName(const uint32_t index) const
Definition: SiStripDelay.h:69
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripDelay::baseDelayVector_
std::vector< const SiStripBaseDelay * > baseDelayVector_
Definition: SiStripDelay.h:82
SiStripDelay::operator=
const SiStripDelay & operator=(const SiStripDelay &)=delete
SiStripDelay::getNumberOfTags
size_t getNumberOfTags() const
Definition: SiStripDelay.h:68
SiStripDelay::SiStripDelay
SiStripDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
Definition: SiStripDelay.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripDelay::delays_
std::unordered_map< uint32_t, double > delays_
Definition: SiStripDelay.h:85
SiStripBaseDelay.h
SiStripDelay::getDelay
float getDelay(const uint32_t detId) const
Return the delay combining all the baseDelays.
Definition: SiStripDelay.cc:26
SiStripDelay::fillNewDelay
void fillNewDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
Definition: SiStripDelay.cc:18
SiStripDelay::SiStripDelay
SiStripDelay()
Definition: SiStripDelay.h:35
SiStripDelay::printDebug
void printDebug(std::stringstream &ss, const TrackerTopology *tTopo) const
Prints the delays for all the detIds.
Definition: SiStripDelay.cc:118
SiStripDelay::~SiStripDelay
virtual ~SiStripDelay()
Definition: SiStripDelay.h:36
SiStripDelay::recordLabelPair_
std::vector< std::pair< std::string, std::string > > recordLabelPair_
Definition: SiStripDelay.h:84
SiStripDelay::getLabelName
std::string getLabelName(const uint32_t index) const
Definition: SiStripDelay.h:70
SiStripDelay
Definition: SiStripDelay.h:33
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
SiStripDelay::getBaseDelay
const SiStripBaseDelay * getBaseDelay(const uint32_t index) const
Definition: SiStripDelay.h:66
SiStripDelay::getTagSign
int getTagSign(const uint32_t index) const
Definition: SiStripDelay.h:71