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)
 
MonitorElementhisto ()
 
void histo (MonitorElement *)
 
 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 38 of file CommissioningTask.h.

Constructor & Destructor Documentation

◆ HistoSet()

CommissioningTask::HistoSet::HistoSet ( )

Definition at line 64 of file CommissioningTask.cc.

65  : vNumOfEntries_(),
68  isProfile_(true),
69  explicitFill_(false),
70  histo_(nullptr),
71  axis_(nullptr) {
72  ;
73 }

Member Function Documentation

◆ bin()

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

Definition at line 105 of file CommissioningTask.cc.

105  {
106  if (!axis_) {
107  return 0;
108  }
109  float range = axis_->GetXmax() - axis_->GetXmin();
110  if (range > 0.) {
111  int32_t bin = static_cast<int32_t>((value - axis_->GetXmin()) * (axis_->GetNbins() / range)) + 1;
112  if (bin < 0) {
113  return 0;
114  } else if (bin > axis_->GetNbins()) {
115  return static_cast<uint32_t>(axis_->GetNbins() + 1);
116  } else {
117  return bin;
118  }
119  } else {
120  return 0;
121  }
122 }

References newFWLiteAna::bin, and FastTimerService_cff::range.

Referenced by CommissioningTask::updateHistoSet().

◆ histo() [1/2]

CommissioningTask::MonitorElement * CommissioningTask::HistoSet::histo ( )

Definition at line 81 of file CommissioningTask.cc.

81 { return histo_; }

◆ histo() [2/2]

void CommissioningTask::HistoSet::histo ( MonitorElement me)

Definition at line 89 of file CommissioningTask.cc.

89  {
90  histo_ = me;
92  if (histo_) {
93  axis_ = histo->GetXaxis();
94  }
95  //TProfile* prof = ExtractTObject<TProfile>().extract( histo_ );
96  //if ( prof ) { prof->SetErrorOption("s"); }
97 }

References ExtractTObject< T >::extract(), timingPdfMaker::histo, and hlt_dqm_clientPB-live_cfg::me.

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

Member Data Documentation

◆ axis_

TAxis* CommissioningTask::HistoSet::axis_
private

Definition at line 52 of file CommissioningTask.h.

◆ explicitFill_

bool CommissioningTask::HistoSet::explicitFill_

◆ histo_

MonitorElement* CommissioningTask::HistoSet::histo_
private

Definition at line 51 of file CommissioningTask.h.

◆ isProfile_

bool CommissioningTask::HistoSet::isProfile_

◆ vNumOfEntries_

std::vector<float> CommissioningTask::HistoSet::vNumOfEntries_

◆ vSumOfContents_

std::vector<float> CommissioningTask::HistoSet::vSumOfContents_

◆ vSumOfSquares_

std::vector<double> CommissioningTask::HistoSet::vSumOfSquares_
CommissioningTask::HistoSet::vSumOfSquares_
std::vector< double > vSumOfSquares_
Definition: CommissioningTask.h:46
CommissioningTask::HistoSet::bin
uint32_t bin(float value)
Definition: CommissioningTask.cc:105
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
CommissioningTask::HistoSet::vSumOfContents_
std::vector< float > vSumOfContents_
Definition: CommissioningTask.h:45
CommissioningTask::HistoSet::histo
MonitorElement * histo()
Definition: CommissioningTask.cc:81
ExtractTObject
Definition: ExtractTObject.h:9
CommissioningTask::HistoSet::vNumOfEntries_
std::vector< float > vNumOfEntries_
Definition: CommissioningTask.h:44
CommissioningTask::HistoSet::explicitFill_
bool explicitFill_
Definition: CommissioningTask.h:48
CommissioningTask::HistoSet::isProfile_
bool isProfile_
Definition: CommissioningTask.h:47
value
Definition: value.py:1
ExtractTObject::extract
static T * extract(MonitorElement *me)
Definition: ExtractTObject.cc:21
CommissioningTask::HistoSet::histo_
MonitorElement * histo_
Definition: CommissioningTask.h:51
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:56
CommissioningTask::HistoSet::axis_
TAxis * axis_
Definition: CommissioningTask.h:52