CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DQM/SiStripCommissioningSummary/src/CommissioningSummaryFactory.cc

Go to the documentation of this file.
00001 #include "DQM/SiStripCommissioningSummary/interface/CommissioningSummaryFactory.h"
00002 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
00003 
00004 // -----------------------------------------------------------------------------
00005 //
00006 uint32_t SummaryPlotFactory<CommissioningAnalysis*>::init( const sistrip::Monitorable& mon, 
00007                                                            const sistrip::Presentation& pres,
00008                                                            const sistrip::View& view, 
00009                                                            const std::string& level, 
00010                                                            const sistrip::Granularity& gran,
00011                                                            const std::map<uint32_t,CommissioningAnalysis*>& data ) { 
00012   
00013   // initialisation
00014   SummaryPlotFactoryBase::init( mon, pres, view, level, gran );
00015   
00016   // check if generator object exists
00017   if ( !SummaryPlotFactoryBase::generator_ ) { return 0; }
00018   
00019   // extract monitorables and populate map
00020   std::map<uint32_t,CommissioningAnalysis*>::const_iterator iter = data.begin();
00021   for ( ; iter != data.end(); iter++ ) { extract( iter ); }
00022   
00023   return SummaryPlotFactoryBase::generator_->nBins();
00024   
00025 }
00026 
00027 // -----------------------------------------------------------------------------
00028 //
00029 void SummaryPlotFactory<CommissioningAnalysis*>::fill( TH1& summary_histo ) {
00030   
00031   // fill histogram
00032   SummaryPlotFactoryBase::fill( summary_histo );
00033   
00034   // check if generator object exists 
00035   if ( !SummaryPlotFactoryBase::generator_ ) { return; }
00036   
00037   // format histo
00038   format();
00039   
00040 } 
00041 
00042 // -----------------------------------------------------------------------------
00043 //
00044 template class SummaryPlotFactory<CommissioningAnalysis*>;