CMS 3D CMS Logo

SummaryPlotFactoryBase Class Reference

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

Inheritance diagram for SummaryPlotFactoryBase:

SummaryPlotFactory< T > SummaryPlotFactory< CommissioningAnalysis * > SummaryPlotFactory< FedCablingAnalysis * > ApvTimingSummaryFactory CalibrationSummaryFactory FastFedCablingSummaryFactory NoiseSummaryFactory OptoScanSummaryFactory PedestalsSummaryFactory PedsOnlySummaryFactory SamplingSummaryFactory VpspScanSummaryFactory

List of all members.

Protected Member Functions

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 &)
 SummaryPlotFactoryBase ()
 ~SummaryPlotFactoryBase ()

Protected Attributes

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


Detailed Description

Definition at line 9 of file SummaryPlotFactoryBase.h.


Constructor & Destructor Documentation

SummaryPlotFactoryBase::SummaryPlotFactoryBase (  )  [protected]

Definition at line 11 of file SummaryPlotFactoryBase.cc.

SummaryPlotFactoryBase::~SummaryPlotFactoryBase (  )  [protected]

Definition at line 22 of file SummaryPlotFactoryBase.cc.

References generator_.

00022                                                 {
00023   if ( generator_ ) { delete generator_; }
00024 }


Member Function Documentation

void SummaryPlotFactoryBase::fill ( TH1 &  summary_histo  )  [protected]

Reimplemented in SummaryPlotFactory< CommissioningAnalysis * >, SummaryPlotFactory< FedCablingAnalysis * >, and SummaryPlotFactory< T >.

Definition at line 112 of file SummaryPlotFactoryBase.cc.

References SummaryGenerator::format(), generator_, gran_, SummaryGenerator::histo1D(), SummaryGenerator::histo2DScatter(), SummaryGenerator::histo2DSum(), sistrip::HISTO_1D, sistrip::HISTO_2D_SCATTER, sistrip::HISTO_2D_SUM, level_, sistrip::mlSummaryPlots_, mon_, SummaryGenerator::nBins(), pres_, SiStripEnumsAndStrings::presentation(), SummaryGenerator::profile1D(), sistrip::PROFILE_1D, sistrip::UNKNOWN_RUN_TYPE, and view_.

Referenced by SummaryPlotFactory< T >::fill(), SummaryPlotFactory< CommissioningAnalysis * >::fill(), and SummaryPlotFactory< FedCablingAnalysis * >::fill().

00112                                                       {
00113   
00114   // Check if instance of generator class exists
00115   if ( !generator_ ) { 
00116     edm::LogWarning(mlSummaryPlots_) 
00117       << "[SummaryPlotFactoryBase::" << __func__ << "]" 
00118       << " NULL pointer to SummaryGenerator object!";
00119     return;
00120   }
00121   
00122   // Check if map is filled
00123   if ( !generator_->nBins() ) { 
00124     edm::LogWarning(mlSummaryPlots_)
00125       << "[SummaryPlotFactoryBase::" << __func__ << "]" 
00126       << " Zero bins returned by SummaryGenerator!";
00127     return; 
00128   } 
00129   
00130   // Check if instance of generator class exists
00131   if ( !(&summary_histo) ) { 
00132     edm::LogWarning(mlSummaryPlots_)
00133       << "[SummaryPlotFactoryBase::" << __func__ << "]" 
00134       << " NULL pointer to TH1 object!";
00135     return;
00136   }
00137   
00138   // Print contents of map for histogram
00139   //generator_->printMap();
00140   
00141   // Generate appropriate summary histogram 
00142   if ( pres_ == sistrip::HISTO_1D ) {
00143     generator_->histo1D( summary_histo );
00144   } else if ( pres_ == sistrip::HISTO_2D_SUM ) {
00145     generator_->histo2DSum( summary_histo );
00146   } else if ( pres_ == sistrip::HISTO_2D_SCATTER ) {
00147     generator_->histo2DScatter( summary_histo );
00148   } else if ( pres_ == sistrip::PROFILE_1D ) {
00149     generator_->profile1D( summary_histo );
00150   } else { 
00151     edm::LogWarning(mlSummaryPlots_)
00152       << "[SummaryPlotFactoryBase::" << __func__ << "]" 
00153       << " Unexpected presentation type: "
00154       << SiStripEnumsAndStrings::presentation( pres_ );
00155     return; 
00156   }
00157   
00158   // Histogram formatting
00159   generator_->format( sistrip::UNKNOWN_RUN_TYPE, //@@ not used
00160                       mon_, 
00161                       pres_, 
00162                       view_, 
00163                       level_, 
00164                       gran_, 
00165                       summary_histo );
00166   
00167 }

