CMS 3D CMS Logo

CommissioningAnalysis.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiStripObjects_CommissioningAnalysis_H
2 #define CondFormats_SiStripObjects_CommissioningAnalysis_H
3 
6 #include <sstream>
7 #include <string>
8 #include <vector>
9 #include <cstdint>
10 
19 public:
20  // ---------- con(de)structors ----------
21 
22  CommissioningAnalysis(const uint32_t& key, const std::string& my_name);
23 
24  CommissioningAnalysis(const std::string& my_name);
25 
26  virtual ~CommissioningAnalysis() { ; }
27 
28  // ---------- typedefs ----------
29 
30  typedef std::vector<float> VFloat;
31 
32  typedef std::vector<VFloat> VVFloat;
33 
34  typedef std::vector<uint16_t> VInt;
35 
36  typedef std::vector<VInt> VVInt;
37 
38  typedef std::vector<bool> VBool;
39 
40  typedef std::vector<VBool> VVBool;
41 
42  typedef std::vector<std::string> VString;
43 
44  // ---------- public interface ----------
45 
47  virtual bool isValid() const { return true; }
48 
50  inline const VString& getErrorCodes() const;
51 
53  inline const uint32_t& fecKey() const;
54 
56  inline const uint32_t& fedKey() const;
57 
59  inline const uint32_t& dcuId() const;
60 
62  inline const uint32_t& detId() const;
63 
64  // ---------- public print methods ----------
65 
67  inline const std::string& myName() const;
68 
70  virtual void print(std::stringstream&, uint32_t not_used = 0) = 0;
71 
73  virtual void header(std::stringstream&) const;
74 
76  virtual void summary(std::stringstream&) const;
77 
78  // ---------- public setter methods ----------
79 
81  inline void fecKey(const uint32_t&);
82 
84  inline void fedKey(const uint32_t&);
85 
87  inline void dcuId(const uint32_t&);
88 
90  inline void detId(const uint32_t&);
91 
93  inline void setErrorCodes(const VString& errors);
94 
96  inline virtual void addErrorCode(const std::string& error);
97 
99  virtual void reset() = 0;
100 
101  // ---------- private methods ----------
102 
103 private:
106 
107  // ---------- private member data ----------
108 
109 private:
111  uint32_t fecKey_;
112 
114  uint32_t fedKey_;
115 
117  uint32_t dcuId_;
118 
120  uint32_t detId_;
121 
124 
126  VString errors_;
127 };
128 
129 // ---------- inline methods ----------
130 
132 
133 const uint32_t& CommissioningAnalysis::fecKey() const { return fecKey_; }
134 const uint32_t& CommissioningAnalysis::fedKey() const { return fedKey_; }
135 
136 const uint32_t& CommissioningAnalysis::dcuId() const { return dcuId_; }
137 const uint32_t& CommissioningAnalysis::detId() const { return detId_; }
138 
140 
141 void CommissioningAnalysis::fecKey(const uint32_t& key) { fecKey_ = key; }
142 void CommissioningAnalysis::fedKey(const uint32_t& key) { fedKey_ = key; }
143 
144 void CommissioningAnalysis::dcuId(const uint32_t& dcu_id) { dcuId_ = dcu_id; }
145 void CommissioningAnalysis::detId(const uint32_t& det_id) { detId_ = det_id; }
146 
149 
150 #endif // CondFormats_SiStripObjects_CommissioningAnalysis_H
const uint32_t & fedKey() const
virtual void summary(std::stringstream &) const
virtual void reset()=0
virtual bool isValid() const
virtual void print(std::stringstream &, uint32_t not_used=0)=0
std::vector< float > VFloat
const uint32_t & dcuId() const
std::vector< bool > VBool
virtual void addErrorCode(const std::string &error)
const uint32_t & fecKey() const
std::vector< uint16_t > VInt
std::vector< VInt > VVInt
virtual void header(std::stringstream &) const
std::vector< VBool > VVBool
std::vector< std::string > VString
const uint32_t & detId() const
void setErrorCodes(const VString &errors)
std::vector< VFloat > VVFloat
Definition: errors.py:1
Abstract base for derived classes that provide analysis of commissioning histograms.
const VString & getErrorCodes() const
const std::string & myName() const