CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/SiStripObjects/src/DaqScopeModeAnalysis.cc

Go to the documentation of this file.
00001 #include "CondFormats/SiStripObjects/interface/DaqScopeModeAnalysis.h"
00002 #include "DataFormats/SiStripCommon/interface/SiStripHistoTitle.h"
00003 #include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
00004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005 #include <iostream>
00006 #include <iomanip>
00007 #include <cmath>
00008 
00009 using namespace sistrip;
00010 
00011 // ----------------------------------------------------------------------------
00012 // 
00013 DaqScopeModeAnalysis::DaqScopeModeAnalysis( const uint32_t& key ) 
00014   : CommissioningAnalysis(key,"DaqScopeModeAnalysis"),
00015     entries_(sistrip::invalid_), 
00016     mean_(sistrip::invalid_), 
00017     median_(sistrip::invalid_), 
00018     mode_(sistrip::invalid_), 
00019     rms_(sistrip::invalid_), 
00020     min_(sistrip::invalid_), 
00021     max_(sistrip::invalid_)
00022 {;}
00023 
00024 // ----------------------------------------------------------------------------
00025 // 
00026 DaqScopeModeAnalysis::DaqScopeModeAnalysis() 
00027   : CommissioningAnalysis("DaqScopeModeAnalysis"),
00028     entries_(sistrip::invalid_), 
00029     mean_(sistrip::invalid_), 
00030     median_(sistrip::invalid_), 
00031     mode_(sistrip::invalid_), 
00032     rms_(sistrip::invalid_), 
00033     min_(sistrip::invalid_), 
00034     max_(sistrip::invalid_)
00035 {;}
00036 
00037 // ----------------------------------------------------------------------------
00038 // 
00039 void DaqScopeModeAnalysis::reset() {
00040   entries_ = 1. * sistrip::invalid_; 
00041   mean_ = 1.*sistrip::invalid_; 
00042   median_ = 1.*sistrip::invalid_; 
00043   mode_ = 1.*sistrip::invalid_; 
00044   rms_ = 1.*sistrip::invalid_; 
00045   min_ = 1.*sistrip::invalid_; 
00046   max_ = 1.*sistrip::invalid_; 
00047 }
00048 
00049 // ----------------------------------------------------------------------------
00050 // 
00051 void DaqScopeModeAnalysis::print( std::stringstream& ss, uint32_t not_used ) { 
00052   header( ss );
00053   ss << " Number of entries   : " << entries_ << "\n" 
00054      << " Mean +/- rms [adc]  : " << mean_ << " +/- " << rms_ << "\n"
00055      << " Median / mode [adc] : " << median_ << " / " << mode_ << "\n" 
00056      << " Min / max [adc]     : " << min_ << " / " << max_ << "\n";
00057 }