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 <boost/cstdint.hpp>
7 #include <sstream>
8 #include <string>
9 #include <vector>
10 
19 
20  public:
21 
22  // ---------- con(de)structors ----------
23 
24  CommissioningAnalysis( const uint32_t& key,
25  const std::string& my_name );
26 
27  CommissioningAnalysis( const std::string& my_name );
28 
29  virtual ~CommissioningAnalysis() {;}
30 
31  // ---------- typedefs ----------
32 
33  typedef std::vector<float> VFloat;
34 
35  typedef std::vector<VFloat> VVFloat;
36 
37  typedef std::vector<uint16_t> VInt;
38 
39  typedef std::vector<VInt> VVInt;
40 
41  typedef std::vector<std::string> VString;
42 
43  // ---------- public interface ----------
44 
46  virtual bool isValid() const { return true; }
47 
49  inline const VString& getErrorCodes() const;
50 
52  inline const uint32_t& fecKey() const;
53 
55  inline const uint32_t& fedKey() const;
56 
58  inline const uint32_t& dcuId() const;
59 
61  inline const uint32_t& detId() const;
62 
63  // ---------- public print methods ----------
64 
66  inline const std::string& myName() const;
67 
69  virtual void print( std::stringstream&, uint32_t not_used = 0 ) = 0;
70 
72  virtual void header( std::stringstream& ) const;
73 
75  virtual void summary( std::stringstream& ) const;
76 
77  // ---------- public setter methods ----------
78 
80  inline void fecKey( const uint32_t& );
81 
83  inline void fedKey( const uint32_t& );
84 
86  inline void dcuId( const uint32_t& );
87 
89  inline void detId( const uint32_t& );
90 
92  inline void setErrorCodes( const VString& errors );
93 
95  inline virtual void addErrorCode( const std::string& error );
96 
98  virtual void reset() = 0;
99 
100  // ---------- private methods ----------
101 
102  private:
103 
106 
107  // ---------- private member data ----------
108 
109  private:
110 
112  uint32_t fecKey_;
113 
115  uint32_t fedKey_;
116 
118  uint32_t dcuId_;
119 
121  uint32_t detId_;
122 
125 
127  VString errors_;
128 
129 };
130 
131 // ---------- inline methods ----------
132 
134 
135 const uint32_t& CommissioningAnalysis::fecKey() const { return fecKey_; }
136 const uint32_t& CommissioningAnalysis::fedKey() const { return fedKey_; }
137 
138 const uint32_t& CommissioningAnalysis::dcuId() const { return dcuId_; }
139 const uint32_t& CommissioningAnalysis::detId() const { return detId_; }
140 
142 
143 void CommissioningAnalysis::fecKey( const uint32_t& key ) { fecKey_ = key; }
144 void CommissioningAnalysis::fedKey( const uint32_t& key ) { fedKey_ = key; }
145 
146 void CommissioningAnalysis::dcuId( const uint32_t& dcu_id ) { dcuId_ = dcu_id; }
147 void CommissioningAnalysis::detId( const uint32_t& det_id ) { detId_ = det_id; }
148 
150 void CommissioningAnalysis::addErrorCode( const std::string& error ) { errors_.push_back(error) ;}
151 
152 #endif // CondFormats_SiStripObjects_CommissioningAnalysis_H
153 
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
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< 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