The base class for TrigHisto1D and TrigHisto2D. This class should never be stored or used directly.
More...
#include <TrigHisto.h>
|
| | TrigHisto ()=default |
| | TrigHisto (TrigHisto &&)=default |
| | User declared d'tor means we have to explicitly enable move operations.
|
| TrigHisto & | operator= (TrigHisto &&)=default |
| virtual | ~TrigHisto ()=default |
| void | clear (void) |
| | Zero all histogram bins.
|
| unsigned int | nbins_x (void) const |
| | Return the number of bins along the y-axis, not including the under and overflow.
|
| float | min_x () const |
| | Return the minimum along the x-axis.
|
| float | max_x () const |
| | Return the maximum along the x-axis.
|
| const std::vector< float > & | contents () const |
| | Return the bin contents of the histogram, including the under and overflow bins.
|
|
| unsigned int | findBin (unsigned int nbins, float h_min, float h_max, float binSize, float value) const |
The base class for TrigHisto1D and TrigHisto2D. This class should never be stored or used directly.
- Author
- W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch
Definition at line 32 of file TrigHisto.h.
◆ TrigHisto() [1/2]
◆ TrigHisto() [2/2]
User declared d'tor means we have to explicitly enable move operations.
◆ ~TrigHisto()
| virtual TrigHisto::~TrigHisto |
( |
| ) |
|
|
virtualdefault |
◆ clear()
| void TrigHisto::clear |
( |
void | | ) |
|
Zero all histogram bins.
Definition at line 12 of file TrigHisto.cxx.
12 {
15 }
16}
std::vector< float > m_contents
◆ contents()
| const std::vector< float > & TrigHisto::contents |
( |
| ) |
const |
|
inline |
Return the bin contents of the histogram, including the under and overflow bins.
Definition at line 61 of file TrigHisto.h.
◆ findBin()
| unsigned int TrigHisto::findBin |
( |
unsigned int | nbins, |
|
|
float | h_min, |
|
|
float | h_max, |
|
|
float | binSize, |
|
|
float | value ) const |
|
protected |
- Returns
- which bin this value corresponds to. (Supply bin limits such that it might be used for 1D or 2D derived class.)
Definition at line 21 of file TrigHisto.cxx.
25 {
26 unsigned int ibin = 0;
27
28 if(value < h_min) {
29 ibin = 0;
30 }
31 else if( !(value < h_max)) {
33 }
34 else {
35 while(value > (ibin*binSize+h_min) && ibin <= nbins) {
36 ibin++;
37 }
38 }
39
40 return ibin;
41}
◆ max_x()
| float TrigHisto::max_x |
( |
| ) |
const |
|
inline |
Return the maximum along the x-axis.
Definition at line 55 of file TrigHisto.h.
◆ min_x()
| float TrigHisto::min_x |
( |
| ) |
const |
|
inline |
Return the minimum along the x-axis.
Definition at line 50 of file TrigHisto.h.
◆ nbins_x()
| unsigned int TrigHisto::nbins_x |
( |
void | | ) |
const |
|
inline |
Return the number of bins along the y-axis, not including the under and overflow.
Definition at line 45 of file TrigHisto.h.
◆ operator=()
◆ m_binSize_x
| float TrigHisto::m_binSize_x {} |
|
protected |
◆ m_contents
| std::vector<float> TrigHisto::m_contents |
|
protected |
◆ m_max_x
| float TrigHisto::m_max_x {} |
|
protected |
◆ m_min_x
| float TrigHisto::m_min_x {} |
|
protected |
◆ m_nbins_x
| unsigned int TrigHisto::m_nbins_x {} |
|
protected |
◆ m_overflowBin_x
| unsigned int TrigHisto::m_overflowBin_x {} |
|
protected |
◆ m_underflowBin_x
| unsigned int TrigHisto::m_underflowBin_x {} |
|
protected |
The documentation for this class was generated from the following files: