CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DQM/SiStripCommissioningSummary/src/OptoScanSummaryFactory.cc

Go to the documentation of this file.
00001 #include "DQM/SiStripCommissioningSummary/interface/OptoScanSummaryFactory.h"
00002 #include "CondFormats/SiStripObjects/interface/OptoScanAnalysis.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 OptoScanSummaryFactory::extract( Iterator iter ) {
00013   
00014   OptoScanAnalysis* anal = dynamic_cast<OptoScanAnalysis*>( iter->second );
00015   if ( !anal ) { return; }
00016 
00017   uint16_t igain = anal->gain();
00018   if ( igain > sistrip::valid_ ) { return; }
00019   
00020   float value = 1. * sistrip::invalid_;
00021   float error = 1. * sistrip::invalid_;
00022   
00023   if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_GAIN_SETTING ) { 
00024     value = igain; 
00025   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_BIAS_SETTING ) { 
00026     value = anal->bias()[igain]; 
00027   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_MEASURED_GAIN ) { 
00028     value = anal->measGain()[igain]; 
00029   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL ) { 
00030     value = anal->zeroLight()[igain]; 
00031   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LINK_NOISE ) { 
00032     value = anal->linkNoise()[igain]; 
00033   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_BASELINE_LIFT_OFF ) { 
00034     value = anal->liftOff()[igain]; 
00035   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LASER_THRESHOLD ) { 
00036     value = anal->threshold()[igain]; 
00037   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_TICK_HEIGHT ) { 
00038     value = anal->tickHeight()[igain]; 
00039   } else { 
00040     edm::LogWarning(mlSummaryPlots_)
00041       << "[SummaryPlotFactory::" << __func__ << "]" 
00042       << " Unexpected monitorable: "
00043       << SiStripEnumsAndStrings::monitorable( SummaryPlotFactoryBase::mon_ );
00044     return; 
00045     
00046   }
00047   
00048   SummaryPlotFactoryBase::generator_->fillMap( SummaryPlotFactoryBase::level_, 
00049                                                SummaryPlotFactoryBase::gran_, 
00050                                                iter->first, 
00051                                                value,
00052                                                error );
00053   
00054 }
00055 
00056 // -----------------------------------------------------------------------------
00057 //
00058 void OptoScanSummaryFactory::format() {
00059   
00060   if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_GAIN_SETTING ) { 
00061   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_BIAS_SETTING ) {
00062   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_MEASURED_GAIN ) { 
00063   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL ) { 
00064   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LINK_NOISE ) {
00065   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_BASELINE_LIFT_OFF ) {
00066   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LASER_THRESHOLD ) {
00067   } else if ( SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_TICK_HEIGHT ) {
00068   } else { 
00069     edm::LogWarning(mlSummaryPlots_)
00070       << "[SummaryPlotFactory::" << __func__ << "]" 
00071       << " Unexpected SummaryHisto value:"
00072       << SiStripEnumsAndStrings::monitorable( SummaryPlotFactoryBase::mon_ );
00073   } 
00074 
00075 }