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<bool> VBool;
42 
43  typedef std::vector<VBool> VVBool;
44 
45  typedef std::vector<std::string> VString;
46 
47 
48  // ---------- public interface ----------
49 
51  virtual bool isValid() const { return true; }
52 
54  inline const VString& getErrorCodes() const;
55 
57  inline const uint32_t& fecKey() const;
58 
60  inline const uint32_t& fedKey() const;
61 
63  inline const uint32_t& dcuId() const;
64 
66  inline const uint32_t& detId() const;
67 
68  // ---------- public print methods ----------
69 
71  inline const std::string& myName() const;
72 
74  virtual void print( std::stringstream&, uint32_t not_used = 0 ) = 0;
75 
77  virtual void header( std::stringstream& ) const;
78 
80  virtual void summary( std::stringstream& ) const;
81 
82  // ---------- public setter methods ----------
83 
85  inline void fecKey( const uint32_t& );
86 
88  inline void fedKey( const uint32_t& );
89 
91  inline void dcuId( const uint32_t& );
92 
94  inline void detId( const uint32_t& );
95 
97  inline void setErrorCodes( const VString& errors );
98 
100  inline virtual void addErrorCode( const std::string& error );
101 
103  virtual void reset() = 0;
104 
105  // ---------- private methods ----------
106 
107  private:
108 
111 
112  // ---------- private member data ----------
113 
114  private:
115 
117  uint32_t fecKey_;
118 
120  uint32_t fedKey_;
121 
123  uint32_t dcuId_;
124 
126  uint32_t detId_;
127 
130 
132  VString errors_;
133 
134 };
135 
136 // ---------- inline methods ----------
137 
139 
140 const uint32_t& CommissioningAnalysis::fecKey() const { return fecKey_; }
141 const uint32_t& CommissioningAnalysis::fedKey() const { return fedKey_; }
142 
143 const uint32_t& CommissioningAnalysis::dcuId() const { return dcuId_; }
144 const uint32_t& CommissioningAnalysis::detId() const { return detId_; }
145 
147 
148 void CommissioningAnalysis::fecKey( const uint32_t& key ) { fecKey_ = key; }
149 void CommissioningAnalysis::fedKey( const uint32_t& key ) { fedKey_ = key; }
150 
151 void CommissioningAnalysis::dcuId( const uint32_t& dcu_id ) { dcuId_ = dcu_id; }
152 void CommissioningAnalysis::detId( const uint32_t& det_id ) { detId_ = det_id; }
153 
155 void CommissioningAnalysis::addErrorCode( const std::string& error ) { errors_.push_back(error) ;}
156 
157 #endif // CondFormats_SiStripObjects_CommissioningAnalysis_H
158 
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