CMS 3D CMS Logo

SummaryHistogramFactory< T > Class Template Reference

#include <DQM/SiStripCommissioningSummary/interface/SummaryHistogramFactory.h>

List of all members.

Public Member Functions

uint32_t extract (const std::map< uint32_t, T > &data)
void fill (TH1 &summary_histo)
void init (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &)
 SummaryHistogramFactory ()
 ~SummaryHistogramFactory ()

Private Attributes

SummaryGeneratorgenerator_
sistrip::Granularity gran_
std::string level_
sistrip::Monitorable mon_
sistrip::Presentation pres_
sistrip::View view_


Detailed Description

template<class T>
class SummaryHistogramFactory< T >

Definition at line 13 of file SummaryHistogramFactory.h.


Constructor & Destructor Documentation

template<class T>
SummaryHistogramFactory< T >::SummaryHistogramFactory (  )  [inline]

Definition at line 12 of file SummaryHistogramFactory.cc.

References LogTrace, and sistrip::mlSummaryPlots_.

00012                                                     :
00013   mon_(sistrip::UNKNOWN_MONITORABLE),
00014   pres_(sistrip::UNKNOWN_PRESENTATION),
00015   view_(sistrip::UNKNOWN_VIEW),
00016   level_(sistrip::root_),
00017   gran_(sistrip::UNKNOWN_GRAN),
00018   generator_(0) 
00019 {
00020   LogTrace(mlSummaryPlots_) 
00021     << "[SummaryHistogramFactory::" << __func__ << "]";
00022 } 

template<class T>
SummaryHistogramFactory< T >::~SummaryHistogramFactory (  )  [inline]

Definition at line 27 of file SummaryHistogramFactory.cc.

References SummaryHistogramFactory< T >::generator_, LogTrace, and sistrip::mlSummaryPlots_.

00027                                                      {
00028   LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]";
00029   if ( generator_ ) { delete generator_; }
00030 }


Member Function Documentation

template<class T>
uint32_t SummaryHistogramFactory< T >::extract ( const std::map< uint32_t, T > &  data  )  [inline]

Definition at line 59 of file SummaryHistogramFactory.cc.

References SummaryGenerator::clearMap(), SummaryGenerator::fillMap(), SummaryHistogramFactory< T >::generator_, SummaryHistogramFactory< T >::gran_, iter, SummaryHistogramFactory< T >::level_, LogTrace, sistrip::mlSummaryPlots_, and SummaryGenerator::size().

00059                                                                              {
00060   LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]";
00061   
00062   // Check if data are present
00063   if ( data.empty() ) { 
00064     edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" 
00065                                      << " No data in monitorables std::map!";
00066     return 0; 
00067   }
00068   
00069   // Check if instance of generator class exists
00070   if ( !generator_ ) { 
00071     edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" 
00072          << " NULL pointer to SummaryGenerator object!";
00073     return 0;
00074   }
00075   
00076   // Transfer appropriate monitorables info to generator object
00077   generator_->clearMap();
00078   typename std::map<uint32_t,T>::const_iterator iter = data.begin();
00079   for ( ; iter != data.end(); iter++ ) {
00080     generator_->fillMap( level_,                             // top-level directory
00081                          gran_,                              // granularity
00082                          iter->first,                        // device key
00083                          static_cast<float>(iter->second) ); // value
00084   }
00085   
00086   return generator_->size();
00087 }

template<class T>
void SummaryHistogramFactory< T >::fill ( TH1 &  summary_histo  )  [inline]

Definition at line 92 of file SummaryHistogramFactory.cc.

References SummaryGenerator::format(), SummaryHistogramFactory< T >::generator_, SummaryHistogramFactory< T >::gran_, SummaryGenerator::histo1D(), SummaryGenerator::histo2DScatter(), SummaryGenerator::histo2DSum(), sistrip::HISTO_1D, sistrip::HISTO_2D_SCATTER, sistrip::HISTO_2D_SUM, SummaryHistogramFactory< T >::level_, LogTrace, sistrip::mlSummaryPlots_, SummaryHistogramFactory< T >::mon_, SummaryHistogramFactory< T >::pres_, SummaryGenerator::profile1D(), sistrip::PROFILE_1D, SummaryGenerator::size(), sistrip::UNKNOWN_RUN_TYPE, and SummaryHistogramFactory< T >::view_.

