Logo ROOT   6.10/09
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT > Class Template Reference

template<int DIMENSIONS, class PRECISION, template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
class ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >

A THistImplBase's data, provides accessors to all its statistics.

Definition at line 425 of file THistData.hxx.

Public Types

using ConstHistBinStat_t = THistBinStat< const THistData, typename STAT< DIMENSIONS, PRECISION, STORAGE >::ConstBinStat_t... >
 The type of a non-modifying view on a bin. More...
 
using CoordArray_t = Hist::CoordArray_t< DIMENSIONS >
 The type of a (possibly multi-dimensional) coordinate. More...
 
using Hist_t = THist< DIMENSIONS, PRECISION, STAT... >
 Matching THist. More...
 
using HistBinStat_t = THistBinStat< THistData, typename STAT< DIMENSIONS, PRECISION, STORAGE >::BinStat_t... >
 The type of a modifying view on a bin. More...
 
using Weight_t = PRECISION
 The type of the weight and the bin content. More...
 

Public Member Functions

 THistData ()=default
 
 THistData (size_t size)
 Constructor providing the number of bins (incl under, overflow) to the base classes. More...
 
void Fill (const CoordArray_t &x, int binidx, Weight_t weight=1.)
 Fill weight at x to the bin content at binidx. More...
 
template<bool B = true, class = typename std::enable_if<B && HasBinUncertainty()>::type>
double GetBinUncertainty (int binidx) const
 Calculate the bin content's uncertainty for the given bin, using base class information, i.e. More...
 
template<bool B = true, class = typename std::enable_if<B && !HasBinUncertainty()>::type>
double GetBinUncertainty (int binidx,...) const
 Calculate the bin content's uncertainty for the given bin, using Poisson statistics on the absolute bin content. More...
 
ConstHistBinStat_t GetView (int idx) const
 Get a view on the statistics values of a bin. More...
 
HistBinStat_t GetView (int idx)
 Get a (non-const) view on the statistics values of a bin. More...
 

Static Public Member Functions

static constexpr int GetNDim () noexcept
 Number of dimensions of the coordinates. More...
 
static constexpr bool HasBinUncertainty ()
 Whether this provides storage for uncertainties, or whether uncertainties are determined as poisson uncertainty of the content. More...
 

Static Private Member Functions

template<class T >
static auto HaveUncertainty (const T *This) -> decltype(This->GetBinUncertaintyImpl(12))
 Check whether double T::GetBinUncertaintyImpl(int) can be called. More...
 
template<class T >
static char HaveUncertainty (...)
 Fall-back case for check whether double T::GetBinUncertaintyImpl(int) can be called. More...
 

#include <ROOT/THistData.hxx>

Inheritance diagram for ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >:
[legend]

Member Typedef Documentation

◆ ConstHistBinStat_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
using ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::ConstHistBinStat_t = THistBinStat<const THistData, typename STAT<DIMENSIONS, PRECISION, STORAGE>::ConstBinStat_t...>

The type of a non-modifying view on a bin.

Definition at line 446 of file THistData.hxx.

◆ CoordArray_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
using ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::CoordArray_t = Hist::CoordArray_t<DIMENSIONS>

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

Definition at line 442 of file THistData.hxx.

◆ Hist_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
using ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::Hist_t = THist<DIMENSIONS, PRECISION, STAT...>

Matching THist.

Definition at line 436 of file THistData.hxx.

◆ HistBinStat_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
using ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::HistBinStat_t = THistBinStat<THistData, typename STAT<DIMENSIONS, PRECISION, STORAGE>::BinStat_t...>

The type of a modifying view on a bin.

Definition at line 450 of file THistData.hxx.

◆ Weight_t

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
using ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::Weight_t = PRECISION

The type of the weight and the bin content.

Definition at line 439 of file THistData.hxx.

Constructor & Destructor Documentation

◆ THistData() [1/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::THistData ( )
default

◆ THistData() [2/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::THistData ( size_t  size)
inline

Constructor providing the number of bins (incl under, overflow) to the base classes.

Definition at line 460 of file THistData.hxx.

Member Function Documentation

◆ Fill()

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
void ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::Fill ( const CoordArray_t x,
int  binidx,
Weight_t  weight = 1. 
)
inline

Fill weight at x to the bin content at binidx.

Definition at line 463 of file THistData.hxx.

◆ GetBinUncertainty() [1/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
template<bool B = true, class = typename std::enable_if<B && HasBinUncertainty()>::type>
double ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::GetBinUncertainty ( int  binidx) const
inline

Calculate the bin content's uncertainty for the given bin, using base class information, i.e.

forwarding to a base's GetBinUncertaintyImpl(binidx).

Definition at line 492 of file THistData.hxx.

◆ GetBinUncertainty() [2/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
template<bool B = true, class = typename std::enable_if<B && !HasBinUncertainty()>::type>
double ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::GetBinUncertainty ( int  binidx,
  ... 
) const
inline

Calculate the bin content's uncertainty for the given bin, using Poisson statistics on the absolute bin content.

Only available if no base provides this functionality. Requires GetContent().

Definition at line 499 of file THistData.hxx.

◆ GetNDim()

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
static constexpr int ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::GetNDim ( )
inlinestaticnoexcept

Number of dimensions of the coordinates.

Definition at line 453 of file THistData.hxx.

◆ GetView() [1/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
ConstHistBinStat_t ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::GetView ( int  idx) const
inline

Get a view on the statistics values of a bin.

Definition at line 505 of file THistData.hxx.

◆ GetView() [2/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
HistBinStat_t ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::GetView ( int  idx)
inline

Get a (non-const) view on the statistics values of a bin.

Definition at line 509 of file THistData.hxx.

◆ HasBinUncertainty()

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
static constexpr bool ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::HasBinUncertainty ( )
inlinestatic

Whether this provides storage for uncertainties, or whether uncertainties are determined as poisson uncertainty of the content.

Definition at line 484 of file THistData.hxx.

◆ HaveUncertainty() [1/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
template<class T >
static auto ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::HaveUncertainty ( const T *  This) -> decltype(This->GetBinUncertaintyImpl(12))
staticprivate

Check whether double T::GetBinUncertaintyImpl(int) can be called.

◆ HaveUncertainty() [2/2]

template<int DIMENSIONS, class PRECISION , template< class P_ > class STORAGE, template< int D_, class P_, template< class P__ > class S_ > class... STAT>
template<class T >
static char ROOT::Experimental::Detail::THistData< DIMENSIONS, PRECISION, STORAGE, STAT >::HaveUncertainty (   ...)
staticprivate

Fall-back case for check whether double T::GetBinUncertaintyImpl(int) can be called.


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