File indexing completed on 2024-04-06 12:08:38
0001 #include "DQM/SiStripCommissioningSummary/interface/SamplingSummaryFactory.h"
0002 #include "CondFormats/SiStripObjects/interface/SamplingAnalysis.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 SamplingSummaryFactory::extract(Iterator iter) {
0013 SamplingAnalysis* anal = dynamic_cast<SamplingAnalysis*>(iter->second);
0014 if (!anal) {
0015 return;
0016 }
0017
0018 if (mon_ == sistrip::FINE_DELAY_POS) {
0019 generator_->fillMap(level_, gran_, iter->first, anal->maximum());
0020 } else if (mon_ == sistrip::FINE_DELAY_ERROR) {
0021 generator_->fillMap(level_, gran_, iter->first, anal->error());
0022 } else {
0023 edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
0024 << " Unexpected monitorable: "
0025 << SiStripEnumsAndStrings::monitorable(SummaryPlotFactoryBase::mon_);
0026 return;
0027 }
0028 }
0029
0030
0031
0032 void SamplingSummaryFactory::format() {
0033
0034 if (mon_ == sistrip::FINE_DELAY_POS) {
0035 generator_->axisLabel("Delay [ns]");
0036 } else if (mon_ == sistrip::FINE_DELAY_ERROR) {
0037 generator_->axisLabel("Uncertainty [ns]");
0038 } else {
0039 edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
0040 << " Unexpected SummaryHisto value:"
0041 << SiStripEnumsAndStrings::monitorable(SummaryPlotFactoryBase::mon_);
0042 }
0043 }