ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG > Class Template Referencefinal

template<int DIMENSIONS, class PRECISION, class STATISTICS, class... AXISCONFIG>
class ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >

Definition at line 293 of file THistImpl.h.

Public Types

using ImplBase_t = THistImplBase< DIMENSIONS, PRECISION >
 
using Coord_t = typename ImplBase_t::Coord_t
 
using Weight_t = typename ImplBase_t::Weight_t
 
template<int NDIM = DIMENSIONS>
using AxisIterRange_t = typename Hist::AxisIterRange_t< NDIM >
 
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::THistImplBase< DIMENSIONS, PRECISION >
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

 THistImpl (STATISTICS statConfig, AXISCONFIG...axisArgs)
 
FillFunc_t GetFillFunc () const final
 Retrieve the fill function for this histogram implementation, to prevent the virtual function call for high-frequency fills. More...
 
const std::tuple< AXISCONFIG...> & GetAxes () const
 Get the axes of this histogram. More...
 
TAxisView GetAxis (int iAxis) const final
 Normalized axes access, converting the actual axis to TAxisConfig. More...
 
int GetBinIndex (const Coord_t &x) const final
 Gets the bin index for coordinate x; returns -1 if there is no such bin, e.g. More...
 
int GetBinIndexAndGrow (const Coord_t &x) final
 Gets the bin index for coordinate x, growing the axes as needed and possible. More...
 
Coord_t GetBinCenter (int binidx) const final
 Get the center coordinate of the bin. More...
 
Coord_t GetBinFrom (int binidx) const final
 Get the coordinate of the low limit of the bin. More...
 
Coord_t GetBinTo (int binidx) const final
 Get the coordinate of the high limit of the bin. More...
 
void FillN (const std::array_view< Coord_t > xN, const std::array_view< Weight_t > weightN) final
 Fill an array of weightN to the bins specified by coordinates xN. More...
 
void FillN (const std::array_view< Coord_t > xN) final
 Fill an array of weightN to the bins specified by coordinates xN. More...
 
std::vector< doubleGetBinUncertainties (int binidx) const final
 Return the uncertainties for the given bin. More...
 
void Fill (const Coord_t &x, Weight_t w=1.)
 Add a single weight w to the bin at coordinate x. More...
 
PRECISION GetBinContent (const Coord_t &x) const
 Get the content of the bin at position x. More...
 
PRECISION GetBinContent (int binidx) const final
 Get the content of the bin at bin index binidx. More...
 
AxisIterRange_t< DIMENSIONS > GetRange (const std::array< Hist::EOverflow, DIMENSIONS > &withOverUnder) const final
 Get the begin() and end() for each axis. More...
 
void GrowAxis (int, double)
 Grow the axis number iAxis to fit the coordinate x. More...
 
- Public Member Functions inherited from ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >
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...
 

Private Member Functions

int GetNBins () const final
 Get the number of bins in this histograms, including possible under- and overflow bins. More...
 
void AddBinContent (int bin, Weight_t w)
 Add w to the bin at index bin. More...
 

Private Attributes

std::tuple< AXISCONFIG...> fAxes
 The histogram's axes. More...
 
std::vector< PRECISIONfContent
 The histogram's bin content. More...
 

Friends

class THist< DIMENSIONS, PRECISION >
 

#include <ROOT/THistImpl.h>

+ Inheritance diagram for ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >:
+ Collaboration diagram for ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >:

Member Typedef Documentation

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
template<int NDIM = DIMENSIONS>
using ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::AxisIterRange_t = typename Hist::AxisIterRange_t<NDIM>

Definition at line 305 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
using ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::Coord_t = typename ImplBase_t::Coord_t

Definition at line 301 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
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 , class STATISTICS , class... AXISCONFIG>
using ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::ImplBase_t = THistImplBase<DIMENSIONS, PRECISION>

Definition at line 300 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
using ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::Weight_t = typename ImplBase_t::Weight_t

Definition at line 302 of file THistImpl.h.

Constructor & Destructor Documentation

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::THistImpl ( STATISTICS  statConfig,
AXISCONFIG...  axisArgs 
)

Member Function Documentation

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
void ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::AddBinContent ( int  bin,
Weight_t  w 
)
inlineprivate

Add w to the bin at index bin.

Definition at line 316 of file THistImpl.h.

