ROOT 6.12/07 Reference Guide |
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 142 of file THistImpl.hxx.
Public Types | |
using | CoordArray_t = Hist::CoordArray_t< DATA::GetNDim()> |
Type of the coordinate: a DIMENSIONS-dimensional array of doubles. More... | |
using | FillFunc_t = void(THistImplBase::*)(const CoordArray_t &x, Weight_t w) |
Type of the Fill(x, w) function. More... | |
using | Stat_t = DATA |
Type of the statistics (bin content, uncertainties etc). More... | |
using | Weight_t = typename DATA::Weight_t |
Type of the bin content (and thus weights). More... | |
Public Types inherited from ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()> | |
using | AxisIterRange_t = Hist::AxisIterRange_t< DIMENSIONS > |
Range type. More... | |
using | CoordArray_t = Hist::CoordArray_t< DIMENSIONS > |
Type of the coordinate: a DIMENSIONS-dimensional array of doubles. More... | |
Public Member Functions | |
THistImplBase ()=default | |
THistImplBase (size_t numBins) | |
THistImplBase (std::string_view title, size_t numBins) | |
THistImplBase (const THistImplBase &)=default | |
THistImplBase (THistImplBase &&)=default | |
void | AddBinContent (int binidx, Weight_t w) |
Add w to the bin at index bin . More... | |
virtual void | Apply (std::function< void(THistBinRef< const THistImplBase >)>) const =0 |
Apply a function (lambda) to all bins of the histogram. More... | |
virtual void | ApplyXC (std::function< void(const CoordArray_t &, Weight_t)>) const =0 |
Apply a function (lambda) to all bins of the histogram. More... | |
virtual void | ApplyXCE (std::function< void(const CoordArray_t &, Weight_t, double)>) const =0 |
Apply a function (lambda) to all bins of the histogram. More... | |
virtual void | FillN (const std::array_view< CoordArray_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< CoordArray_t > xN)=0 |
Interface function to fill a vector or array of coordinates. More... | |
virtual Weight_t | GetBinContent (const CoordArray_t &x) const =0 |
Get the bin content (sum of weights) for the bin at coordinate x. More... | |
Weight_t | GetBinContent (int binidx) const |
Get the bin content (sum of weights) for bin index binidx . More... | |
Weight_t & | GetBinContent (int binidx) |
Get the bin content (sum of weights) for bin index binidx (non-const). More... | |
double | GetBinContentAsDouble (int binidx) const final |
Get the bin content (sum of weights) for bin index binidx , cast to double. More... | |
virtual double | GetBinUncertainty (const CoordArray_t &x) const =0 |
Get the bin uncertainty for the bin at coordinate x. More... | |
virtual FillFunc_t | GetFillFunc () const =0 |
Retrieve the pointer to the overridden Fill(x, w) function. More... | |
int | GetNBins () const noexcept final |
Get the number of bins in this histogram, including possible under- and overflow bins. More... | |
const Stat_t & | GetStat () const noexcept |
Const access to statistics. More... | |
Stat_t & | GetStat () noexcept |
Non-const access to statistics. More... | |
Public Member Functions inherited from ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()> | |
THistImplPrecisionAgnosticBase ()=default | |
THistImplPrecisionAgnosticBase (const THistImplPrecisionAgnosticBase &)=default | |
THistImplPrecisionAgnosticBase (THistImplPrecisionAgnosticBase &&)=default | |
THistImplPrecisionAgnosticBase (std::string_view title) | |
virtual | ~THistImplPrecisionAgnosticBase () |
virtual TAxisView | GetAxis (int iAxis) const=0 |
Get a TAxisView on axis with index iAxis. More... | |
virtual CoordArray_t | GetBinCenter (int binidx) const=0 |
Get the center in all dimensions of the bin with index binidx . More... | |
virtual CoordArray_t | GetBinFrom (int binidx) const=0 |
Get the lower edge in all dimensions of the bin with index binidx . More... | |
virtual int | GetBinIndex (const CoordArray_t &x) const=0 |
Given the coordinate x , determine the index of the bin. More... | |
virtual int | GetBinIndexAndGrow (const CoordArray_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 CoordArray_t | GetBinTo (int binidx) const=0 |
Get the upper edge in all dimensions of the bin with index binidx . More... | |
virtual double | GetBinUncertainty (int binidx) const=0 |
The bin's uncertainty. More... | |
virtual AxisIterRange_t | GetRange (const std::array< Hist::EOverflow, DIMENSIONS > &withOverUnder) const=0 |
Get a AxisIterRange_t for the whole histogram, possibly restricting the range to non-overflow bins. More... | |
const std::string & | GetTitle () const |
Get the histogram title. More... | |
virtual bool | HasBinUncertainty () const=0 |
Whether this histogram's statistics provide storage for uncertainties, or whether uncertainties are determined as poisson uncertainty of the content. More... | |
Private Attributes | |
Stat_t | fStatistics |
The histogram's bin content, uncertainties etc. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()> | |
static constexpr int | GetNDim () |
Number of dimensions of the coordinates. More... | |
#include <ROOT/THistImpl.hxx>
using ROOT::Experimental::Detail::THistImplBase< DATA >::CoordArray_t = Hist::CoordArray_t<DATA::GetNDim()> |
Type of the coordinate: a DIMENSIONS-dimensional array of doubles.
Definition at line 147 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImplBase< DATA >::FillFunc_t = void (THistImplBase::*)(const CoordArray_t &x, Weight_t w) |
Type of the Fill(x, w) function.
Definition at line 152 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImplBase< DATA >::Stat_t = DATA |
Type of the statistics (bin content, uncertainties etc).
Definition at line 145 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImplBase< DATA >::Weight_t = typename DATA::Weight_t |
Type of the bin content (and thus weights).
Definition at line 149 of file THistImpl.hxx.
|
default |
|
inline |
Definition at line 160 of file THistImpl.hxx.
|
inline |
Definition at line 161 of file THistImpl.hxx.
|
default |
|
default |
|
inline |
Add w
to the bin at index bin
.
Definition at line 219 of file THistImpl.hxx.
|
pure virtual |
Apply a function (lambda) to all bins of the histogram.
The function takes the bin reference.
|
pure virtual |
Apply a function (lambda) to all bins of the histogram.
The function takes the bin coordinate and content.
Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
pure virtual |
Apply a function (lambda) to all bins of the histogram.
The function takes the bin coordinate, content and uncertainty ("error") of the content.
Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
pure virtual |
Interface function to fill a vector or array of coordinates with corresponding weights.
xN
and weightN
must be the same! Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
pure virtual |
Interface function to fill a vector or array of coordinates.
Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
pure virtual |
Get the bin content (sum of weights) for the bin at coordinate x.
Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
inline |
Get the bin content (sum of weights) for bin index binidx
.
Definition at line 203 of file THistImpl.hxx.
|
inline |
Get the bin content (sum of weights) for bin index binidx
(non-const).
Definition at line 206 of file THistImpl.hxx.
|
inlinefinalvirtual |
Get the bin content (sum of weights) for bin index binidx
, cast to double.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 216 of file THistImpl.hxx.
|
pure virtual |
Get the bin uncertainty for the bin at coordinate x.
Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
pure virtual |
Retrieve the pointer to the overridden Fill(x, w) function.
Implemented in ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >.
|
inlinefinalvirtualnoexcept |
Get the number of bins in this histogram, including possible under- and overflow bins.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 200 of file THistImpl.hxx.
|
inlinenoexcept |
Const access to statistics.
Definition at line 209 of file THistImpl.hxx.
|
inlinenoexcept |
Non-const access to statistics.
Definition at line 212 of file THistImpl.hxx.
|
private |
The histogram's bin content, uncertainties etc.
Definition at line 156 of file THistImpl.hxx.