CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Protected Member Functions
PedestalsSummaryFactory Class Reference

#include <PedestalsSummaryFactory.h>

Inheritance diagram for PedestalsSummaryFactory:
SummaryPlotFactory< CommissioningAnalysis * > SummaryPlotFactoryBase

Protected Member Functions

void extract (Iterator) override
 
void format () override
 
- Protected Member Functions inherited from SummaryPlotFactoryBase
void fill (TH1 &summary_histo)
 
void init (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &)
 
 SummaryPlotFactoryBase ()
 
 ~SummaryPlotFactoryBase ()
 

Additional Inherited Members

- Public Types inherited from SummaryPlotFactory< CommissioningAnalysis * >
typedef std::map< uint32_t,
CommissioningAnalysis * >
::const_iterator 
Iterator
 
- Public Member Functions inherited from SummaryPlotFactory< CommissioningAnalysis * >
void fill (TH1 &summary_histo)
 
uint32_t init (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &, const std::map< uint32_t, CommissioningAnalysis * > &data)
 
 SummaryPlotFactory ()
 
virtual ~SummaryPlotFactory ()
 
- Protected Attributes inherited from SummaryPlotFactoryBase
SummaryGeneratorgenerator_
 
sistrip::Granularity gran_
 
std::string level_
 
sistrip::Monitorable mon_
 
sistrip::Presentation pres_
 
sistrip::View view_
 

Detailed Description

Definition at line 6 of file PedestalsSummaryFactory.h.

Member Function Documentation

void PedestalsSummaryFactory::extract ( Iterator  iter)
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 12 of file PedestalsSummaryFactory.cc.

References PedestalsAnalysis::dead(), SummaryGenerator::fillMap(), SummaryPlotFactoryBase::generator_, SummaryPlotFactoryBase::gran_, sistrip::invalid_, SummaryPlotFactoryBase::level_, sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), PedestalsAnalysis::noise(), gpuVertexFinder::noise, sistrip::NOISE_ALL_STRIPS, sistrip::NOISE_MAX, sistrip::NOISE_MEAN, sistrip::NOISE_MIN, sistrip::NOISE_SPREAD, PedestalsAnalysis::noiseMax(), PedestalsAnalysis::noiseMean(), PedestalsAnalysis::noiseMin(), PedestalsAnalysis::noiseSpread(), PedestalsAnalysis::noisy(), sistrip::NUM_OF_DEAD, sistrip::NUM_OF_NOISY, sistrip::PEDESTALS_ALL_STRIPS, sistrip::PEDESTALS_MAX, sistrip::PEDESTALS_MEAN, sistrip::PEDESTALS_MIN, sistrip::PEDESTALS_SPREAD, PedestalsAnalysis::peds(), PedestalsAnalysis::pedsMax(), PedestalsAnalysis::pedsMean(), PedestalsAnalysis::pedsMin(), PedestalsAnalysis::pedsSpread(), findQualityFiles::size, groupFilesInBlocks::temp, and relativeConstraints::value.

Referenced by BeautifulSoup.PageElement::_invert(), and BeautifulSoup.Tag::decompose().

12  {
13  PedestalsAnalysis* anal = dynamic_cast<PedestalsAnalysis*>(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->noise()[0];
25  noise[1] = anal->noise()[1];
26 
27  bool all_strips = false;
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->noiseMean()[0];
62  value[1][0] = anal->noiseMean()[1];
63  } else if (mon_ == sistrip::NOISE_SPREAD) {
64  value[0][0] = anal->noiseSpread()[0];
65  value[1][0] = anal->noiseSpread()[1];
66  } else if (mon_ == sistrip::NOISE_MAX) {
67  value[0][0] = anal->noiseMax()[0];
68  value[1][0] = anal->noiseMax()[1];
69  } else if (mon_ == sistrip::NOISE_MIN) {
70  value[0][0] = anal->noiseMin()[0];
71  value[1][0] = anal->noiseMin()[1];
72  } else if (mon_ == sistrip::NUM_OF_DEAD) {
73  value[0][0] = 1. * anal->dead()[0].size();
74  value[1][0] = 1. * anal->dead()[1].size();
75  } else if (mon_ == sistrip::NUM_OF_NOISY) {
76  value[0][0] = 1. * anal->noisy()[0].size();
77  value[1][0] = 1. * anal->noisy()[1].size();
78  } else {
79  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
80  << " Unexpected monitorable: "
82  return;
83  }
84 
85  if (!all_strips) {
88 
91 
92  } else {
93  for (uint16_t istr = 0; istr < value[0].size(); istr++) {
96  }
97 
98  for (uint16_t istr = 0; istr < value[1].size(); istr++) {
101  }
102  }
103 }
static std::string monitorable(const sistrip::Monitorable &)
const VFloat & pedsMean() const
const VVInt & noisy() const
sistrip::Monitorable mon_
const VVFloat & peds() const
const VFloat & noiseMean() const
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
const VFloat & pedsMin() const
const VVFloat & noise() const
Histogram-based analysis for pedestal run.
const VVInt & dead() const
sistrip::Granularity gran_
__shared__ int noise
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
static const uint16_t invalid_
Definition: Constants.h:16
const VFloat & pedsSpread() const
const VFloat & pedsMax() const
const VFloat & noiseSpread() const
const VFloat & noiseMax() const
Log< level::Warning, false > LogWarning
tuple size
Write out results.
const VFloat & noiseMin() const
void PedestalsSummaryFactory::format ( )
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 107 of file PedestalsSummaryFactory.cc.

References sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), sistrip::NOISE_ALL_STRIPS, sistrip::NOISE_MAX, sistrip::NOISE_MEAN, sistrip::NOISE_MIN, sistrip::NOISE_SPREAD, sistrip::NUM_OF_DEAD, sistrip::NUM_OF_NOISY, sistrip::PEDESTALS_ALL_STRIPS, sistrip::PEDESTALS_MAX, sistrip::PEDESTALS_MEAN, sistrip::PEDESTALS_MIN, and sistrip::PEDESTALS_SPREAD.

107  {
109  generator_->axisLabel("Pedestal value [adc]");
110  } else if (mon_ == sistrip::PEDESTALS_MEAN) {
111  } else if (mon_ == sistrip::PEDESTALS_SPREAD) {
112  } else if (mon_ == sistrip::PEDESTALS_MAX) {
113  } else if (mon_ == sistrip::PEDESTALS_MIN) {
114  } else if (mon_ == sistrip::NOISE_ALL_STRIPS) {
115  generator_->axisLabel("Noise [adc]");
116  } else if (mon_ == sistrip::NOISE_MEAN) {
117  } else if (mon_ == sistrip::NOISE_SPREAD) {
118  } else if (mon_ == sistrip::NOISE_MAX) {
119  } else if (mon_ == sistrip::NOISE_MIN) {
120  } else if (mon_ == sistrip::NUM_OF_DEAD) {
121  } else if (mon_ == sistrip::NUM_OF_NOISY) {
122  } else {
123  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
124  << " Unexpected SummaryHisto value:"
126  }
127 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
Log< level::Warning, false > LogWarning
void axisLabel(const std::string &)