CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
CommissioningTask::HistoSet Class Reference

#include <CommissioningTask.h>

Public Member Functions

uint32_t bin (float value)
 
void histo (MonitorElement *)
 
MonitorElementhisto ()
 
 HistoSet ()
 

Public Attributes

bool explicitFill_
 
bool isProfile_
 
std::vector< float > vNumOfEntries_
 
std::vector< float > vSumOfContents_
 
std::vector< double > vSumOfSquares_
 

Private Attributes

TAxis * axis_
 
MonitorElementhisto_
 

Detailed Description

Simple container class holding pointer to root histogram, and vectors in which data are cached and used to update histo.

Definition at line 37 of file CommissioningTask.h.

Constructor & Destructor Documentation

CommissioningTask::HistoSet::HistoSet ( )

Definition at line 86 of file CommissioningTask.cc.

86  :
87  vNumOfEntries_(),
88  vSumOfContents_(),
89  vSumOfSquares_(),
90  isProfile_(true),
91  explicitFill_(false),
92  histo_(0),
93  axis_(0)
94 {;}
std::vector< float > vNumOfEntries_
std::vector< float > vSumOfContents_
std::vector< double > vSumOfSquares_

Member Function Documentation

uint32_t CommissioningTask::HistoSet::bin ( float  value)

Definition at line 130 of file CommissioningTask.cc.

References axis_, and stringResolutionProvider_cfi::bin.

Referenced by CommissioningTask::updateHistoSet().

130  {
131  if ( !axis_ ) { return 0; }
132  float range = axis_->GetXmax() - axis_->GetXmin();
133  if ( range > 0. ) {
134  int32_t bin = static_cast<int32_t>( ( value - axis_->GetXmin() ) *
135  ( axis_->GetNbins() / range ) ) + 1;
136  if ( bin < 0 ) { return 0; }
137  else if ( bin > axis_->GetNbins() ) { return static_cast<uint32_t>( axis_->GetNbins() + 1 ); }
138  else { return bin; }
139  } else { return 0; }
140 }
Definition: value.py:1
void CommissioningTask::HistoSet::histo ( MonitorElement me)

Definition at line 114 of file CommissioningTask.cc.

References axis_, extract(), CommissioningTask::CompactHistoSet::histo(), and CommissioningTask::CompactHistoSet::histo_.

Referenced by FastFedCablingTask::book(), DaqScopeModeTask::book(), ApvTimingTask::book(), FedTimingTask::book(), FineDelayTask::book(), LatencyTask::book(), CalibrationScanTask::book(), NoiseTask::book(), PedsOnlyTask::book(), PedsFullNoiseTask::book(), CalibrationScanTask::checkAndSave(), PedsFullNoiseTask::update(), and CommissioningTask::updateHistoSet().

114  {
115  histo_ = me;
117  if ( histo_ ) { axis_ = histo->GetXaxis(); }
118  //TProfile* prof = ExtractTObject<TProfile>().extract( histo_ );
119  //if ( prof ) { prof->SetErrorOption("s"); }
120 }
int extract(std::vector< int > *output, const std::string &dati)
MonitorElement * CommissioningTask::HistoSet::histo ( )

Definition at line 106 of file CommissioningTask.cc.

References CommissioningTask::CompactHistoSet::histo_.

106 { return histo_; }

Member Data Documentation

TAxis* CommissioningTask::HistoSet::axis_
private

Definition at line 50 of file CommissioningTask.h.

bool CommissioningTask::HistoSet::explicitFill_
MonitorElement* CommissioningTask::HistoSet::histo_
private

Definition at line 49 of file CommissioningTask.h.

bool CommissioningTask::HistoSet::isProfile_
std::vector<float> CommissioningTask::HistoSet::vNumOfEntries_
std::vector<float> CommissioningTask::HistoSet::vSumOfContents_
std::vector<double> CommissioningTask::HistoSet::vSumOfSquares_