ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | List of all members
ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION > Class Template Referenceabstract

template<int DIMENSIONS, class PRECISION>
class ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >

Interface class for THistImpl.

THistImpl is templated for a specific configuration of axes. To enable access through THist, THistImpl inherits from THistImplBase, exposing only dimension (DIMENSION) and bin type (PRECISION).

Definition at line 114 of file THistImpl.h.

Public Types

using Coord_t = typename THistImplPrecisionAgnosticBase< DIMENSIONS >::Coord_t
 Type of a coordinate: an array of DIMENSIONS doubles. More...
 
using Weight_t = PRECISION
 Type of the bin content (and thus weights). More...
 
using FillFunc_t = void(THistImplBase::*)(const Coord_t &x, Weight_t w)
 Type of the Fill(x, w) function. More...
 
- Public Types inherited from ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >
using Coord_t = std::array< double, DIMENSIONS >
 Type of the coordinate: a DIMENSIONS-dimensional array of doubles. More...
 

Public Member Functions

virtual void FillN (const std::array_view< Coord_t > xN, const std::array_view< Weight_t > weightN)=0
 Interface function to fill a vector or array of coordinates with corresponding weights. More...
 
virtual void FillN (const std::array_view< Coord_t > xN)=0
 Interface function to fill a vector or array of coordinates. More...
 
virtual FillFunc_t GetFillFunc () const =0
 Retrieve the pointer to the overridden Fill(x, w) function. More...
 
virtual PRECISION GetBinContent (int binidx) const =0
 Get the bin content (sum of weights) for bin index binidx. More...
 
double GetBinContentAsDouble (int binidx) const final
 Get the bin content (sum of weights) for bin index binidx, cast to double. More...
 
- Public Member Functions inherited from ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >
virtual ~THistImplPrecisionAgnosticBase ()
 
constexpr int GetNDim () const
 Number of dimensions of this histogram. More...
 
virtual int GetNBins () const =0
 Number of bins of this histogram, including all overflow and underflow bins. More...
 
virtual int GetBinIndex (const Coord_t &x) const =0
 Given the coordinate x, determine the index of the bin. More...
 
virtual int GetBinIndexAndGrow (const Coord_t &x)=0
 Given the coordinate x, determine the index of the bin, possibly growing axes for which x is out of range. More...
 
virtual Coord_t GetBinCenter (int binidx) const =0
 Get the center in all dimensions of the bin with index binidx. More...
 
virtual Coord_t GetBinFrom (int binidx) const =0
 Get the lower edge in all dimensions of the bin with index binidx. More...
 
virtual Coord_t GetBinTo (int binidx) const =0
 Get the upper edge in all dimensions of the bin with index binidx. More...
 
virtual std::vector< doubleGetBinUncertainties (int binidx) const =0
 The bin's uncertainty. More...
 
virtual TAxisView GetAxis (int iAxis) const =0
 Get a TAxisView on axis with index iAxis. More...
 
virtual Hist::AxisIterRange_t< DIMENSIONS > GetRange (const std::array< Hist::EOverflow, DIMENSIONS > &withOverUnder) const =0
 Get a Hist::AxisIterRange_t for the whole histogram, possibly restricting the range to non-overflow bins. More...
 

#include <ROOT/THistImpl.h>

+ Inheritance diagram for ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >:
+ Collaboration diagram for ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >:

Member Typedef Documentation

template<int DIMENSIONS, class PRECISION>
using ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::Coord_t = typename THistImplPrecisionAgnosticBase<DIMENSIONS>::Coord_t

Type of a coordinate: an array of DIMENSIONS doubles.

Definition at line 117 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION>
using ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::FillFunc_t = void (THistImplBase::*)(const Coord_t& x, Weight_t w)

Type of the Fill(x, w) function.

Definition at line 121 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION>
using ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::Weight_t = PRECISION

Type of the bin content (and thus weights).

Definition at line 119 of file THistImpl.h.

Member Function Documentation

template<int DIMENSIONS, class PRECISION>
virtual void ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::FillN ( const std::array_view< Coord_t xN,
const std::array_view< Weight_t weightN 
)
pure virtual

Interface function to fill a vector or array of coordinates with corresponding weights.

Note
the size of xN and weightN must be the same!

Implemented in ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >.

template<int DIMENSIONS, class PRECISION>
virtual void ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::FillN ( const std::array_view< Coord_t xN)
pure virtual

Interface function to fill a vector or array of coordinates.

Implemented in ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >.

template<int DIMENSIONS, class PRECISION>
virtual PRECISION ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::GetBinContent ( int  binidx) const
pure virtual
template<int DIMENSIONS, class PRECISION>
double ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::GetBinContentAsDouble ( int  binidx) const
inlinefinalvirtual

Get the bin content (sum of weights) for bin index binidx, cast to double.

Implements ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >.

Definition at line 141 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION>
virtual FillFunc_t ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >::GetFillFunc ( ) const
pure virtual

Retrieve the pointer to the overridden Fill(x, w) function.

Implemented in ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >.


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