00092                                                           {
00093   LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]";
00094   
00095   // Check if instance of generator class exists
00096   if ( !generator_ ) { 
00097     edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" 
00098          << " NULL pointer to SummaryGenerator object!";
00099     return;
00100   }
00101 
00102   // Check if instance of generator class exists
00103   if ( !(&summary_histo) ) { 
00104     edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" 
00105          << " NULL pointer to SummaryGenerator object!";
00106     return;
00107   }
00108 
00109   // Check if std::map is filled
00110   if ( !generator_->size() ) { 
00111     edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" 
00112          << " No data in the monitorables std::map!";
00113     return; 
00114   } 
00115   
00116   // Generate appropriate summary histogram 
00117   if ( pres_ == sistrip::HISTO_1D ) {
00118     generator_->histo1D( summary_histo );
00119   } else if ( pres_ == sistrip::HISTO_2D_SUM ) {
00120     generator_->histo2DSum( summary_histo );
00121   } else if ( pres_ == sistrip::HISTO_2D_SCATTER ) {
00122     generator_->histo2DScatter( summary_histo );
00123   } else if ( pres_ == sistrip::PROFILE_1D ) {
00124     generator_->profile1D( summary_histo );
00125   } else { return; }
00126   
00127   // Histogram formatting
00128   generator_->format( sistrip::UNKNOWN_RUN_TYPE, mon_, pres_, view_, level_, gran_, summary_histo );
00129   
00130 }

template<class T>
void SummaryHistogramFactory< T >::init ( const sistrip::Monitorable mon,
const sistrip::Presentation pres,
const sistrip::View view,
const std::string &  top_level_dir,
const sistrip::Granularity gran 
) [inline]

Definition at line 35 of file SummaryHistogramFactory.cc.

References SummaryHistogramFactory< T >::generator_, SummaryHistogramFactory< T >::gran_, SummaryGenerator::instance(), SummaryHistogramFactory< T >::level_, LogTrace, sistrip::mlSummaryPlots_, SummaryHistogramFactory< T >::mon_, SummaryHistogramFactory< T >::pres_, and SummaryHistogramFactory< T >::view_.

00039                                                                         {
00040   LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]";
00041   mon_ = mon;
00042   pres_ = pres;
00043   view_ = view;
00044   level_ = top_level_dir;
00045   gran_ = gran;
00046 
00047   // Retrieve utility class used to generate summary histograms
00048   if ( generator_ ) { 
00049     delete generator_;
00050     generator_ = 0;
00051     generator_ = SummaryGenerator::instance( view );
00052   }
00053   
00054 }


Member Data Documentation

template<class T>
SummaryGenerator* SummaryHistogramFactory< T >::generator_ [private]

Definition at line 37 of file SummaryHistogramFactory.h.

Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< T >::extract(), SummaryHistogramFactory< T >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), SummaryHistogramFactory< T >::init(), SummaryHistogramFactory< T >::~SummaryHistogramFactory(), SummaryHistogramFactory< DaqScopeModeAnalysis >::~SummaryHistogramFactory(), and SummaryHistogramFactory< FedTimingAnalysis >::~SummaryHistogramFactory().

template<class T>
sistrip::Granularity SummaryHistogramFactory< T >::gran_ [private]

Definition at line 36 of file SummaryHistogramFactory.h.

Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< T >::extract(), SummaryHistogramFactory< T >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), and SummaryHistogramFactory< T >::init().

template<class T>
std::string SummaryHistogramFactory< T >::level_ [private]

Definition at line 35 of file SummaryHistogramFactory.h.

Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< T >::extract(), SummaryHistogramFactory< T >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), and SummaryHistogramFactory< T >::init().

template<class T>
sistrip::Monitorable SummaryHistogramFactory< T >::mon_ [private]

Definition at line 32 of file SummaryHistogramFactory.h.

Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< T >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), and SummaryHistogramFactory< T >::init().

template<class T>
sistrip::Presentation SummaryHistogramFactory< T >::pres_ [private]

Definition at line 33 of file SummaryHistogramFactory.h.

Referenced by SummaryHistogramFactory< T >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), and SummaryHistogramFactory< T >::init().

template<class T>
sistrip::View SummaryHistogramFactory< T >::view_ [private]

Definition at line 34 of file SummaryHistogramFactory.h.

Referenced by SummaryHistogramFactory< T >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), and SummaryHistogramFactory< T >::init().


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