Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:40

0001 #include "DQM/SiStripCommissioningSummary/interface/OptoScanSummaryFactory.h"
0002 #include "CondFormats/SiStripObjects/interface/OptoScanAnalysis.h"
0003 #include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include <iostream>
0006 #include <sstream>
0007 
0008 using namespace sistrip;
0009 
0010 // -----------------------------------------------------------------------------
0011 //
0012 void OptoScanSummaryFactory::extract(Iterator iter) {
0013   OptoScanAnalysis* anal = dynamic_cast<OptoScanAnalysis*>(iter->second);
0014   if (!anal) {
0015     return;
0016   }
0017 
0018   uint16_t igain = anal->gain();
0019   if (igain > sistrip::valid_) {
0020     return;
0021   }
0022 
0023   float value = 1. * sistrip::invalid_;
0024   float error = 1. * sistrip::invalid_;
0025 
0026   if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_GAIN_SETTING) {
0027     value = igain;
0028   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_BIAS_SETTING) {
0029     value = anal->bias()[igain];
0030   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_MEASURED_GAIN) {
0031     value = anal->measGain()[igain];
0032   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL) {
0033     value = anal->zeroLight()[igain];
0034   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LINK_NOISE) {
0035     value = anal->linkNoise()[igain];
0036   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_BASELINE_LIFT_OFF) {
0037     value = anal->liftOff()[igain];
0038   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LASER_THRESHOLD) {
0039     value = anal->threshold()[igain];
0040   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_TICK_HEIGHT) {
0041     value = anal->tickHeight()[igain];
0042   } else {
0043     edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
0044                                      << " Unexpected monitorable: "
0045                                      << SiStripEnumsAndStrings::monitorable(SummaryPlotFactoryBase::mon_);
0046     return;
0047   }
0048 
0049   SummaryPlotFactoryBase::generator_->fillMap(
0050       SummaryPlotFactoryBase::level_, SummaryPlotFactoryBase::gran_, iter->first, value, error);
0051 }
0052 
0053 // -----------------------------------------------------------------------------
0054 //
0055 void OptoScanSummaryFactory::format() {
0056   if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_GAIN_SETTING) {
0057   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LLD_BIAS_SETTING) {
0058   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_MEASURED_GAIN) {
0059   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL) {
0060   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LINK_NOISE) {
0061   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_BASELINE_LIFT_OFF) {
0062   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_LASER_THRESHOLD) {
0063   } else if (SummaryPlotFactoryBase::mon_ == sistrip::OPTO_SCAN_TICK_HEIGHT) {
0064   } else {
0065     edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
0066                                      << " Unexpected SummaryHisto value:"
0067                                      << SiStripEnumsAndStrings::monitorable(SummaryPlotFactoryBase::mon_);
0068   }
0069 }