ROOT 6.10/09 Reference Guide |
Definition at line 376 of file THistImpl.hxx.
Public Types | |
template<int NDIM = DATA::GetNDim()> | |
using | AxisIterRange_t = typename Hist::AxisIterRange_t< NDIM > |
using | CoordArray_t = typename ImplBase_t::CoordArray_t |
using | FillFunc_t = void(THistImplBase::*)(const CoordArray_t &x, Weight_t w) |
Type of the Fill(x, w) function. More... | |
using | ImplBase_t = THistImplBase< DATA > |
using | Weight_t = typename ImplBase_t::Weight_t |
Public Types inherited from ROOT::Experimental::Detail::THistImplBase< DATA > | |
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 | |
THistImpl (TRootIOCtor *) | |
THistImpl (AXISCONFIG... axisArgs) | |
THistImpl (std::string_view title, AXISCONFIG... axisArgs) | |
void | Apply (std::function< void(THistBinRef< const ImplBase_t >)> op) const final |
Apply a function (lambda) to all bins of the histogram. More... | |
void | ApplyXC (std::function< void(const CoordArray_t &, Weight_t)> op) const final |
Apply a function (lambda) to all bins of the histogram. More... | |
virtual void | ApplyXCE (std::function< void(const CoordArray_t &, Weight_t, double)> op) const final |
Apply a function (lambda) to all bins of the histogram. More... | |
void | Fill (const CoordArray_t &x, Weight_t w=1.) |
Add a single weight w to the bin at coordinate x . More... | |
void | FillN (const std::array_view< CoordArray_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< CoordArray_t > xN) final |
Fill an array of weightN to the bins specified by coordinates xN . 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... | |
CoordArray_t | GetBinCenter (int binidx) const final |
Get the center coordinate of the bin. More... | |
Weight_t | GetBinContent (const CoordArray_t &x) const final |
Get the content of the bin at position x . More... | |
CoordArray_t | GetBinFrom (int binidx) const final |
Get the coordinate of the low limit of the bin. More... | |
int | GetBinIndex (const CoordArray_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 CoordArray_t &x) final |
Gets the bin index for coordinate x , growing the axes as needed and possible. More... | |
CoordArray_t | GetBinTo (int binidx) const final |
Get the coordinate of the high limit of the bin. More... | |
double | GetBinUncertainty (int binidx) const final |
Return the uncertainties for the given bin. More... | |
double | GetBinUncertainty (const CoordArray_t &x) const final |
Get the bin uncertainty for the bin at coordinate x. More... | |
FillFunc_t | GetFillFunc () const final |
Retrieve the fill function for this histogram implementation, to prevent the virtual function call for high-frequency fills. More... | |
AxisIterRange_t< DATA::GetNDim()> | GetRange (const std::array< Hist::EOverflow, DATA::GetNDim()> &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... | |
bool | HasBinUncertainty () const final |
Whether this histogram's statistics provide storage for uncertainties, or whether uncertainties are determined as poisson uncertainty of the content. More... | |
Public Member Functions inherited from ROOT::Experimental::Detail::THistImplBase< DATA > | |
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... | |
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... | |
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 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 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... | |
Private Attributes | |
std::tuple< AXISCONFIG... > | fAxes |
The histogram's axes. More... | |
Iterator interface | |
using | const_iterator = THistBinIter< const ImplBase_t > |
using | iterator = THistBinIter< ImplBase_t > |
iterator | begin () noexcept |
const_iterator | begin () const noexcept |
iterator | end () noexcept |
const_iterator | end () const noexcept |
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::THistImpl< DATA, AXISCONFIG >::AxisIterRange_t = typename Hist::AxisIterRange_t<NDIM> |
Definition at line 388 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::const_iterator = THistBinIter<const ImplBase_t > |
Definition at line 562 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::CoordArray_t = typename ImplBase_t::CoordArray_t |
Definition at line 384 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 151 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::ImplBase_t = THistImplBase<DATA> |
Definition at line 383 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::iterator = THistBinIter<ImplBase_t > |
Definition at line 563 of file THistImpl.hxx.
using ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::Weight_t = typename ImplBase_t::Weight_t |
Definition at line 385 of file THistImpl.hxx.
ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::THistImpl | ( | TRootIOCtor * | ) |
Definition at line 572 of file THistImpl.hxx.
ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::THistImpl | ( | AXISCONFIG... | axisArgs | ) |
Definition at line 578 of file THistImpl.hxx.
ROOT::Experimental::Detail::THistImpl< DATA, AXISCONFIG >::THistImpl | ( | std::string_view | title, |
AXISCONFIG... | axisArgs | ||
) |
Definition at line 585 of file THistImpl.hxx.
|
inlinefinal |
Apply a function (lambda) to all bins of the histogram.
The function takes the bin reference.
Definition at line 404 of file THistImpl.hxx.
|
inlinefinalvirtual |
Apply a function (lambda) to all bins of the histogram.
The function takes the bin coordinate and content.
Implements ROOT::Experimental::Detail::THistImplBase< DATA >.
Definition at line 411 of file THistImpl.hxx.
|
inlinefinalvirtual |
Apply a function (lambda) to all bins of the histogram.
The function takes the bin coordinate, content and uncertainty ("error") of the content.
Implements ROOT::Experimental::Detail::THistImplBase< DATA >.
Definition at line 418 of file THistImpl.hxx.
|
inlinenoexcept |
Definition at line 564 of file THistImpl.hxx.
|
inlinenoexcept |
Definition at line 565 of file THistImpl.hxx.
|
inlinenoexcept |
Definition at line 566 of file THistImpl.hxx.
|
inlinenoexcept |
Definition at line 567 of file THistImpl.hxx.
|
inline |
Add a single weight w
to the bin at coordinate x
.
Definition at line 510 of file THistImpl.hxx.
|
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]
xN
and weightN
must have the same size! Implements ROOT::Experimental::Detail::THistImplBase< DATA >.
Definition at line 486 of file THistImpl.hxx.
|
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::Experimental::Detail::THistImplBase< DATA >.
Definition at line 503 of file THistImpl.hxx.
|
inline |
Get the axes of this histogram.
Definition at line 425 of file THistImpl.hxx.
|
inlinefinalvirtual |
Normalized axes access, converting the actual axis to TAxisConfig.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 428 of file THistImpl.hxx.
|
inlinefinalvirtual |
Get the center coordinate of the bin.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 458 of file THistImpl.hxx.
|
inlinefinalvirtual |
Get the content of the bin at position x
.
Implements ROOT::Experimental::Detail::THistImplBase< DATA >.
Definition at line 516 of file THistImpl.hxx.
|
inlinefinalvirtual |
Get the coordinate of the low limit of the bin.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 467 of file THistImpl.hxx.
|
inlinefinal |
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.
Definition at line 435 of file THistImpl.hxx.
|
inlinefinal |
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.
Definition at line 447 of file THistImpl.hxx.
|
inlinefinalvirtual |
Get the coordinate of the high limit of the bin.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 475 of file THistImpl.hxx.
|
inlinefinalvirtual |
Return the uncertainties for the given bin.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 524 of file THistImpl.hxx.
|
inlinefinalvirtual |
Get the bin uncertainty for the bin at coordinate x.
Implements ROOT::Experimental::Detail::THistImplBase< DATA >.
Definition at line 529 of file THistImpl.hxx.
|
inlinefinalvirtual |
Retrieve the fill function for this histogram implementation, to prevent the virtual function call for high-frequency fills.
Implements ROOT::Experimental::Detail::THistImplBase< DATA >.
Definition at line 400 of file THistImpl.hxx.
|
inlinefinal |
Get the begin() and end() for each axis.
[in] | withOverUnder | - Whether the begin and end should contain over- or underflow. Ignored if the axis does not support over- / underflow. |
Definition at line 545 of file THistImpl.hxx.
|
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 556 of file THistImpl.hxx.
|
inlinefinalvirtual |
Whether this histogram's statistics provide storage for uncertainties, or whether uncertainties are determined as poisson uncertainty of the content.
Implements ROOT::Experimental::Detail::THistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 536 of file THistImpl.hxx.
|
private |
The histogram's axes.
Definition at line 391 of file THistImpl.hxx.