File indexing completed on 2024-04-06 12:02:38
0001 #ifndef CondFormats_SiStripObjects_CommissioningAnalysis_H
0002 #define CondFormats_SiStripObjects_CommissioningAnalysis_H
0003
0004 #include "DataFormats/SiStripCommon/interface/SiStripFecKey.h"
0005 #include "DataFormats/SiStripCommon/interface/SiStripFedKey.h"
0006 #include <sstream>
0007 #include <string>
0008 #include <vector>
0009 #include <cstdint>
0010
0011
0012
0013
0014
0015
0016
0017
0018 class CommissioningAnalysis {
0019 public:
0020
0021
0022 CommissioningAnalysis(const uint32_t& key, const std::string& my_name);
0023
0024 CommissioningAnalysis(const std::string& my_name);
0025
0026 virtual ~CommissioningAnalysis() { ; }
0027
0028
0029
0030 typedef std::vector<float> VFloat;
0031
0032 typedef std::vector<VFloat> VVFloat;
0033
0034 typedef std::vector<uint16_t> VInt;
0035
0036 typedef std::vector<VInt> VVInt;
0037
0038 typedef std::vector<bool> VBool;
0039
0040 typedef std::vector<VBool> VVBool;
0041
0042 typedef std::vector<std::string> VString;
0043
0044
0045
0046
0047 virtual bool isValid() const { return true; }
0048
0049
0050 inline const VString& getErrorCodes() const;
0051
0052
0053 inline const uint32_t& fecKey() const;
0054
0055
0056 inline const uint32_t& fedKey() const;
0057
0058
0059 inline const uint32_t& dcuId() const;
0060
0061
0062 inline const uint32_t& detId() const;
0063
0064
0065
0066
0067 inline const std::string& myName() const;
0068
0069
0070 virtual void print(std::stringstream&, uint32_t not_used = 0) = 0;
0071
0072
0073 virtual void header(std::stringstream&) const;
0074
0075
0076 virtual void summary(std::stringstream&) const;
0077
0078
0079
0080
0081 inline void fecKey(const uint32_t&);
0082
0083
0084 inline void fedKey(const uint32_t&);
0085
0086
0087 inline void dcuId(const uint32_t&);
0088
0089
0090 inline void detId(const uint32_t&);
0091
0092
0093 inline void setErrorCodes(const VString& errors);
0094
0095
0096 inline virtual void addErrorCode(const std::string& error);
0097
0098
0099 virtual void reset() = 0;
0100
0101
0102
0103 private:
0104
0105 CommissioningAnalysis() { ; }
0106
0107
0108
0109 private:
0110
0111 uint32_t fecKey_;
0112
0113
0114 uint32_t fedKey_;
0115
0116
0117 uint32_t dcuId_;
0118
0119
0120 uint32_t detId_;
0121
0122
0123 std::string myName_;
0124
0125
0126 VString errors_;
0127 };
0128
0129
0130
0131 const CommissioningAnalysis::VString& CommissioningAnalysis::getErrorCodes() const { return errors_; }
0132
0133 const uint32_t& CommissioningAnalysis::fecKey() const { return fecKey_; }
0134 const uint32_t& CommissioningAnalysis::fedKey() const { return fedKey_; }
0135
0136 const uint32_t& CommissioningAnalysis::dcuId() const { return dcuId_; }
0137 const uint32_t& CommissioningAnalysis::detId() const { return detId_; }
0138
0139 const std::string& CommissioningAnalysis::myName() const { return myName_; }
0140
0141 void CommissioningAnalysis::fecKey(const uint32_t& key) { fecKey_ = key; }
0142 void CommissioningAnalysis::fedKey(const uint32_t& key) { fedKey_ = key; }
0143
0144 void CommissioningAnalysis::dcuId(const uint32_t& dcu_id) { dcuId_ = dcu_id; }
0145 void CommissioningAnalysis::detId(const uint32_t& det_id) { detId_ = det_id; }
0146
0147 void CommissioningAnalysis::setErrorCodes(const VString& errors) { errors_ = errors; }
0148 void CommissioningAnalysis::addErrorCode(const std::string& error) { errors_.push_back(error); }
0149
0150 #endif