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

template<int DIMENSIONS>
class ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >

Base class for THistImplBase that abstracts out the histogram's PRECISION.

For operations such as painting a histogram, the PRECISION (type of the bin content) is not relevant; painting will cast the underlying bin type to double. To facilitate this, THistImplBase itself inherits from the THistImplPrecisionAgnosticBase interface.

Definition at line 57 of file THistImpl.h.

Public Types

using Coord_t = std::array< double, DIMENSIONS >
 Type of the coordinate: a DIMENSIONS-dimensional array of doubles. More...
 

Public Member Functions

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 double GetBinContentAsDouble (int binidx) const =0
 The bin content, cast to double. 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::THistImplPrecisionAgnosticBase< DIMENSIONS >:

Member Typedef Documentation

template<int DIMENSIONS>
using ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::Coord_t = std::array<double, DIMENSIONS>

Type of the coordinate: a DIMENSIONS-dimensional array of doubles.

Definition at line 60 of file THistImpl.h.

Constructor & Destructor Documentation

template<int DIMENSIONS>
virtual ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::~THistImplPrecisionAgnosticBase ( )
inlinevirtual

Definition at line 62 of file THistImpl.h.

Member Function Documentation

template<int DIMENSIONS>
virtual TAxisView ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetAxis ( int  iAxis) const
pure virtual

Get a TAxisView on axis with index iAxis.

Parameters
iAxis- index of the axis, must be 0 <= iAxis < DIMENSION

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

Referenced by ROOT::THistView< DIMENSIONS, PRECISION >::SetRange().

template<int DIMENSIONS>
virtual Coord_t ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinCenter ( int  binidx) const
pure virtual

Get the center in all dimensions of the bin with index binidx.

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

template<int DIMENSIONS>
virtual double ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinContentAsDouble ( int  binidx) const
pure virtual

The bin content, cast to double.

Implemented in ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >.

template<int DIMENSIONS>
virtual Coord_t ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinFrom ( int  binidx) const
pure virtual

Get the lower edge in all dimensions of the bin with index binidx.

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

template<int DIMENSIONS>
virtual int ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinIndex ( const Coord_t x) const
pure virtual

Given the coordinate x, determine the index of the bin.

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

template<int DIMENSIONS>
virtual int ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinIndexAndGrow ( const Coord_t x)
pure virtual

Given the coordinate x, determine the index of the bin, possibly growing axes for which x is out of range.

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

template<int DIMENSIONS>
virtual Coord_t ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinTo ( int  binidx) const
pure virtual

Get the upper edge in all dimensions of the bin with index binidx.

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

template<int DIMENSIONS>
virtual std::vector<double> ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetBinUncertainties ( int  binidx) const
pure virtual

The bin's uncertainty.

size() of the vector is a multiple of 2: several kinds of uncertainty, same number of entries for lower and upper.

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

template<int DIMENSIONS>
virtual int ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetNBins ( ) const
pure virtual

Number of bins of this histogram, including all overflow and underflow bins.

Simply the product of all axes' number of bins.

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

Referenced by ROOT::THistView< DIMENSIONS, PRECISION >::end().

template<int DIMENSIONS>
constexpr int ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetNDim ( ) const
inline

Number of dimensions of this histogram.

Definition at line 65 of file THistImpl.h.

template<int DIMENSIONS>
virtual Hist::AxisIterRange_t<DIMENSIONS> ROOT::Detail::THistImplPrecisionAgnosticBase< DIMENSIONS >::GetRange ( const std::array< Hist::EOverflow, DIMENSIONS > &  withOverUnder) const
pure virtual

Get a Hist::AxisIterRange_t for the whole histogram, possibly restricting the range to non-overflow bins.

Parameters
withOverUnder- specifies for each dimension whether under and overflow should be included in the returned range.

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


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