Logo ROOT   6.12/07
Reference Guide
List of all members | Classes | Public Types | Public Member Functions | Private Attributes | List of all members
ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE > Class Template Reference

template<int DIMENSIONS, class PRECISION, template< class PRECISION_ > class STORAGE>
class ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >

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

Definition at line 37 of file THistData.hxx.

Classes

class  TBinStat
 Modifying view on a THistStatContent for a given bin. More...
 
class  TConstBinStat
 Const view on a THistStatContent for a given bin. More...
 

Public Types

using BinStat_t = TBinStat
 
using ConstBinStat_t = TConstBinStat
 
using Content_t = STORAGE< 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

 THistStatContent ()=default
 
 THistStatContent (size_t in_size)
 
void Fill (const CoordArray_t &, int binidx, Weight_t weight=1.)
 Add weight to the bin content at binidx. More...
 
Weight_t GetBinContent (int idx) const
 Get the bin content for the given bin. More...
 
Weight_tGetBinContent (int idx)
 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...
 
Weight_t operator[] (int idx) const
 Get the bin content for the given bin. More...
 
Weight_toperator[] (int idx)
 Get the bin content for the given bin (non-const). More...
 
size_t size () const noexcept
 Get the number of bins. More...
 

Private Attributes

Content_t fBinContent
 Bin content. More...
 
int64_t fEntries = 0
 Number of calls to Fill(). More...
 

#include <ROOT/THistData.hxx>

Member Typedef Documentation

◆ BinStat_t

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
using ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::BinStat_t = TBinStat

Definition at line 73 of file THistData.hxx.

◆ ConstBinStat_t

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
using ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::ConstBinStat_t = TConstBinStat

Definition at line 72 of file THistData.hxx.

◆ Content_t

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
using ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::Content_t = STORAGE<PRECISION>

Type of the bin content array.

Definition at line 44 of file THistData.hxx.

◆ CoordArray_t

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
using ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::CoordArray_t = Hist::CoordArray_t<DIMENSIONS>

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

Definition at line 40 of file THistData.hxx.

◆ Weight_t

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
using ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::Weight_t = PRECISION

The type of the weight and the bin content.

Definition at line 42 of file THistData.hxx.

Constructor & Destructor Documentation

◆ THistStatContent() [1/2]

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::THistStatContent ( )
default

◆ THistStatContent() [2/2]

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::THistStatContent ( size_t  in_size)
inline

Definition at line 84 of file THistData.hxx.

Member Function Documentation

◆ Fill()

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

Add weight to the bin content at binidx.

Definition at line 87 of file THistData.hxx.

◆ GetBinContent() [1/2]

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
Weight_t ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::GetBinContent ( int  idx) const
inline

Get the bin content for the given bin.

Definition at line 106 of file THistData.hxx.

◆ GetBinContent() [2/2]

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
Weight_t& ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::GetBinContent ( int  idx)
inline

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

Definition at line 108 of file THistData.hxx.

◆ GetContentArray() [1/2]

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

Retrieve the content array.

Definition at line 111 of file THistData.hxx.

◆ GetContentArray() [2/2]

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

Retrieve the content array (non-const).

Definition at line 113 of file THistData.hxx.

◆ GetEntries()

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

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

the number of calls to Fill().

Definition at line 95 of file THistData.hxx.

◆ operator[]() [1/2]

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
Weight_t ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::operator[] ( int  idx) const
inline

Get the bin content for the given bin.

Definition at line 101 of file THistData.hxx.

◆ operator[]() [2/2]

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
Weight_t& ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::operator[] ( int  idx)
inline

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

Definition at line 103 of file THistData.hxx.

◆ size()

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

Get the number of bins.

Definition at line 98 of file THistData.hxx.

Member Data Documentation

◆ fBinContent

template<int DIMENSIONS, class PRECISION , template< class PRECISION_ > class STORAGE>
Content_t ROOT::Experimental::THistStatContent< DIMENSIONS, PRECISION, STORAGE >::fBinContent
private

Bin content.

Definition at line 80 of file THistData.hxx.

◆ fEntries

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

Number of calls to Fill().

Definition at line 77 of file THistData.hxx.


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