File indexing completed on 2024-04-06 11:58:18
0001 #ifndef SiStripObjects_SiStripDelay_h
0002 #define SiStripObjects_SiStripDelay_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #include "CondFormats/SiStripObjects/interface/SiStripBaseDelay.h"
0029 #include <memory>
0030 #include <unordered_map>
0031 #include <vector>
0032
0033 class SiStripDelay {
0034 public:
0035 SiStripDelay(){};
0036 virtual ~SiStripDelay(){};
0037
0038 SiStripDelay(const SiStripDelay &) = delete;
0039 const SiStripDelay &operator=(const SiStripDelay &) = delete;
0040
0041 inline SiStripDelay(const SiStripBaseDelay &baseDelay,
0042 const int sumSign,
0043 const std::pair<std::string, std::string> &recordLabelPair) {
0044 fillNewDelay(baseDelay, sumSign, recordLabelPair);
0045 }
0046
0047 void fillNewDelay(const SiStripBaseDelay &baseDelay,
0048 const int sumSign,
0049 const std::pair<std::string, std::string> &recordLabelPair);
0050
0051
0052 float getDelay(const uint32_t detId) const;
0053
0054
0055 bool makeDelay();
0056
0057
0058 void clear();
0059
0060
0061
0062
0063
0064
0065
0066 inline const SiStripBaseDelay *getBaseDelay(const uint32_t index) const { return baseDelayVector_[index]; }
0067
0068 inline size_t getNumberOfTags() const { return baseDelayVector_.size(); }
0069 inline std::string getRcdName(const uint32_t index) const { return recordLabelPair_[index].first; }
0070 inline std::string getLabelName(const uint32_t index) const { return recordLabelPair_[index].second; }
0071 inline int getTagSign(const uint32_t index) const { return sumSignVector_[index]; }
0072
0073
0074
0075 void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const;
0076
0077 void printDebug(std::stringstream &ss, const TrackerTopology *tTopo) const;
0078
0079 private:
0080
0081
0082 std::vector<const SiStripBaseDelay *> baseDelayVector_;
0083 std::vector<int> sumSignVector_;
0084 std::vector<std::pair<std::string, std::string>> recordLabelPair_;
0085 std::unordered_map<uint32_t, double> delays_;
0086 };
0087
0088 #endif