00001 #include "DQM/SiStripCommissioningSummary/interface/ApvTimingSummaryFactory.h" 00002 #include "CondFormats/SiStripObjects/interface/ApvTimingAnalysis.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 ApvTimingSummaryFactory::extract( Iterator iter ) { 00013 00014 ApvTimingAnalysis* anal = dynamic_cast<ApvTimingAnalysis*>( iter->second ); 00015 if ( !anal ) { return; } 00016 00017 float value = 1. * sistrip::invalid_; 00018 00019 if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_TIME ) { 00020 value = anal->time(); 00021 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_MAX_TIME ) { 00022 value = anal->refTime(); 00023 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_DELAY ) { 00024 value = anal->delay(); 00025 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_BASE ) { 00026 value = anal->base(); 00027 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_PEAK ) { 00028 value = anal->peak(); 00029 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_HEIGHT ) { 00030 value = anal->height(); 00031 } else { 00032 edm::LogWarning(mlSummaryPlots_) 00033 << "[SummaryPlotFactory::" << __func__ << "]" 00034 << " Unexpected monitorable: " 00035 << SiStripEnumsAndStrings::monitorable( SummaryPlotFactoryBase::mon_ ); 00036 return; 00037 } 00038 00039 SummaryPlotFactoryBase::generator_->fillMap( SummaryPlotFactoryBase::level_, 00040 SummaryPlotFactoryBase::gran_, 00041 iter->first, 00042 value ); 00043 00044 } 00045 00046 // ----------------------------------------------------------------------------- 00047 // 00048 void ApvTimingSummaryFactory::format() { 00049 00050 if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_TIME ) { 00051 SummaryPlotFactoryBase::generator_->axisLabel( "Timing delay [ns]" ); 00052 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_MAX_TIME ) { 00053 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_DELAY ) { 00054 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_ERROR ) { 00055 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_BASE ) { 00056 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_PEAK ) { 00057 } else if ( SummaryPlotFactoryBase::mon_ == sistrip::APV_TIMING_HEIGHT ) { 00058 } else { 00059 edm::LogWarning(mlSummaryPlots_) 00060 << "[SummaryPlotFactory::" << __func__ << "]" 00061 << " Unexpected SummaryHisto value:" 00062 << SiStripEnumsAndStrings::monitorable( SummaryPlotFactoryBase::mon_ ); 00063 } 00064 00065 }