QualityControl  1.5.1
O2 Data Quality Control Framework
o2::quality_control_modules::tof::Counter< size, labels > Class Template Reference

Class to count events. More...

#include <Counter.h>

Inheritance diagram for o2::quality_control_modules::tof::Counter< size, labels >:
Collaboration diagram for o2::quality_control_modules::tof::Counter< size, labels >:

Public Member Functions

 Counter ()=default
 Constructor.
 
 ~Counter ()=default
 Destructor.
 
void Count (const unsigned int &v)
 
void Reset ()
 Function to reset counters to zero.
 
uint32_t HowMany (const unsigned int &pos) const
 
void MakeHistogram (TH1 *h) const
 
void FillHistogram (TH1 *h, const unsigned int &biny=0, const unsigned int &binz=0) const
 
unsigned int Size () const
 

Detailed Description

template<const unsigned size, const char * labels>
class o2::quality_control_modules::tof::Counter< size, labels >

Class to count events.

Author
Nicolo' Jacazio

Member Function Documentation

template<const unsigned size, const char * labels>
void o2::quality_control_modules::tof::Counter< size, labels >::Count ( const unsigned int &  v)
inline

Function to increment a counter

Parameters
vIndex in the counter array to increment
template<const unsigned size, const char * labels>
void o2::quality_control_modules::tof::Counter< size, labels >::FillHistogram ( TH1 *  h,
const unsigned int &  biny = 0,
const unsigned int &  binz = 0 
) const
inline

Function to fill a histogram with the counters

Parameters
hThe histogram to fill
binyY offset to fill to histogram, useful for TH2 and TH3
binzZ offset to fill to histogram, useful for TH3
template<const unsigned size, const char * labels>
uint32_t o2::quality_control_modules::tof::Counter< size, labels >::HowMany ( const unsigned int &  pos) const
inline

Function to get how many counts where observed

Returns
Returns the number of counts observed for a particular index
template<const unsigned size, const char * labels>
void o2::quality_control_modules::tof::Counter< size, labels >::MakeHistogram ( TH1 *  h) const
inline

Function to make a histogram out of the counters

Parameters
hhistogram to shape in order to have room for the counter size
template<const unsigned size, const char * labels>
unsigned int o2::quality_control_modules::tof::Counter< size, labels >::Size ( ) const
inline

Getter for the size

Returns
Returns the size of the counter

The documentation for this class was generated from the following file: