CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DQM/SiStripCommissioningSummary/src/SamplingSummaryFactory.cc

Go to the documentation of this file.
00001 #include "DQM/SiStripCommissioningSummary/interface/SamplingSummaryFactory.h"
00002 #include "CondFormats/SiStripObjects/interface/SamplingAnalysis.h"
00003 #include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
00004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005 #include <iostream>
00006 #include <sstream>
00007 
00008 using namespace sistrip;
00009 
00010 // -----------------------------------------------------------------------------
00011 //
00012 void SamplingSummaryFactory::extract( Iterator iter ) {
00013 
00014   SamplingAnalysis* anal = dynamic_cast<SamplingAnalysis*>( iter->second );
00015   if ( !anal ) { return; }
00016 
00017   if ( mon_ == sistrip::FINE_DELAY_POS ) { 
00018     generator_->fillMap( level_, gran_, iter->first, anal->maximum() ); 
00019   } else if ( mon_ == sistrip::FINE_DELAY_ERROR ) { 
00020     generator_->fillMap( level_, gran_, iter->first, anal->error() ); 
00021   } else {
00022     edm::LogWarning(mlSummaryPlots_)
00023         << "[SummaryPlotFactory::" << __func__ << "]"
00024         << " Unexpected monitorable: "
00025         << SiStripEnumsAndStrings::monitorable( SummaryPlotFactoryBase::mon_ );
00026     return;
00027   }
00028 }
00029 
00030 //------------------------------------------------------------------------------
00031 //
00032 void SamplingSummaryFactory::format() {
00033 
00034   // Histogram formatting
00035   if ( mon_ == sistrip::FINE_DELAY_POS ) {
00036     generator_->axisLabel( "Delay [ns]" );
00037   } else if ( mon_ == sistrip::FINE_DELAY_ERROR ) { 
00038     generator_->axisLabel( "Uncertainty [ns]" );
00039   } else { 
00040     edm::LogWarning(mlSummaryPlots_)
00041          << "[SummaryPlotFactory::" << __func__ << "]"
00042          <<  " Unexpected SummaryHisto value:"
00043          << SiStripEnumsAndStrings::monitorable( SummaryPlotFactoryBase::mon_ ) ;
00044   } 
00045   
00046 }
00047