void SummaryPlotFactoryBase::init ( const sistrip::Monitorable mon,
const sistrip::Presentation pres,
const sistrip::View view,
const std::string &  top_level_dir,
const sistrip::Granularity gran 
) [protected]

Definition at line 28 of file SummaryPlotFactoryBase.cc.

References SummaryGenerator::clearMap(), generator_, gran_, SiStripEnumsAndStrings::granularity(), sistrip::HISTO_1D, SummaryGenerator::instance(), level_, sistrip::mlSummaryPlots_, mon_, SiStripEnumsAndStrings::monitorable(), pres_, SiStripEnumsAndStrings::presentation(), sistrip::UNDEFINED_GRAN, sistrip::UNDEFINED_MONITORABLE, sistrip::UNDEFINED_PRESENTATION, sistrip::UNDEFINED_VIEW, sistrip::undefinedView_, sistrip::UNKNOWN_GRAN, sistrip::UNKNOWN_MONITORABLE, sistrip::UNKNOWN_PRESENTATION, sistrip::UNKNOWN_VIEW, sistrip::unknownView_, SiStripEnumsAndStrings::view(), and view_.

Referenced by SummaryPlotFactory< FedCablingAnalysis * >::init(), SummaryPlotFactory< CommissioningAnalysis * >::init(), and SummaryPlotFactory< T >::init().

00032                                                                     {
00033   
00034   // Create generator object
00035   if ( generator_ ) { delete generator_; generator_ = 0; }
00036   generator_ = SummaryGenerator::instance( view );
00037   
00038   // Check if generator object exists
00039   if ( !generator_ ) { 
00040     edm::LogWarning(mlSummaryPlots_) 
00041       << "[SummaryPlotFactoryBase::" << __func__ << "]" 
00042       << " NULL pointer to generator object!"; 
00043     return; 
00044   }
00045   
00046   // Clear map used to build histogram 
00047   generator_->clearMap();
00048   
00049   // Set parameters
00050   mon_ = mon;
00051   pres_ = pres;
00052   view_ = view;
00053   level_ = level;
00054   gran_ = gran;
00055   
00056   // Some checks
00057   if ( mon_ == sistrip::UNKNOWN_MONITORABLE ||
00058        mon_ == sistrip::UNDEFINED_MONITORABLE ) {
00059     edm::LogWarning(mlSummaryPlots_) 
00060       << "[SummaryPlotFactoryBase::" << __func__ << "]"
00061       << " Unexpected monitorable: " 
00062       << SiStripEnumsAndStrings::monitorable(mon_);
00063   }
00064   
00065   if ( pres_ == sistrip::UNKNOWN_PRESENTATION ||
00066        pres_ == sistrip::UNDEFINED_PRESENTATION ) {
00067     edm::LogWarning(mlSummaryPlots_) 
00068       << "[SummaryPlotFactoryBase::" << __func__ << "]"
00069       << " Unexpected presentation: " 
00070       << SiStripEnumsAndStrings::presentation(pres_);
00071   } 
00072 
00073   if ( view_ == sistrip::UNKNOWN_VIEW ||
00074        view_ == sistrip::UNDEFINED_VIEW ) {
00075     edm::LogWarning(mlSummaryPlots_) 
00076       << "[SummaryPlotFactoryBase::" << __func__ << "]"
00077       << " Unexpected view: " 
00078       << SiStripEnumsAndStrings::view(view_);
00079   }
00080   
00081   if ( level_.empty() ||
00082        level_.find(sistrip::unknownView_) != std::string::npos ||
00083        level_.find(sistrip::undefinedView_) != std::string::npos ) {
00084     edm::LogWarning(mlSummaryPlots_) 
00085       << "[SummaryPlotFactoryBase::" << __func__ << "]"
00086       << " Unexpected top-level directory: \"" 
00087       << level_ << "\"";
00088   } 
00089   
00090   if ( ( gran_ == sistrip::UNKNOWN_GRAN ||
00091          gran_ == sistrip::UNDEFINED_GRAN ) &&
00092        pres != sistrip::HISTO_1D ) {
00093     edm::LogWarning(mlSummaryPlots_) 
00094       << "[SummaryPlotFactoryBase::" << __func__ << "]"
00095       << " Unexpected granularity: " 
00096       << SiStripEnumsAndStrings::granularity(gran_);
00097   }
00098   
00099 //   ss << "[SummaryPlotFactoryBase::" << __func__ << "]" 
00100 //      << " Dump of parameters defining summary plot:" << std::endl
00101 //      << " Monitorable   : " << SiStripEnumsAndStrings::monitorable( mon_ ) << std::endl
00102 //      << " Presentation  : " << SiStripEnumsAndStrings::presentation( pres_ ) << std::endl
00103 //      << " Logical view  : " << SiStripEnumsAndStrings::view( view_ ) << std::endl
00104 //      << " Top level dir : " << level_ << std::endl
00105 //      << " Granularity   : " << SiStripEnumsAndStrings::granularity( gran_ );
00106 //   LogTrace(mlSummaryPlots_) << ss.str();
00107   
00108 }