Referenced by ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::Fill().

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
void ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::Fill ( const Coord_t x,
Weight_t  w = 1. 
)
inline
template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
void ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::FillN ( const std::array_view< Coord_t xN,
const std::array_view< Weight_t weightN 
)
inlinefinalvirtual

Fill an array of weightN to the bins specified by coordinates xN.

For each element i, the weight weightN[i] will be added to the bin at the coordinate xN[i]

Note
xN and weightN must have the same size!

Implements ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >.

Definition at line 392 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
void ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::FillN ( const std::array_view< Coord_t xN)
inlinefinalvirtual

Fill an array of weightN to the bins specified by coordinates xN.

For each element i, the weight weightN[i] will be added to the bin at the coordinate xN[i]

Implements ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >.

Definition at line 410 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
const std::tuple<AXISCONFIG...>& ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetAxes ( ) const
inline

Get the axes of this histogram.

Definition at line 331 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
TAxisView ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetAxis ( int  iAxis) const
inlinefinalvirtual

Normalized axes access, converting the actual axis to TAxisConfig.

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

Definition at line 334 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
Coord_t ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinCenter ( int  binidx) const
inlinefinalvirtual

Get the center coordinate of the bin.

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

Definition at line 364 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
PRECISION ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinContent ( const Coord_t x) const
inline

Get the content of the bin at position x.

Definition at line 431 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
PRECISION ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinContent ( int  binidx) const
inlinefinalvirtual

Get the content of the bin at bin index binidx.

Implements ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >.

Definition at line 440 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
Coord_t ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinFrom ( int  binidx) const
inlinefinalvirtual

Get the coordinate of the low limit of the bin.

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

Definition at line 373 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
int ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinIndex ( const Coord_t x) const
inlinefinalvirtual

Gets the bin index for coordinate x; returns -1 if there is no such bin, e.g.

for axes without over / underflow but coordinate out of range.

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

Definition at line 341 of file THistImpl.h.

Referenced by ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinContent().

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
int ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinIndexAndGrow ( const Coord_t x)
inlinefinalvirtual

Gets the bin index for coordinate x, growing the axes as needed and possible.

Returns -1 if there is no such bin, e.g. for axes without over / underflow but coordinate out of range.

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

Definition at line 353 of file THistImpl.h.

Referenced by ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::Fill().

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
Coord_t ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinTo ( int  binidx) const
inlinefinalvirtual

Get the coordinate of the high limit of the bin.

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

Definition at line 381 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
std::vector<double> ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetBinUncertainties ( int  binidx) const
inlinefinalvirtual

Return the uncertainties for the given bin.

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

Definition at line 418 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
FillFunc_t ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetFillFunc ( ) const
inlinefinalvirtual

Retrieve the fill function for this histogram implementation, to prevent the virtual function call for high-frequency fills.

Implements ROOT::Detail::THistImplBase< DIMENSIONS, PRECISION >.

Definition at line 328 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
int ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetNBins ( ) const
inlinefinalprivatevirtual

Get the number of bins in this histograms, including possible under- and overflow bins.

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

Definition at line 310 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
AxisIterRange_t<DIMENSIONS> ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GetRange ( const std::array< Hist::EOverflow, DIMENSIONS > &  withOverUnder) const
inlinefinalvirtual

Get the begin() and end() for each axis.

Parameters
[in]withOverUnder- Whether the begin and end should contain over- or underflow. Ignored if the axis does not support over- / underflow.

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

Definition at line 449 of file THistImpl.h.

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
void ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::GrowAxis ( int  ,
double   
)
inline

Grow the axis number iAxis to fit the coordinate x.

The histogram (conceptually) combines pairs of bins along this axis until x is within the range of the axis. The axis must support growing for this to work (e.g. a TAxisGrow).

Definition at line 460 of file THistImpl.h.

Friends And Related Function Documentation

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
friend class THist< DIMENSIONS, PRECISION >
friend

Definition at line 296 of file THistImpl.h.

Member Data Documentation

template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
std::tuple<AXISCONFIG...> ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::fAxes
private
template<int DIMENSIONS, class PRECISION , class STATISTICS , class... AXISCONFIG>
std::vector<PRECISION> ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::fContent
private

The histogram's bin content.

Definition at line 321 of file THistImpl.h.

Referenced by ROOT::Detail::THistImpl< DIMENSIONS, PRECISION, STATISTICS, AXISCONFIG >::AddBinContent().


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