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

void DaqScopeModeSummaryFactory::extract ( Iterator  iter)
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 12 of file DaqScopeModeSummaryFactory.cc.

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

12  {
13 
14  DaqScopeModeAnalysis* anal = dynamic_cast<DaqScopeModeAnalysis*>( iter->second );
15  if ( !anal ) { return; }
16 
17  std::vector<float> temp(128, 1. * sistrip::invalid_ );
18  std::vector< std::vector<float> > value( 2, temp );
19  std::vector< std::vector<float> > peds ( 2, temp );
20  std::vector< std::vector<float> > noise( 2, temp );
21  peds[0] = anal->peds()[0];
22  peds[1] = anal->peds()[1];
23  noise[0] = anal->noise()[0];
24  noise[1] = anal->noise()[1];
25  float valueAlt = 1. * sistrip::invalid_;
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() ) { bins = peds[1].size(); }
32  for ( uint16_t iped = 0; iped < bins; iped++ ) {
33  value[0][iped] = peds[0][iped];
34  value[1][iped] = peds[1][iped];
35  }
36  } else if ( mon_ == sistrip::PEDESTALS_MEAN ) {
37  value[0][0] = anal->pedsMean()[0];
38  value[1][0] = anal->pedsMean()[1];
39  } else if ( mon_ == sistrip::PEDESTALS_SPREAD ) {
40  value[0][0] = anal->pedsSpread()[0];
41  value[1][0] = anal->pedsSpread()[1];
42  } else if ( mon_ == sistrip::PEDESTALS_MAX ) {
43  value[0][0] = anal->pedsMax()[0];
44  value[1][0] = anal->pedsMax()[1];
45  } else if ( mon_ == sistrip::PEDESTALS_MIN ) {
46  value[0][0] = anal->pedsMin()[0];
47  value[1][0] = anal->pedsMin()[1];
48  } else if ( mon_ == sistrip::NOISE_ALL_STRIPS ) {
49  all_strips = true;
50  uint16_t bins = noise[0].size();
51  if ( noise[0].size() < noise[1].size() ) { bins = noise[1].size(); }
52  for ( uint16_t inoise = 0; inoise < bins; inoise++ ) {
53  value[0][inoise] = noise[0][inoise];
54  value[1][inoise] = noise[1][inoise];
55  }
56  } else if ( mon_ == sistrip::NOISE_MEAN ) {
57  value[0][0] = anal->noiseMean()[0];
58  value[1][0] = anal->noiseMean()[1];
59  } else if ( mon_ == sistrip::NOISE_SPREAD ) {
60  value[0][0] = anal->noiseSpread()[0];
61  value[1][0] = anal->noiseSpread()[1];
62  } else if ( mon_ == sistrip::NOISE_MAX ) {
63  value[0][0] = anal->noiseMax()[0];
64  value[1][0] = anal->noiseMax()[1];
65  } else if ( mon_ == sistrip::NOISE_MIN ) {
66  value[0][0] = anal->noiseMin()[0];
67  value[1][0] = anal->noiseMin()[1];
68  } else if ( mon_ == sistrip::NUM_OF_DEAD ) {
69  value[0][0] = 1. * anal->dead()[0].size();
70  value[1][0] = 1. * anal->dead()[1].size();
71  } else if ( mon_ == sistrip::NUM_OF_NOISY ) {
72  value[0][0] = 1. * anal->noisy()[0].size();
73  value[1][0] = 1. * anal->noisy()[1].size();
74  } else if ( mon_ == sistrip::APV_TIMING_BASE ) {
75  valueAlt = anal->base();
76  } else if ( mon_ == sistrip::APV_TIMING_PEAK ) {
77  valueAlt = anal->peak();
78  } else if ( mon_ == sistrip::APV_TIMING_HEIGHT ) {
79  valueAlt = anal->height();
80  }
81  else {
83  << "[SummaryPlotFactory::" << __func__ << "]"
84  << " Unexpected monitorable: "
86  return;
87  }
88 
89  if ( !all_strips ) {
90 
93  iter->first,
94  value[0][0] );
95 
98  iter->first,
99  value[1][0] );
100 
103  iter->first,
104  valueAlt );
105 
106  } else {
107 
108  for ( uint16_t istr = 0; istr < value[0].size(); istr++ ) {
111  iter->first,
112  value[0][istr] );
113  }
114 
115  for ( uint16_t istr = 0; istr < value[1].size(); istr++ ) {
118  iter->first,
119  value[1][istr] );
120  }
121 
122  }
123 
124 }
size
Write out results.
static std::string monitorable(const sistrip::Monitorable &)
const VFloat & noiseMean() const
const VVInt & dead() const
sistrip::Monitorable mon_
const VFloat & noiseSpread() const
const VFloat & noiseMax() 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 & pedsSpread() const
const VVFloat & noise() const
const float & base() const
const VVFloat & peds() const
const float & height() const
Definition: value.py:1
sistrip::Granularity gran_
const VFloat & noiseMin() const
const float & peak() const
static const char mlSummaryPlots_[]
const VFloat & pedsMean() const
const VVInt & noisy() const
SummaryGenerator * generator_
static const uint16_t invalid_
Definition: Constants.h:16
const VFloat & pedsMax() const
const VFloat & pedsMin() const
Analysis for scope mode data.
void DaqScopeModeSummaryFactory::format ( )
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 128 of file DaqScopeModeSummaryFactory.cc.

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.

128  {
129 
131  generator_->axisLabel( "Pedestal value [adc]" );
132  } else if ( mon_ == sistrip::PEDESTALS_MEAN ) {
133  } else if ( mon_ == sistrip::PEDESTALS_SPREAD ) {
134  } else if ( mon_ == sistrip::PEDESTALS_MAX ) {
135  } else if ( mon_ == sistrip::PEDESTALS_MIN ) {
136  } else if ( mon_ == sistrip::NOISE_ALL_STRIPS ) {
137  generator_->axisLabel( "Noise [adc]" );
138  } else if ( mon_ == sistrip::NOISE_MEAN ) {
139  } else if ( mon_ == sistrip::NOISE_SPREAD ) {
140  } else if ( mon_ == sistrip::NOISE_MAX ) {
141  } else if ( mon_ == sistrip::NOISE_MIN ) {
142  } else if ( mon_ == sistrip::NUM_OF_DEAD ) {
143  } else if ( mon_ == sistrip::NUM_OF_NOISY ) {
144  }
146  SummaryPlotFactoryBase::generator_->axisLabel( "Timing delay [ns]" );
153  } else {
155  << "[SummaryPlotFactory::" << __func__ << "]"
156  << " Unexpected SummaryHisto value:"
158  }
159 
160 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
void axisLabel(const std::string &)