CMS 3D CMS Logo

PedsOnlySummaryFactory.cc
Go to the documentation of this file.
5 #include <iostream>
6 #include <sstream>
7 
8 using namespace sistrip;
9 
10 // -----------------------------------------------------------------------------
11 //
13  PedsOnlyAnalysis* anal = dynamic_cast<PedsOnlyAnalysis*>(iter->second);
14  if (!anal) {
15  return;
16  }
17 
18  std::vector<float> temp(128, 1. * sistrip::invalid_);
19  std::vector<std::vector<float> > value(2, temp);
20  std::vector<std::vector<float> > peds(2, temp);
21  std::vector<std::vector<float> > noise(2, temp);
22  peds[0] = anal->peds()[0];
23  peds[1] = anal->peds()[1];
24  noise[0] = anal->raw()[0]; //@@ raw noise
25  noise[1] = anal->raw()[1]; //@@ raw noise
26 
27  bool all_strips = false;
28  if (mon_ == sistrip::PEDESTALS_ALL_STRIPS) {
29  all_strips = true;
30  uint16_t bins = peds[0].size();
31  if (peds[0].size() < peds[1].size()) {
32  bins = peds[1].size();
33  }
34  for (uint16_t iped = 0; iped < bins; iped++) {
35  value[0][iped] = peds[0][iped];
36  value[1][iped] = peds[1][iped];
37  }
38  } else if (mon_ == sistrip::PEDESTALS_MEAN) {
39  value[0][0] = anal->pedsMean()[0];
40  value[1][0] = anal->pedsMean()[1];
41  } else if (mon_ == sistrip::PEDESTALS_SPREAD) {
42  value[0][0] = anal->pedsSpread()[0];
43  value[1][0] = anal->pedsSpread()[1];
44  } else if (mon_ == sistrip::PEDESTALS_MAX) {
45  value[0][0] = anal->pedsMax()[0];
46  value[1][0] = anal->pedsMax()[1];
47  } else if (mon_ == sistrip::PEDESTALS_MIN) {
48  value[0][0] = anal->pedsMin()[0];
49  value[1][0] = anal->pedsMin()[1];
50  } else if (mon_ == sistrip::NOISE_ALL_STRIPS) {
51  all_strips = true;
52  uint16_t bins = noise[0].size();
53  if (noise[0].size() < noise[1].size()) {
54  bins = noise[1].size();
55  }
56  for (uint16_t inoise = 0; inoise < bins; inoise++) {
57  value[0][inoise] = noise[0][inoise];
58  value[1][inoise] = noise[1][inoise];
59  }
60  } else if (mon_ == sistrip::NOISE_MEAN) {
61  value[0][0] = anal->rawMean()[0];
62  value[1][0] = anal->rawMean()[1];
63  } else if (mon_ == sistrip::NOISE_SPREAD) {
64  value[0][0] = anal->rawSpread()[0];
65  value[1][0] = anal->rawSpread()[1];
66  } else if (mon_ == sistrip::NOISE_MAX) {
67  value[0][0] = anal->rawMax()[0];
68  value[1][0] = anal->rawMax()[1];
69  } else if (mon_ == sistrip::NOISE_MIN) {
70  value[0][0] = anal->rawMin()[0];
71  value[1][0] = anal->rawMin()[1];
72  } else {
73  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
74  << " Unexpected monitorable: "
76  return;
77  }
78 
79  if (!all_strips) {
82 
85 
86  } else {
87  for (uint16_t istr = 0; istr < value[0].size(); istr++) {
90  }
91 
92  for (uint16_t istr = 0; istr < value[1].size(); istr++) {
95  }
96  }
97 }
98 
99 // -----------------------------------------------------------------------------
100 //
102  if (mon_ == sistrip::PEDESTALS_ALL_STRIPS) {
103  generator_->axisLabel("Pedestal value [adc]");
104  } else if (mon_ == sistrip::PEDESTALS_MEAN) {
105  } else if (mon_ == sistrip::PEDESTALS_SPREAD) {
106  } else if (mon_ == sistrip::PEDESTALS_MAX) {
107  } else if (mon_ == sistrip::PEDESTALS_MIN) {
108  } else if (mon_ == sistrip::NOISE_ALL_STRIPS) {
109  generator_->axisLabel("Noise [adc]");
110  } else if (mon_ == sistrip::NOISE_MEAN) {
111  } else if (mon_ == sistrip::NOISE_SPREAD) {
112  } else if (mon_ == sistrip::NOISE_MAX) {
113  } else if (mon_ == sistrip::NOISE_MIN) {
114  } else if (mon_ == sistrip::NUM_OF_DEAD) {
115  } else if (mon_ == sistrip::NUM_OF_NOISY) {
116  } else {
117  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
118  << " Unexpected SummaryHisto value:"
120  }
121 }
SummaryGenerator::fillMap
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
Definition: SummaryGenerator.cc:222
sistrip::NUM_OF_DEAD
Bad strip.
Definition: ConstantsForMonitorable.h:262
MessageLogger.h
SummaryPlotFactoryBase::mon_
sistrip::Monitorable mon_
Definition: SummaryPlotFactoryBase.h:25
sistrip::NOISE_MEAN
Definition: ConstantsForMonitorable.h:256
sistrip::NUM_OF_NOISY
Definition: ConstantsForMonitorable.h:264
Iterator
Definition: DQMStoreStats.h:94
sistrip::NOISE_ALL_STRIPS
Definition: ConstantsForMonitorable.h:255
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SummaryPlotFactoryBase::level_
std::string level_
Definition: SummaryPlotFactoryBase.h:28
sistrip::PEDESTALS_ALL_STRIPS
Definition: ConstantsForMonitorable.h:249
sistrip::PEDESTALS_MEAN
Definition: ConstantsForMonitorable.h:250
sistrip::PEDESTALS_MIN
Definition: ConstantsForMonitorable.h:253
PedsOnlyAnalysis
Histogram-based analysis for pedestal run.
Definition: PedsOnlyAnalysis.h:15
sistrip::NOISE_MAX
Definition: ConstantsForMonitorable.h:258
SummaryPlotFactoryBase::generator_
SummaryGenerator * generator_
Definition: SummaryPlotFactoryBase.h:32
PedsOnlySummaryFactory.h
PedsOnlyAnalysis.h
value
Definition: value.py:1
PedsOnlySummaryFactory::format
void format() override
Definition: PedsOnlySummaryFactory.cc:101
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
gpuVertexFinder::noise
__shared__ int noise
Definition: gpuFitVertices.h:50
SiStripEnumsAndStrings::monitorable
static std::string monitorable(const sistrip::Monitorable &)
Definition: SiStripEnumsAndStrings.cc:547
SummaryPlotFactoryBase::gran_
sistrip::Granularity gran_
Definition: SummaryPlotFactoryBase.h:29
sistrip::PEDESTALS_SPREAD
Definition: ConstantsForMonitorable.h:251
sistrip::NOISE_MIN
Definition: ConstantsForMonitorable.h:259
sistrip::mlSummaryPlots_
static const char mlSummaryPlots_[]
Definition: ConstantsForLogger.h:26
relativeConstraints.value
value
Definition: relativeConstraints.py:53
SiStripEnumsAndStrings.h
sistrip::PEDESTALS_MAX
Definition: ConstantsForMonitorable.h:252
sistrip::NOISE_SPREAD
Definition: ConstantsForMonitorable.h:257
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
sistrip
sistrip classes
Definition: EnsembleCalibrationLA.cc:10
conversion_template_cfg.anal
anal
Definition: conversion_template_cfg.py:16
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
PedsOnlySummaryFactory::extract
void extract(Iterator) override
Definition: PedsOnlySummaryFactory.cc:12