CMS 3D CMS Logo

PedsOnlyHistograms Class Reference

#include <DQM/SiStripCommissioningClients/interface/PedsOnlyHistograms.h>

Inheritance diagram for PedsOnlyHistograms:

CommissioningHistograms PedsOnlyHistosUsingDb

List of all members.

Public Member Functions

void histoAnalysis (bool debug)
 PedsOnlyHistograms (DQMStore *)
 PedsOnlyHistograms (DQMOldReceiver *)
void printAnalyses ()
virtual ~PedsOnlyHistograms ()


Detailed Description

Definition at line 9 of file PedsOnlyHistograms.h.


Constructor & Destructor Documentation

PedsOnlyHistograms::PedsOnlyHistograms ( DQMOldReceiver mui  ) 

Definition at line 18 of file PedsOnlyHistograms.cc.

References CommissioningHistograms::factory_, LogTrace, and sistrip::mlDqmClient_.

00019   : CommissioningHistograms( mui, sistrip::PEDS_ONLY )
00020 {
00021   factory_ = auto_ptr<PedsOnlySummaryFactory>( new PedsOnlySummaryFactory );
00022   LogTrace(mlDqmClient_) 
00023     << "[PedsOnlyHistograms::" << __func__ << "]"
00024     << " Constructing object...";
00025 }

PedsOnlyHistograms::PedsOnlyHistograms ( DQMStore bei  ) 

Definition at line 29 of file PedsOnlyHistograms.cc.

References LogTrace, and sistrip::mlDqmClient_.

00030   : CommissioningHistograms( bei, sistrip::PEDS_ONLY )
00031 {
00032   LogTrace(mlDqmClient_) 
00033     << "[PedsOnlyHistograms::" << __func__ << "]"
00034     << " Constructing object...";
00035 }

PedsOnlyHistograms::~PedsOnlyHistograms (  )  [virtual]

Definition at line 39 of file PedsOnlyHistograms.cc.

References LogTrace, and sistrip::mlDqmClient_.

00039                                         {
00040   LogTrace(mlDqmClient_) 
00041     << "[PedsOnlyHistograms::" << __func__ << "]"
00042     << " Destructing object...";
00043 }


Member Function Documentation

void PedsOnlyHistograms::histoAnalysis ( bool  debug  )  [virtual]

Reimplemented from CommissioningHistograms.

Definition at line 47 of file PedsOnlyHistograms.cc.

References CommissioningAlgorithm::analysis(), begin, count, CommissioningHistograms::data(), empty, lat::endl(), HLT_VtxMuL3::errors, extract(), CommissioningAnalysis::getErrorCodes(), CommissioningHistograms::histos(), PedsOnlyAnalysis::isValid(), iter, LogTrace, sistrip::mlDqmClient_, ss, and TrackValidation_HighPurity_cff::valid.

00047                                                    {
00048   LogTrace(mlDqmClient_)
00049     << "[PedsOnlyHistograms::" << __func__ << "]";
00050 
00051   // Some initialisation
00052   uint16_t valid = 0;
00053   HistosMap::const_iterator iter;
00054   Analyses::iterator ianal;
00055   std::map<std::string,uint16_t> errors;
00056 
00057   // Clear map holding analysis objects
00058   for ( ianal = data().begin(); ianal != data().end(); ianal++ ) { 
00059     if ( ianal->second ) { delete ianal->second; }
00060   } 
00061   data().clear();
00062   
00063   // Iterate through map containing histograms
00064   for ( iter = histos().begin(); 
00065         iter != histos().end(); iter++ ) {
00066     
00067     // Check vector of histos is not empty
00068     if ( iter->second.empty() ) {
00069       edm::LogWarning(mlDqmClient_) 
00070         << "[PedsOnlyHistograms::" << __func__ << "]"
00071         << " Zero histograms found!";
00072       continue;
00073     }
00074     
00075     // Retrieve pointers to profile histos
00076     std::vector<TH1*> profs;
00077     Histos::const_iterator ihis = iter->second.begin(); 
00078     for ( ; ihis != iter->second.end(); ihis++ ) {
00079       TProfile* prof = ExtractTObject<TProfile>().extract( (*ihis)->me_ );
00080       if ( prof ) { profs.push_back(prof); }
00081       //@@ Common mode histos?...
00082       //TH1F* his = ExtractTObject<TH1F>().extract( (*ihis)->me_ );
00083       //if ( his ) { profs.push_back(his); }
00084     }
00085     
00086     // Perform histo analysis
00087     PedsOnlyAnalysis* anal = new PedsOnlyAnalysis( iter->first );
00088     PedsOnlyAlgorithm algo( anal );
00089     algo.analysis( profs );
00090     data()[iter->first] = anal; 
00091     if ( anal->isValid() ) { valid++; }
00092     if ( !anal->getErrorCodes().empty() ) { 
00093       errors[anal->getErrorCodes()[0]]++;
00094     }
00095     
00096   }
00097   
00098   if ( !histos().empty() ) {
00099     edm::LogVerbatim(mlDqmClient_) 
00100       << "[PedsOnlyHistograms::" << __func__ << "]"
00101       << " Analyzed histograms for " << histos().size() 
00102       << " FED channels, of which " << valid 
00103       << " (" << 100 * valid / histos().size()
00104       << "%) are valid.";
00105     if ( !errors.empty() ) {
00106       uint16_t count = 0;
00107       std::stringstream ss;
00108       ss << std::endl;
00109       std::map<std::string,uint16_t>::const_iterator ii;
00110       for ( ii = errors.begin(); ii != errors.end(); ++ii ) { 
00111         ss << " " << ii->first << ": " << ii->second << std::endl;
00112         count += ii->second;
00113       }
00114       edm::LogWarning(mlDqmClient_) 
00115         << "[PedsOnlyHistograms::" << __func__ << "]"
00116         << " Found " << count << " errors ("
00117         << 100 * count / histos().size() << "%): " 
00118         << ss.str();
00119     }
00120   } else {
00121     edm::LogWarning(mlDqmClient_) 
00122       << "[PedsOnlyHistograms::" << __func__ << "]"
00123       << " No histograms to analyze!";
00124   }
00125   
00126 }

void PedsOnlyHistograms::printAnalyses (  )  [virtual]

Reimplemented from CommissioningHistograms.

Definition at line 130 of file PedsOnlyHistograms.cc.

References CommissioningHistograms::data(), LogTrace, sistrip::mlDqmClient_, and ss.

00130                                        {
00131   Analyses::iterator ianal = data().begin();
00132   Analyses::iterator janal = data().end();
00133   for ( ; ianal != janal; ++ianal ) { 
00134     if ( ianal->second ) { 
00135       std::stringstream ss;
00136       ianal->second->print( ss, 1 ); 
00137       ianal->second->print( ss, 2 ); 
00138       if ( ianal->second->isValid() ) { LogTrace(mlDqmClient_) << ss.str(); 
00139       } else { edm::LogWarning(mlDqmClient_) << ss.str(); }
00140     }
00141   }
00142 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:33 2009 for CMSSW by  doxygen 1.5.4