File indexing completed on 2023-03-17 10:47:37
0001 #ifndef CondFormats_SiStripObjects_FastFedCablingAnalysis_H
0002 #define CondFormats_SiStripObjects_FastFedCablingAnalysis_H
0003
0004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include <sstream>
0007 #include <vector>
0008 #include <map>
0009 #include <cstdint>
0010
0011
0012
0013
0014
0015
0016 class FastFedCablingAnalysis : public CommissioningAnalysis {
0017 public:
0018
0019
0020 FastFedCablingAnalysis(const uint32_t& key);
0021
0022 FastFedCablingAnalysis();
0023
0024 ~FastFedCablingAnalysis() override { ; }
0025
0026 typedef std::map<uint32_t, uint16_t> Candidates;
0027
0028 friend class FastFedCablingAlgorithm;
0029
0030
0031
0032
0033 bool isValid() const override;
0034
0035
0036 bool isDirty() const;
0037
0038
0039 bool badTrimDac() const;
0040
0041
0042 inline const uint32_t& dcuHardId() const;
0043
0044
0045 inline const uint16_t& lldCh() const;
0046
0047
0048 inline const float& highLevel() const;
0049
0050
0051 inline const float& highRms() const;
0052
0053
0054 inline const float& lowLevel() const;
0055
0056
0057 inline const float& lowRms() const;
0058
0059
0060 inline const float& max() const;
0061
0062
0063 inline const float& min() const;
0064
0065
0066
0067
0068 void print(std::stringstream&, uint32_t not_used = 0) override;
0069
0070
0071 void header(std::stringstream&) const override;
0072
0073
0074 void summary(std::stringstream&) const override;
0075
0076
0077 void reset() override;
0078
0079
0080
0081 public:
0082
0083 static const float threshold_;
0084
0085
0086 static const float dirtyThreshold_;
0087
0088
0089 static const float trimDacThreshold_;
0090
0091
0092 static const uint16_t nBitsForDcuId_;
0093
0094
0095 static const uint16_t nBitsForLldCh_;
0096
0097
0098
0099 private:
0100
0101 uint32_t dcuHardId_;
0102
0103
0104 uint16_t lldCh_;
0105
0106
0107 float highMedian_;
0108
0109
0110 float highMean_;
0111
0112
0113 float highRms_;
0114
0115
0116 float lowMedian_;
0117
0118
0119 float lowMean_;
0120
0121
0122 float lowRms_;
0123
0124
0125 float range_;
0126
0127
0128 float midRange_;
0129
0130
0131 float max_;
0132
0133
0134 float min_;
0135 };
0136
0137
0138
0139 const uint32_t& FastFedCablingAnalysis::dcuHardId() const { return dcuHardId_; }
0140 const uint16_t& FastFedCablingAnalysis::lldCh() const { return lldCh_; }
0141 const float& FastFedCablingAnalysis::highLevel() const { return highMean_; }
0142 const float& FastFedCablingAnalysis::highRms() const { return highRms_; }
0143 const float& FastFedCablingAnalysis::lowLevel() const { return lowMean_; }
0144 const float& FastFedCablingAnalysis::lowRms() const { return lowRms_; }
0145 const float& FastFedCablingAnalysis::max() const { return max_; }
0146 const float& FastFedCablingAnalysis::min() const { return min_; }
0147
0148 #endif