Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:08:37

0001 #include "DQM/SiStripCommissioningSummary/interface/CommissioningSummaryFactory.h"
0002 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
0003 
0004 // -----------------------------------------------------------------------------
0005 //
0006 uint32_t SummaryPlotFactory<CommissioningAnalysis*>::init(const sistrip::Monitorable& mon,
0007                                                           const sistrip::Presentation& pres,
0008                                                           const sistrip::View& view,
0009                                                           const std::string& level,
0010                                                           const sistrip::Granularity& gran,
0011                                                           const std::map<uint32_t, CommissioningAnalysis*>& data) {
0012   // initialisation
0013   SummaryPlotFactoryBase::init(mon, pres, view, level, gran);
0014 
0015   // check if generator object exists
0016   if (!SummaryPlotFactoryBase::generator_) {
0017     return 0;
0018   }
0019 
0020   // extract monitorables and populate map
0021   std::map<uint32_t, CommissioningAnalysis*>::const_iterator iter = data.begin();
0022   for (; iter != data.end(); iter++) {
0023     extract(iter);
0024   }
0025 
0026   return SummaryPlotFactoryBase::generator_->nBins();
0027 }
0028 
0029 // -----------------------------------------------------------------------------
0030 //
0031 void SummaryPlotFactory<CommissioningAnalysis*>::fill(TH1& summary_histo) {
0032   // fill histogram
0033   SummaryPlotFactoryBase::fill(summary_histo);
0034 
0035   // check if generator object exists
0036   if (!SummaryPlotFactoryBase::generator_) {
0037     return;
0038   }
0039 
0040   // format histo
0041   format();
0042 }