Member Data Documentation

SummaryGenerator* SummaryPlotFactoryBase::generator_ [protected]

Definition at line 35 of file SummaryPlotFactoryBase.h.

Referenced by ApvTimingSummaryFactory::extract(), PedsOnlySummaryFactory::extract(), SamplingSummaryFactory::extract(), FastFedCablingSummaryFactory::extract(), NoiseSummaryFactory::extract(), OptoScanSummaryFactory::extract(), CalibrationSummaryFactory::extract(), PedestalsSummaryFactory::extract(), VpspScanSummaryFactory::extract(), fill(), SummaryPlotFactory< CommissioningAnalysis * >::fill(), SummaryPlotFactory< FedCablingAnalysis * >::fill(), ApvTimingSummaryFactory::format(), PedsOnlySummaryFactory::format(), PedestalsSummaryFactory::format(), CalibrationSummaryFactory::format(), NoiseSummaryFactory::format(), FastFedCablingSummaryFactory::format(), SamplingSummaryFactory::format(), SummaryPlotFactory< FedCablingAnalysis * >::init(), SummaryPlotFactory< CommissioningAnalysis * >::init(), init(), SummaryPlotFactory< T >::init(), and ~SummaryPlotFactoryBase().

sistrip::Granularity SummaryPlotFactoryBase::gran_ [protected]

Definition at line 32 of file SummaryPlotFactoryBase.h.

Referenced by ApvTimingSummaryFactory::extract(), PedsOnlySummaryFactory::extract(), SamplingSummaryFactory::extract(), NoiseSummaryFactory::extract(), FastFedCablingSummaryFactory::extract(), OptoScanSummaryFactory::extract(), CalibrationSummaryFactory::extract(), PedestalsSummaryFactory::extract(), VpspScanSummaryFactory::extract(), fill(), SummaryPlotFactory< FedCablingAnalysis * >::init(), init(), and SummaryPlotFactory< T >::init().

std::string SummaryPlotFactoryBase::level_ [protected]

Definition at line 31 of file SummaryPlotFactoryBase.h.

Referenced by ApvTimingSummaryFactory::extract(), PedsOnlySummaryFactory::extract(), SamplingSummaryFactory::extract(), NoiseSummaryFactory::extract(), FastFedCablingSummaryFactory::extract(), OptoScanSummaryFactory::extract(), CalibrationSummaryFactory::extract(), PedestalsSummaryFactory::extract(), VpspScanSummaryFactory::extract(), fill(), SummaryPlotFactory< FedCablingAnalysis * >::init(), init(), and SummaryPlotFactory< T >::init().

sistrip::Monitorable SummaryPlotFactoryBase::mon_ [protected]

Definition at line 28 of file SummaryPlotFactoryBase.h.

Referenced by ApvTimingSummaryFactory::extract(), PedsOnlySummaryFactory::extract(), SamplingSummaryFactory::extract(), NoiseSummaryFactory::extract(), FastFedCablingSummaryFactory::extract(), OptoScanSummaryFactory::extract(), CalibrationSummaryFactory::extract(), PedestalsSummaryFactory::extract(), VpspScanSummaryFactory::extract(), fill(), SummaryPlotFactory< FedCablingAnalysis * >::fill(), ApvTimingSummaryFactory::format(), PedsOnlySummaryFactory::format(), PedestalsSummaryFactory::format(), VpspScanSummaryFactory::format(), OptoScanSummaryFactory::format(), CalibrationSummaryFactory::format(), NoiseSummaryFactory::format(), SamplingSummaryFactory::format(), FastFedCablingSummaryFactory::format(), SummaryPlotFactory< FedCablingAnalysis * >::init(), and init().

sistrip::Presentation SummaryPlotFactoryBase::pres_ [protected]

Definition at line 29 of file SummaryPlotFactoryBase.h.

Referenced by fill(), and init().

sistrip::View SummaryPlotFactoryBase::view_ [protected]

Definition at line 30 of file SummaryPlotFactoryBase.h.

Referenced by fill(), and init().


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