ROOT 6.12/07 Reference Guide |
Histogram axis base class.
Keeps track of the number of bins and overflow handling. Offers bin iteration.
Bin indices are starting from 0 for the underflow bin (representing values that are lower than the axis range). Starting at index 1 are the actual bins of the axis, up to N + 1 for an axis with N bins. Index N + 2 is the overflow bin for values larger than the axis range.
Classes | |
class | const_iterator |
Random const_iterator through bins. More... | |
Public Types | |
enum | EFindStatus { EFindStatus::kCanGrow, EFindStatus::kValid } |
Status of FindBin(x) More... | |
Public Member Functions | |
TAxisBase (std::string_view title, int nbinsNoOver, bool canGrow) noexcept | |
Construct a TAxisBase. More... | |
TAxisBase (int nbinsNoOver, bool canGrow) noexcept | |
Construct a TAxisBase. More... | |
int | GetNBins () const noexcept |
Get the number of bins, including under- and overflow. More... | |
int | GetNBinsNoOver () const noexcept |
Get the number of bins, excluding under- and overflow. More... | |
int | GetNOverflowBins () const noexcept |
Get the number of over- and underflow bins: 0 for growable axes, 2 otherwise. More... | |
int | GetOverflowBin () const noexcept |
Get the bin index for the underflow bin (or the next bin outside range if CanGrow()). More... | |
const std::string & | GetTitle () const |
int | GetUnderflowBin () const noexcept |
Get the bin index for the underflow bin. More... | |
bool | IsOverflowBin (int bin) const noexcept |
Whether the bin index is referencing a bin higher than the axis range. More... | |
bool | IsUnderflowBin (int bin) const noexcept |
Whether the bin index is referencing a bin lower than the axis range. More... | |
Iterator interfaces | |
const_iterator | begin () const noexcept |
Get a const_iterator pointing to the first non-underflow bin. More... | |
const_iterator | begin_with_underflow () const noexcept |
Get a const_iterator pointing the underflow bin. More... | |
const_iterator | end () const noexcept |
Get a const_iterator pointing right beyond the last non-overflow bin (i.e. More... | |
const_iterator | end_with_overflow () const noexcept |
Get a const_iterator pointing right beyond the overflow bin. More... | |
Static Public Attributes | |
static constexpr const int | kIgnoreBin = -1 |
FindBin() returns this bin to signal that the bin number is invalid. More... | |
static constexpr const int | kNOverflowBins [4] = {0, 1, 1, 2} |
Extra bins for each EAxisOverflow value. More... | |
Protected Member Functions | |
TAxisBase ()=default | |
Default construct a TAxisBase (for use by derived classes for I/O) More... | |
int | AdjustOverflowBinNumber (double rawbin) const |
Given rawbin (<0 for underflow, >= GetNBinsNoOver() for overflow), determine the actual bin number taking into account how over/underflow should be handled. More... | |
Inaccessible copy, assignment | |
The copy and move constructors and assignment operators are protected to prevent slicing. | |
TAxisBase (const TAxisBase &)=default | |
TAxisBase (TAxisBase &&)=default | |
TAxisBase & | operator= (const TAxisBase &)=default |
TAxisBase & | operator= (TAxisBase &&)=default |
Private Attributes | |
const bool | fCanGrow = false |
Whether this axis can grow (and thus has no overflow bins). More... | |
unsigned int | fNBins |
Number of bins including under- and overflow. More... | |
std::string | fTitle |
Title of this axis, used for graphics / text. More... | |
#include <ROOT/TAxis.hxx>
|
strong |
|
protecteddefault |
|
protecteddefault |
|
protecteddefault |
Default construct a TAxisBase (for use by derived classes for I/O)
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprotected |
Given rawbin (<0 for underflow, >= GetNBinsNoOver() for overflow), determine the actual bin number taking into account how over/underflow should be handled.
[out] | status | result status of the bin determination. |
status
will tell how to deal with this overflow.
|
inlinenoexcept |
Get a const_iterator pointing to the first non-underflow bin.
|
inlinenoexcept |
Get a const_iterator pointing the underflow bin.
|
inlinenoexcept |
Get a const_iterator pointing right beyond the last non-overflow bin (i.e.
pointing to the overflow bin).
|
inlinenoexcept |
Get a const_iterator pointing right beyond the overflow bin.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
private |
|
private |
|
private |
|
static |
|
static |