CMS 3D CMS Logo

List of all members | Protected Member Functions
DaqScopeModeSummaryFactory Class Reference

#include <DaqScopeModeSummaryFactory.h>

Inheritance diagram for DaqScopeModeSummaryFactory:
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 DaqScopeModeSummaryFactory.h.

Member Function Documentation

◆ extract()

void DaqScopeModeSummaryFactory::extract ( Iterator  iter)
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 12 of file DaqScopeModeSummaryFactory.cc.

12  {
13  DaqScopeModeAnalysis* anal = dynamic_cast<DaqScopeModeAnalysis*>(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  float valueAlt = 1. * sistrip::invalid_;
27 
28  bool all_strips = false;
30  all_strips = true;
31  uint16_t bins = peds[0].size();
32  if (peds[0].size() < peds[1].size()) {
33  bins = peds[1].size();
34  }
35  for (uint16_t iped = 0; iped < bins; iped++) {
36  value[0][iped] = peds[0][iped];
37  value[1][iped] = peds[1][iped];
38  }
39  } else if (mon_ == sistrip::PEDESTALS_MEAN) {
40  value[0][0] = anal->pedsMean()[0];
41  value[1][0] = anal->pedsMean()[1];
42  } else if (mon_ == sistrip::PEDESTALS_SPREAD) {
43  value[0][0] = anal->pedsSpread()[0];
44  value[1][0] = anal->pedsSpread()[1];
45  } else if (mon_ == sistrip::PEDESTALS_MAX) {
46  value[0][0] = anal->pedsMax()[0];
47  value[1][0] = anal->pedsMax()[1];
48  } else if (mon_ == sistrip::PEDESTALS_MIN) {
49  value[0][0] = anal->pedsMin()[0];
50  value[1][0] = anal->pedsMin()[1];
51  } else if (mon_ == sistrip::NOISE_ALL_STRIPS) {
52  all_strips = true;
53  uint16_t bins = noise[0].size();
54  if (noise[0].size() < noise[1].size()) {
55  bins = noise[1].size();
56  }
57  for (uint16_t inoise = 0; inoise < bins; inoise++) {
58  value[0][inoise] = noise[0][inoise];
59  value[1][inoise] = noise[1][inoise];
60  }
61  } else if (mon_ == sistrip::NOISE_MEAN) {
62  value[0][0] = anal->noiseMean()[0];
63  value[1][0] = anal->noiseMean()[1];
64  } else if (mon_ == sistrip::NOISE_SPREAD) {
65  value[0][0] = anal->noiseSpread()[0];
66  value[1][0] = anal->noiseSpread()[1];
67  } else if (mon_ == sistrip::NOISE_MAX) {
68  value[0][0] = anal->noiseMax()[0];
69  value[1][0] = anal->noiseMax()[1];
70  } else if (mon_ == sistrip::NOISE_MIN) {
71  value[0][0] = anal->noiseMin()[0];
72  value[1][0] = anal->noiseMin()[1];
73  } else if (mon_ == sistrip::NUM_OF_DEAD) {
74  value[0][0] = 1. * anal->dead()[0].size();
75  value[1][0] = 1. * anal->dead()[1].size();
76  } else if (mon_ == sistrip::NUM_OF_NOISY) {
77  value[0][0] = 1. * anal->noisy()[0].size();
78  value[1][0] = 1. * anal->noisy()[1].size();
79  } else if (mon_ == sistrip::APV_TIMING_BASE) {
80  valueAlt = anal->base();
81  } else if (mon_ == sistrip::APV_TIMING_PEAK) {
82  valueAlt = anal->peak();
83  } else if (mon_ == sistrip::APV_TIMING_HEIGHT) {
84  valueAlt = anal->height();
85  } else {
86  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
87  << " Unexpected monitorable: "
89  return;
90  }
91 
92  if (!all_strips) {
95 
98 
101 
102  } else {
103  for (uint16_t istr = 0; istr < value[0].size(); istr++) {
106  }
107 
108  for (uint16_t istr = 0; istr < value[1].size(); istr++) {
111  }
112  }
113 }

References conversion_template_cfg::anal, sistrip::APV_TIMING_BASE, sistrip::APV_TIMING_HEIGHT, sistrip::APV_TIMING_PEAK, trigObjTnPSource_cfi::bins, SummaryGenerator::fillMap(), SummaryPlotFactoryBase::generator_, SummaryPlotFactoryBase::gran_, sistrip::invalid_, SummaryPlotFactoryBase::level_, sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), gpuVertexFinder::noise, 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, sistrip::PEDESTALS_SPREAD, findQualityFiles::size, groupFilesInBlocks::temp, and relativeConstraints::value.

◆ format()

void DaqScopeModeSummaryFactory::format ( )
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 117 of file DaqScopeModeSummaryFactory.cc.

117  {
119  generator_->axisLabel("Pedestal value [adc]");
120  } else if (mon_ == sistrip::PEDESTALS_MEAN) {
121  } else if (mon_ == sistrip::PEDESTALS_SPREAD) {
122  } else if (mon_ == sistrip::PEDESTALS_MAX) {
123  } else if (mon_ == sistrip::PEDESTALS_MIN) {
124  } else if (mon_ == sistrip::NOISE_ALL_STRIPS) {
125  generator_->axisLabel("Noise [adc]");
126  } else if (mon_ == sistrip::NOISE_MEAN) {
127  } else if (mon_ == sistrip::NOISE_SPREAD) {
128  } else if (mon_ == sistrip::NOISE_MAX) {
129  } else if (mon_ == sistrip::NOISE_MIN) {
130  } else if (mon_ == sistrip::NUM_OF_DEAD) {
131  } else if (mon_ == sistrip::NUM_OF_NOISY) {
133  SummaryPlotFactoryBase::generator_->axisLabel("Timing delay [ns]");
140  } else {
141  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
142  << " Unexpected SummaryHisto value:"
144  }
145 }

References sistrip::APV_TIMING_BASE, sistrip::APV_TIMING_DELAY, sistrip::APV_TIMING_ERROR, sistrip::APV_TIMING_HEIGHT, sistrip::APV_TIMING_MAX_TIME, sistrip::APV_TIMING_PEAK, sistrip::APV_TIMING_TIME, SummaryGenerator::axisLabel(), SummaryPlotFactoryBase::generator_, 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.

sistrip::APV_TIMING_TIME
Definition: ConstantsForMonitorable.h:218
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
SummaryPlotFactoryBase::mon_
sistrip::Monitorable mon_
Definition: SummaryPlotFactoryBase.h:25
sistrip::NOISE_MEAN
Definition: ConstantsForMonitorable.h:256
sistrip::APV_TIMING_BASE
Definition: ConstantsForMonitorable.h:222
sistrip::NUM_OF_NOISY
Definition: ConstantsForMonitorable.h:264
sistrip::APV_TIMING_ERROR
Definition: ConstantsForMonitorable.h:221
sistrip::APV_TIMING_DELAY
Definition: ConstantsForMonitorable.h:220
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
DaqScopeModeAnalysis
Analysis for scope mode data.
Definition: DaqScopeModeAnalysis.h:16
sistrip::PEDESTALS_MIN
Definition: ConstantsForMonitorable.h:253
sistrip::APV_TIMING_MAX_TIME
Definition: ConstantsForMonitorable.h:219
sistrip::NOISE_MAX
Definition: ConstantsForMonitorable.h:258
SummaryPlotFactoryBase::generator_
SummaryGenerator * generator_
Definition: SummaryPlotFactoryBase.h:32
value
Definition: value.py:1
sistrip::APV_TIMING_PEAK
Definition: ConstantsForMonitorable.h:223
SummaryGenerator::axisLabel
void axisLabel(const std::string &)
Definition: SummaryGenerator.h:135
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::APV_TIMING_HEIGHT
Definition: ConstantsForMonitorable.h:224
sistrip::mlSummaryPlots_
static const char mlSummaryPlots_[]
Definition: ConstantsForLogger.h:26
relativeConstraints.value
value
Definition: relativeConstraints.py:53
sistrip::PEDESTALS_MAX
Definition: ConstantsForMonitorable.h:252
sistrip::NOISE_SPREAD
Definition: ConstantsForMonitorable.h:257
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
conversion_template_cfg.anal
anal
Definition: conversion_template_cfg.py:16
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443