#include <SummaryHistogramFactory.h>
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 | |
SummaryGenerator * | generator_ |
sistrip::Granularity | gran_ |
std::string | level_ |
sistrip::Monitorable | mon_ |
sistrip::Presentation | pres_ |
sistrip::View | view_ |
Definition at line 13 of file SummaryHistogramFactory.h.
SummaryHistogramFactory< T >::SummaryHistogramFactory | ( | ) |
Definition at line 12 of file SummaryHistogramFactory.cc.
References LogTrace, and sistrip::mlSummaryPlots_.
: mon_(sistrip::UNKNOWN_MONITORABLE), pres_(sistrip::UNKNOWN_PRESENTATION), view_(sistrip::UNKNOWN_VIEW), level_(sistrip::root_), gran_(sistrip::UNKNOWN_GRAN), generator_(0) { LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]"; }
SummaryHistogramFactory< T >::~SummaryHistogramFactory | ( | ) |
Definition at line 27 of file SummaryHistogramFactory.cc.
References LogTrace, and sistrip::mlSummaryPlots_.
{ LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]"; if ( generator_ ) { delete generator_; } }
uint32_t SummaryHistogramFactory< T >::extract | ( | const std::map< uint32_t, T > & | data | ) |
Definition at line 59 of file SummaryHistogramFactory.cc.
References LogTrace, and sistrip::mlSummaryPlots_.
{ LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]"; // Check if data are present if ( data.empty() ) { edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" << " No data in monitorables std::map!"; return 0; } // Check if instance of generator class exists if ( !generator_ ) { edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" << " NULL pointer to SummaryGenerator object!"; return 0; } // Transfer appropriate monitorables info to generator object generator_->clearMap(); typename std::map<uint32_t,T>::const_iterator iter = data.begin(); for ( ; iter != data.end(); iter++ ) { generator_->fillMap( level_, // top-level directory gran_, // granularity iter->first, // device key static_cast<float>(iter->second) ); // value } return generator_->size(); }
void SummaryHistogramFactory< T >::fill | ( | TH1 & | summary_histo | ) |
Definition at line 92 of file SummaryHistogramFactory.cc.
References sistrip::HISTO_1D, sistrip::HISTO_2D_SCATTER, sistrip::HISTO_2D_SUM, LogTrace, sistrip::mlSummaryPlots_, sistrip::PROFILE_1D, and sistrip::UNKNOWN_RUN_TYPE.
{ LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]"; // Check if instance of generator class exists if ( !generator_ ) { edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" << " NULL pointer to SummaryGenerator object!"; return; } // Check if instance of generator class exists if ( !(&summary_histo) ) { edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" << " NULL pointer to SummaryGenerator object!"; return; } // Check if std::map is filled if ( !generator_->size() ) { edm::LogWarning(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]" << " No data in the monitorables std::map!"; return; } // Generate appropriate summary histogram if ( pres_ == sistrip::HISTO_1D ) { generator_->histo1D( summary_histo ); } else if ( pres_ == sistrip::HISTO_2D_SUM ) { generator_->histo2DSum( summary_histo ); } else if ( pres_ == sistrip::HISTO_2D_SCATTER ) { generator_->histo2DScatter( summary_histo ); } else if ( pres_ == sistrip::PROFILE_1D ) { generator_->profile1D( summary_histo ); } else { return; } // Histogram formatting generator_->format( sistrip::UNKNOWN_RUN_TYPE, mon_, pres_, view_, level_, gran_, summary_histo ); }
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 | ||
) |
Definition at line 35 of file SummaryHistogramFactory.cc.
References SummaryGenerator::instance(), LogTrace, sistrip::mlSummaryPlots_, and LaserDQM_cfi::mon.
{ LogTrace(mlSummaryPlots_) << "[SummaryHistogramFactory::" << __func__ << "]"; mon_ = mon; pres_ = pres; view_ = view; level_ = top_level_dir; gran_ = gran; // Retrieve utility class used to generate summary histograms if ( generator_ ) { delete generator_; generator_ = 0; generator_ = SummaryGenerator::instance( view ); } }
SummaryGenerator* SummaryHistogramFactory< T >::generator_ [private] |
Definition at line 37 of file SummaryHistogramFactory.h.
Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), SummaryHistogramFactory< FedTimingAnalysis >::init(), SummaryHistogramFactory< DaqScopeModeAnalysis >::~SummaryHistogramFactory(), and SummaryHistogramFactory< FedTimingAnalysis >::~SummaryHistogramFactory().
sistrip::Granularity SummaryHistogramFactory< T >::gran_ [private] |
Definition at line 36 of file SummaryHistogramFactory.h.
Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), and SummaryHistogramFactory< FedTimingAnalysis >::init().
std::string SummaryHistogramFactory< T >::level_ [private] |
Definition at line 35 of file SummaryHistogramFactory.h.
Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), and SummaryHistogramFactory< FedTimingAnalysis >::init().
sistrip::Monitorable SummaryHistogramFactory< T >::mon_ [private] |
Definition at line 32 of file SummaryHistogramFactory.h.
Referenced by SummaryHistogramFactory< DaqScopeModeAnalysis >::extract(), SummaryHistogramFactory< FedTimingAnalysis >::extract(), SummaryHistogramFactory< DaqScopeModeAnalysis >::fill(), SummaryHistogramFactory< FedTimingAnalysis >::fill(), SummaryHistogramFactory< DaqScopeModeAnalysis >::init(), and SummaryHistogramFactory< FedTimingAnalysis >::init().
sistrip::Presentation SummaryHistogramFactory< T >::pres_ [private] |
sistrip::View SummaryHistogramFactory< T >::view_ [private] |