CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CondFormats/SiStripObjects/interface/CommissioningAnalysis.h

Go to the documentation of this file.
00001 #ifndef CondFormats_SiStripObjects_CommissioningAnalysis_H
00002 #define CondFormats_SiStripObjects_CommissioningAnalysis_H
00003 
00004 #include "DataFormats/SiStripCommon/interface/SiStripFecKey.h"
00005 #include "DataFormats/SiStripCommon/interface/SiStripFedKey.h"
00006 #include <boost/cstdint.hpp>
00007 #include <sstream>
00008 #include <string>
00009 #include <vector>
00010 
00018 class CommissioningAnalysis {
00019 
00020  public:
00021 
00022   // ---------- con(de)structors ----------
00023   
00024   CommissioningAnalysis( const uint32_t& key, 
00025                          const std::string& my_name );
00026 
00027   CommissioningAnalysis( const std::string& my_name );
00028 
00029   virtual ~CommissioningAnalysis() {;}
00030 
00031   // ---------- typedefs ----------
00032 
00033   typedef std::vector<float> VFloat;
00034 
00035   typedef std::vector<VFloat> VVFloat;
00036 
00037   typedef std::vector<uint16_t> VInt;
00038 
00039   typedef std::vector<VInt> VVInt;
00040 
00041   typedef std::vector<std::string> VString;
00042 
00043   // ---------- public interface ----------
00044   
00046   virtual bool isValid() const { return true; } 
00047 
00049   inline const VString& getErrorCodes() const;
00050   
00052   inline const uint32_t& fecKey() const;
00053   
00055   inline const uint32_t& fedKey() const;
00056   
00058   inline const uint32_t& dcuId() const;
00059   
00061   inline const uint32_t& detId() const;
00062 
00063   // ---------- public print methods ----------
00064   
00066   inline const std::string& myName() const;
00067 
00069   virtual void print( std::stringstream&, uint32_t not_used = 0 ) = 0;
00070   
00072   virtual void header( std::stringstream& ) const;
00073   
00075   virtual void summary( std::stringstream& ) const;
00076 
00077   // ---------- public setter methods ----------
00078 
00080   inline void fecKey( const uint32_t& );
00081 
00083   inline void fedKey( const uint32_t& );
00084   
00086   inline void dcuId( const uint32_t& );
00087   
00089   inline void detId( const uint32_t& );
00090 
00092   inline void setErrorCodes( const VString& errors );
00093 
00095   inline virtual void addErrorCode( const std::string& error );
00096 
00098   virtual void reset() = 0;
00099   
00100   // ---------- private methods ----------
00101 
00102  private:
00103 
00105   CommissioningAnalysis() {;}
00106   
00107   // ---------- private member data ----------
00108 
00109  private:
00110   
00112   uint32_t fecKey_;
00113   
00115   uint32_t fedKey_;
00116   
00118   uint32_t dcuId_;
00119   
00121   uint32_t detId_;
00122   
00124   std::string myName_;
00125   
00127   VString errors_;
00128 
00129 };
00130 
00131 // ---------- inline methods ----------
00132 
00133 const CommissioningAnalysis::VString& CommissioningAnalysis::getErrorCodes() const { return errors_; }
00134 
00135 const uint32_t& CommissioningAnalysis::fecKey() const { return fecKey_; }
00136 const uint32_t& CommissioningAnalysis::fedKey() const { return fedKey_; }
00137 
00138 const uint32_t& CommissioningAnalysis::dcuId() const { return dcuId_; }
00139 const uint32_t& CommissioningAnalysis::detId() const { return detId_; }
00140 
00141 const std::string& CommissioningAnalysis::myName() const { return myName_; }
00142 
00143 void CommissioningAnalysis::fecKey( const uint32_t& key ) { fecKey_ = key; }
00144 void CommissioningAnalysis::fedKey( const uint32_t& key ) { fedKey_ = key; }
00145 
00146 void CommissioningAnalysis::dcuId( const uint32_t& dcu_id ) { dcuId_ = dcu_id; }
00147 void CommissioningAnalysis::detId( const uint32_t& det_id ) { detId_ = det_id; }
00148 
00149 void CommissioningAnalysis::setErrorCodes( const VString& errors ) { errors_ = errors; }
00150 void CommissioningAnalysis::addErrorCode( const std::string& error ) { errors_.push_back(error) ;}
00151 
00152 #endif // CondFormats_SiStripObjects_CommissioningAnalysis_H
00153