Logo ROOT   master
Reference Guide
ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION > Class Template Reference

template<int DIMENSIONS, class PRECISION>
class ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >


Basic histogram statistics, keeping track of the bin content and the total number of calls to Fill().

Definition at line 36 of file RHistData.hxx.

Classes

class  RBinStat
 
Modifying view on a RHistStatContent for a given bin. More...
 
class  RConstBinStat
 
Const view on a RHistStatContent for a given bin. More...
 

Public Types

using BinStat_t = RBinStat
 
using ConstBinStat_t = RConstBinStat
 
using Content_t = std::vector< PRECISION >
 Type of the bin content array. More...
 
using CoordArray_t = Hist::CoordArray_t< DIMENSIONS >
 The type of a (possibly multi-dimensional) coordinate. More...
 
using Weight_t = PRECISION
 The type of the weight and the bin content. More...
 

Public Member Functions

 RHistStatContent ()=default
 
 RHistStatContent (size_t bin_size, size_t overflow_size)
 
void Add (const RHistStatContent &other)
 Merge with other RHistStatContent, assuming same bin configuration. More...
 
void Fill (const CoordArray_t &, int binidx, Weight_t weight=1.)
 Add weight to the bin content at binidx. More...
 
Weight_t GetBinArray (int binidx) const
 Get a reference to the bin corresponding to binidx of the correct bin content array i.e. More...
 
Weight_tGetBinArray (int binidx)
 Get a reference to the bin corresponding to binidx of the correct bin content array (non-const) i.e. More...
 
Weight_t GetBinContent (int binidx) const
 Get the bin content for the given bin. More...
 
Weight_tGetBinContent (int binidx)
 Get the bin content for the given bin (non-const). More...
 
const Content_tGetContentArray () const
 Retrieve the content array. More...
 
Content_tGetContentArray ()
 Retrieve the content array (non-const). More...
 
int64_t GetEntries () const
 Get the number of entries filled into the histogram - i.e. More...
 
const Content_tGetOverflowContentArray () const
 Retrieve the under-/overflow content array. More...
 
Content_tGetOverflowContentArray ()
 Retrieve the under-/overflow content array (non-const). More...
 
Weight_t operator[] (int binidx) const
 Get the bin content for the given bin. More...
 
Weight_toperator[] (int binidx)
 Get the bin content for the given bin (non-const). More...
 
size_t size () const noexcept
 Get the number of bins including under- and overflow.. More...
 
size_t sizeNoOver () const noexcept
 Get the number of bins exluding under- and overflow. More...
 
size_t sizeUnderOver () const noexcept
 Get the number of bins including under- and overflow.. More...
 

Private Attributes

Content_t fBinContent
 Bin content. More...
 
int64_t fEntries = 0
 Number of calls to Fill(). More...
 
Content_t fOverflowBinContent
 Under- and overflow bin content. More...
 

#include <ROOT/RHistData.hxx>

Member Typedef Documentation

◆ BinStat_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::BinStat_t = RBinStat

Definition at line 72 of file RHistData.hxx.

◆ ConstBinStat_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::ConstBinStat_t = RConstBinStat

Definition at line 71 of file RHistData.hxx.

◆ Content_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::Content_t = std::vector<PRECISION>

Type of the bin content array.

Definition at line 43 of file RHistData.hxx.

◆ CoordArray_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::CoordArray_t = Hist::CoordArray_t<DIMENSIONS>

The type of a (possibly multi-dimensional) coordinate.

Definition at line 39 of file RHistData.hxx.

◆ Weight_t

template<int DIMENSIONS, class PRECISION >
using ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::Weight_t = PRECISION

The type of the weight and the bin content.

Definition at line 41 of file RHistData.hxx.

Constructor & Destructor Documentation

◆ RHistStatContent() [1/2]

template<int DIMENSIONS, class PRECISION >
ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::RHistStatContent ( )
default

◆ RHistStatContent() [2/2]

template<int DIMENSIONS, class PRECISION >
ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::RHistStatContent ( size_t  bin_size,
size_t  overflow_size 
)
inline

Definition at line 86 of file RHistData.hxx.

Member Function Documentation

◆ Add()

template<int DIMENSIONS, class PRECISION >
void ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::Add ( const RHistStatContent< DIMENSIONS, PRECISION > &  other)
inline

Merge with other RHistStatContent, assuming same bin configuration.

Definition at line 153 of file RHistData.hxx.

◆ Fill()

