Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RBinIndex Class Referencefinal

A bin index with special values for underflow and overflow bins.

Objects of this type should be passed by value.

Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 23 of file RBinIndex.hxx.

Public Member Functions

 RBinIndex ()=default
 Construct an invalid bin index.
 
 RBinIndex (int index)
 Construct a bin index for a normal bin.
 
 RBinIndex (long index)
 Construct a bin index for a normal bin.
 
 RBinIndex (long long index)
 Construct a bin index for a normal bin.
 
 RBinIndex (unsigned int index)
 Construct a bin index for a normal bin.
 
 RBinIndex (unsigned long index)
 Construct a bin index for a normal bin.
 
 RBinIndex (unsigned long long index)
 Construct a bin index for a normal bin.
 
std::uint64_t GetIndex () const
 Return the index for a normal bin.
 
bool IsInvalid () const
 
bool IsNormal () const
 A bin index is normal iff it is not one of the special values.
 
bool IsOverflow () const
 
bool IsUnderflow () const
 
RBinIndex operator+ (std::uint64_t a) const
 
RBinIndexoperator++ ()
 
RBinIndex operator++ (int)
 
RBinIndexoperator+= (std::uint64_t a)
 
RBinIndex operator- (std::uint64_t a) const
 
RBinIndexoperator-- ()
 
RBinIndex operator-- (int)
 
RBinIndexoperator-= (std::uint64_t a)
 

Static Public Member Functions

static RBinIndex Overflow ()
 
static RBinIndex Underflow ()
 

Private Attributes

std::uint64_t fIndex = kInvalidIndex
 

Static Private Attributes

static constexpr auto kInvalidIndex = static_cast<std::uint64_t>(-1)
 
static constexpr auto kOverflowIndex = static_cast<std::uint64_t>(-2)
 
static constexpr auto kUnderflowIndex = static_cast<std::uint64_t>(-3)
 

Friends

bool operator!= (RBinIndex lhs, RBinIndex rhs)
 
bool operator< (RBinIndex lhs, RBinIndex rhs)
 
bool operator<= (RBinIndex lhs, RBinIndex rhs)
 
bool operator== (RBinIndex lhs, RBinIndex rhs)
 
bool operator> (RBinIndex lhs, RBinIndex rhs)
 
bool operator>= (RBinIndex lhs, RBinIndex rhs)
 

#include <ROOT/RBinIndex.hxx>

Constructor & Destructor Documentation

◆ RBinIndex() [1/7]

ROOT::Experimental::RBinIndex::RBinIndex ( )
default

Construct an invalid bin index.

◆ RBinIndex() [2/7]

ROOT::Experimental::RBinIndex::RBinIndex ( unsigned int index)
inline

Construct a bin index for a normal bin.

Definition at line 42 of file RBinIndex.hxx.

◆ RBinIndex() [3/7]

ROOT::Experimental::RBinIndex::RBinIndex ( unsigned long index)
inline

Construct a bin index for a normal bin.

Definition at line 45 of file RBinIndex.hxx.

◆ RBinIndex() [4/7]

ROOT::Experimental::RBinIndex::RBinIndex ( unsigned long long index)
inline

Construct a bin index for a normal bin.

Definition at line 48 of file RBinIndex.hxx.

◆ RBinIndex() [5/7]

ROOT::Experimental::RBinIndex::RBinIndex ( int index)
inline

Construct a bin index for a normal bin.

Parameters
[in]indexsigned integer that must not be negative

Definition at line 53 of file RBinIndex.hxx.

◆ RBinIndex() [6/7]

ROOT::Experimental::RBinIndex::RBinIndex ( long index)
inline

Construct a bin index for a normal bin.

Parameters
[in]indexsigned integer that must not be negative

Definition at line 58 of file RBinIndex.hxx.

◆ RBinIndex() [7/7]

ROOT::Experimental::RBinIndex::RBinIndex ( long long index)
inline

Construct a bin index for a normal bin.

Parameters
[in]indexsigned integer that must not be negative

Definition at line 63 of file RBinIndex.hxx.

Member Function Documentation

◆ GetIndex()

