CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/CondFormats/SiStripObjects/interface/PedestalsAnalysis.h

Go to the documentation of this file.
00001 #ifndef CondFormats_SiStripObjects_PedestalsAnalysis_H
00002 #define CondFormats_SiStripObjects_PedestalsAnalysis_H
00003 
00004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
00005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
00006 #include <boost/cstdint.hpp>
00007 #include <sstream>
00008 #include <vector>
00009 
00015 class PedestalsAnalysis : public CommissioningAnalysis {
00016   
00017  public:
00018 
00019   // ---------- con(de)structors ----------
00020 
00021   PedestalsAnalysis( const uint32_t& key );
00022 
00023   PedestalsAnalysis();
00024 
00025   virtual ~PedestalsAnalysis() {;}
00026 
00027   friend class PedestalsAlgorithm;
00028 
00029   // ---------- public interface ----------
00030 
00032   bool isValid() const;
00033   
00034   // Pedestal, noise and raw noise (128-strip vector per APV)
00035   inline const VVFloat& peds() const;
00036   inline const VVFloat& noise() const;
00037   inline const VVFloat& raw() const;
00038 
00039   // Dead and noisy strips (vector per APV)
00040   inline const VVInt& dead() const; 
00041   inline const VVInt& noisy() const;
00042 
00043   // Mean and rms spread (value per APV)
00044   inline const VFloat& pedsMean() const;
00045   inline const VFloat& pedsSpread() const;
00046   inline const VFloat& noiseMean() const;
00047   inline const VFloat& noiseSpread() const;
00048   inline const VFloat& rawMean() const;
00049   inline const VFloat& rawSpread() const;
00050 
00051   // Max and min values (value per APV)
00052   inline const VFloat& pedsMax() const;
00053   inline const VFloat& pedsMin() const; 
00054   inline const VFloat& noiseMax() const;
00055   inline const VFloat& noiseMin() const;
00056   inline const VFloat& rawMax() const;
00057   inline const VFloat& rawMin() const;
00058 
00059   // ---------- misc ----------
00060   
00062   void print( std::stringstream&, uint32_t apv_number = 0 );
00063   
00065   void summary( std::stringstream& ) const;
00066   
00068   void reset();
00069   
00070   // ---------- private member data ----------
00071 
00072  private:
00073   
00074   // VVFloats means: 1 vector per APV, 1 value per strip.
00075 
00077   VVFloat peds_;
00078 
00080   VVFloat noise_;
00081 
00083   VVFloat raw_;
00084 
00085   // VVInts means: 1 vector per APV, values are strip numbers.
00086 
00088   VVInt dead_; 
00089 
00091   VVInt noisy_;
00092 
00093   // VFloat: 1 value per APV
00094 
00096   VFloat pedsMean_;
00097 
00099   VFloat pedsSpread_;
00100 
00102   VFloat noiseMean_;
00103 
00105   VFloat noiseSpread_;
00106 
00108   VFloat rawMean_;
00109 
00111   VFloat rawSpread_;
00112 
00114   VFloat pedsMax_;
00115 
00117   VFloat pedsMin_; 
00118 
00120   VFloat noiseMax_;
00121 
00123   VFloat noiseMin_;
00124 
00126   VFloat rawMax_;
00127 
00129   VFloat rawMin_;
00130   
00131   // true if legacy histogram naming is used
00132   bool legacy_;
00133   
00134 };
00135 
00136 // ---------- Inline methods ----------
00137 
00138 const PedestalsAnalysis::VVFloat& PedestalsAnalysis::peds() const { return peds_; }
00139 const PedestalsAnalysis::VVFloat& PedestalsAnalysis::noise() const { return noise_; }
00140 const PedestalsAnalysis::VVFloat& PedestalsAnalysis::raw() const { return raw_; }
00141 
00142 const PedestalsAnalysis::VVInt& PedestalsAnalysis::dead() const { return dead_; } 
00143 const PedestalsAnalysis::VVInt& PedestalsAnalysis::noisy() const { return noisy_; }
00144 
00145 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsMean() const { return pedsMean_; }
00146 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsSpread() const { return pedsSpread_; }
00147 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseMean() const { return noiseMean_; }
00148 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseSpread() const { return noiseSpread_; }
00149 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawMean() const { return rawMean_; }
00150 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawSpread() const { return rawSpread_; }
00151 
00152 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsMax() const { return pedsMax_; }
00153 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsMin() const { return pedsMin_; } 
00154 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseMax() const { return noiseMax_; }
00155 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseMin() const { return noiseMin_; }
00156 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawMax() const { return rawMax_; }
00157 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawMin() const { return rawMin_; }
00158 
00159 #endif // CondFormats_SiStripObjects_PedestalsAnalysis_H