template<int DIMENSIONS, class PRECISION >
void ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::Fill ( const CoordArray_t ,
int  binidx,
Weight_t  weight = 1. 
)
inline

Add weight to the bin content at binidx.

Definition at line 113 of file RHistData.hxx.

◆ GetBinArray() [1/2]

template<int DIMENSIONS, class PRECISION >
Weight_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetBinArray ( int  binidx) const
inline

Get a reference to the bin corresponding to binidx of the correct bin content array i.e.

depending if binidx is a regular bin or an under- / overflow bin.

Definition at line 91 of file RHistData.hxx.

◆ GetBinArray() [2/2]

template<int DIMENSIONS, class PRECISION >
Weight_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetBinArray ( int  binidx)
inline

Get a reference to the bin corresponding to binidx of the correct bin content array (non-const) i.e.

depending if binidx is a regular bin or an under- / overflow bin.

Definition at line 103 of file RHistData.hxx.

◆ GetBinContent() [1/2]

template<int DIMENSIONS, class PRECISION >
Weight_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetBinContent ( int  binidx) const
inline

Get the bin content for the given bin.

Definition at line 138 of file RHistData.hxx.

◆ GetBinContent() [2/2]

template<int DIMENSIONS, class PRECISION >
Weight_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetBinContent ( int  binidx)
inline

Get the bin content for the given bin (non-const).

Definition at line 140 of file RHistData.hxx.

◆ GetContentArray() [1/2]

template<int DIMENSIONS, class PRECISION >
const Content_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetContentArray ( ) const
inline

Retrieve the content array.

Definition at line 143 of file RHistData.hxx.

◆ GetContentArray() [2/2]

template<int DIMENSIONS, class PRECISION >
Content_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetContentArray ( )
inline

Retrieve the content array (non-const).

Definition at line 145 of file RHistData.hxx.

◆ GetEntries()

template<int DIMENSIONS, class PRECISION >
int64_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetEntries ( ) const
inline

Get the number of entries filled into the histogram - i.e.

the number of calls to Fill().

Definition at line 121 of file RHistData.hxx.

◆ GetOverflowContentArray() [1/2]

template<int DIMENSIONS, class PRECISION >
const Content_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetOverflowContentArray ( ) const
inline

Retrieve the under-/overflow content array.

Definition at line 148 of file RHistData.hxx.

◆ GetOverflowContentArray() [2/2]

template<int DIMENSIONS, class PRECISION >
Content_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::GetOverflowContentArray ( )
inline

Retrieve the under-/overflow content array (non-const).

Definition at line 150 of file RHistData.hxx.

◆ operator[]() [1/2]

template<int DIMENSIONS, class PRECISION >
Weight_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::operator[] ( int  binidx) const
inline

Get the bin content for the given bin.

Definition at line 133 of file RHistData.hxx.

◆ operator[]() [2/2]

template<int DIMENSIONS, class PRECISION >
Weight_t& ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::operator[] ( int  binidx)
inline

Get the bin content for the given bin (non-const).

Definition at line 135 of file RHistData.hxx.

◆ size()

template<int DIMENSIONS, class PRECISION >
size_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::size ( ) const
inlinenoexcept

Get the number of bins including under- and overflow..

Definition at line 127 of file RHistData.hxx.

◆ sizeNoOver()

template<int DIMENSIONS, class PRECISION >
size_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::sizeNoOver ( ) const
inlinenoexcept

Get the number of bins exluding under- and overflow.

Definition at line 124 of file RHistData.hxx.

◆ sizeUnderOver()

template<int DIMENSIONS, class PRECISION >
size_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::sizeUnderOver ( ) const
inlinenoexcept

Get the number of bins including under- and overflow..

Definition at line 130 of file RHistData.hxx.

Member Data Documentation

◆ fBinContent

template<int DIMENSIONS, class PRECISION >
Content_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::fBinContent
private

Bin content.

Definition at line 79 of file RHistData.hxx.

◆ fEntries

template<int DIMENSIONS, class PRECISION >
int64_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::fEntries = 0
private

Number of calls to Fill().

Definition at line 76 of file RHistData.hxx.

◆ fOverflowBinContent

template<int DIMENSIONS, class PRECISION >
Content_t ROOT::Experimental::RHistStatContent< DIMENSIONS, PRECISION >::fOverflowBinContent
private

Under- and overflow bin content.

Definition at line 82 of file RHistData.hxx.


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