std::uint64_t ROOT::Experimental::RBinIndex::GetIndex ( ) const
inline

Return the index for a normal bin.

Definition at line 71 of file RBinIndex.hxx.

◆ IsInvalid()

bool ROOT::Experimental::RBinIndex::IsInvalid ( ) const
inline

Definition at line 83 of file RBinIndex.hxx.

◆ IsNormal()

bool ROOT::Experimental::RBinIndex::IsNormal ( ) const
inline

A bin index is normal iff it is not one of the special values.

Note that a normal bin index may not actually be valid for a given axis if it is outside its range.

Definition at line 80 of file RBinIndex.hxx.

◆ IsOverflow()

bool ROOT::Experimental::RBinIndex::IsOverflow ( ) const
inline

Definition at line 82 of file RBinIndex.hxx.

◆ IsUnderflow()

bool ROOT::Experimental::RBinIndex::IsUnderflow ( ) const
inline

Definition at line 81 of file RBinIndex.hxx.

◆ operator+()

RBinIndex ROOT::Experimental::RBinIndex::operator+ ( std::uint64_t a) const
inline

Definition at line 101 of file RBinIndex.hxx.

◆ operator++() [1/2]

RBinIndex & ROOT::Experimental::RBinIndex::operator++ ( )
inline

Definition at line 108 of file RBinIndex.hxx.

◆ operator++() [2/2]

RBinIndex ROOT::Experimental::RBinIndex::operator++ ( int )
inline

Definition at line 114 of file RBinIndex.hxx.

◆ operator+=()

RBinIndex & ROOT::Experimental::RBinIndex::operator+= ( std::uint64_t a)
inline

Definition at line 85 of file RBinIndex.hxx.

◆ operator-()

RBinIndex ROOT::Experimental::RBinIndex::operator- ( std::uint64_t a) const
inline

Definition at line 135 of file RBinIndex.hxx.

◆ operator--() [1/2]

RBinIndex & ROOT::Experimental::RBinIndex::operator-- ( )
inline

Definition at line 142 of file RBinIndex.hxx.

◆ operator--() [2/2]

RBinIndex ROOT::Experimental::RBinIndex::operator-- ( int )
inline

Definition at line 148 of file RBinIndex.hxx.

◆ operator-=()

RBinIndex & ROOT::Experimental::RBinIndex::operator-= ( std::uint64_t a)
inline

Definition at line 121 of file RBinIndex.hxx.

◆ Overflow()

static RBinIndex ROOT::Experimental::RBinIndex::Overflow ( )
inlinestatic

Definition at line 183 of file RBinIndex.hxx.

◆ Underflow()

static RBinIndex ROOT::Experimental::RBinIndex::Underflow ( )
inlinestatic

Definition at line 176 of file RBinIndex.hxx.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 156 of file RBinIndex.hxx.

◆ operator<

bool operator< ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 158 of file RBinIndex.hxx.

◆ operator<=

bool operator<= ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 165 of file RBinIndex.hxx.

◆ operator==

bool operator== ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 155 of file RBinIndex.hxx.

◆ operator>

bool operator> ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 167 of file RBinIndex.hxx.

◆ operator>=

bool operator>= ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 174 of file RBinIndex.hxx.

Member Data Documentation

◆ fIndex

std::uint64_t ROOT::Experimental::RBinIndex::fIndex = kInvalidIndex
private

Definition at line 35 of file RBinIndex.hxx.

◆ kInvalidIndex

constexpr auto ROOT::Experimental::RBinIndex::kInvalidIndex = static_cast<std::uint64_t>(-1)
staticconstexprprivate

Definition at line 26 of file RBinIndex.hxx.

◆ kOverflowIndex

constexpr auto ROOT::Experimental::RBinIndex::kOverflowIndex = static_cast<std::uint64_t>(-2)
staticconstexprprivate

Definition at line 25 of file RBinIndex.hxx.

◆ kUnderflowIndex

constexpr auto ROOT::Experimental::RBinIndex::kUnderflowIndex = static_cast<std::uint64_t>(-3)
staticconstexprprivate

Definition at line 24 of file RBinIndex.hxx.

Libraries for ROOT::Experimental::RBinIndex:

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