Definition at line 721 of file RHistImpl.hxx.
Public Types | |
template<int NDIMS = DATA::GetNDim()> | |
using | AxisIterRange_t = typename Hist::AxisIterRange_t< NDIMS > |
using | BinArray_t = typename ImplBase_t::BinArray_t |
using | CoordArray_t = typename ImplBase_t::CoordArray_t |
using | FillFunc_t = void(RHistImplBase::*)(const CoordArray_t &x, Weight_t w) |
Type of the Fill(x, w) function. More... | |
using | ImplBase_t = RHistImplBase< DATA > |
using | Weight_t = typename ImplBase_t::Weight_t |
Public Types inherited from ROOT::Experimental::Detail::RHistImplBase< DATA > | |
using | BinArray_t = std::array< int, DATA::GetNDim()> |
Type of the local per-axis bin indices. More... | |
using | CoordArray_t = Hist::CoordArray_t< DATA::GetNDim()> |
Type of the coordinates. More... | |
using | FillFunc_t = void(RHistImplBase::*)(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::RHistImplPrecisionAgnosticBase< DATA::GetNDim()> | |
using | AxisIterRange_t = Hist::AxisIterRange_t< DIMENSIONS > |
Range type. More... | |
using | BinArray_t = std::array< int, DIMENSIONS > |
Type of the local per-axis bin indices. More... | |
using | CoordArray_t = Hist::CoordArray_t< DIMENSIONS > |
Type of the coordinates. More... | |
Public Member Functions | |
RHistImpl (AXISCONFIG... axisArgs) | |
RHistImpl (std::string_view title, AXISCONFIG... axisArgs) | |
RHistImpl (TRootIOCtor *) | |
std::unique_ptr< ImplBase_t > | Clone () const override |
template<int NDIMS> | |
int | ComputeGlobalBin (BinArray_t &local_bins) const |
Computes the global index of a certain bin on an NDIMS -dimensional histogram, knowing the local per-axis bin indices as returned by calling FindBin() on each axis. More... | |
template<int NDIMS, typename BINTYPE > | |
int | ComputeGlobalBinRaw (const BinArray_t &zeroBasedLocalBins, BINTYPE GetNBinType) const |
Computes a zero-based global bin index, given... More... | |
template<int NDIMS> | |
BinArray_t | ComputeLocalBins (int global_bin) const |
Computes the local per-axis bin indices of a certain bin on an NDIMS -dimensional histogram, knowing the global histogram bin index. More... | |
template<int NDIMS, typename BINTYPE > | |
BinArray_t | ComputeLocalBinsRaw (int zeroBasedGlobalBin, BINTYPE GetNBinType) const |
Computes zero-based local bin indices, given... 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::span< const CoordArray_t > xN) final |
Fill an array of weightN to the bins specified by coordinates xN . More... | |
void | FillN (const std::span< const CoordArray_t > xN, const std::span< const Weight_t > weightN) 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... | |
const RAxisBase & | GetAxis (int iAxis) const final |
Normalized axes access, converting from actual axis type to base class. More... | |
CoordArray_t | GetBinCenter (int binidx) const final |
Get the center coordinates of the bin with index binidx . 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 coordinates of the low limit of the bin with index binidx . More... | |
int | GetBinIndex (const CoordArray_t &x) const final |
Get the bin index for the given coordinates x . More... | |
int | GetBinIndexAndGrow (const CoordArray_t &x) const final |
Get the bin index for the given coordinates x , growing the axes as needed. More... | |
int | GetBinIndexFromLocalBins (const BinArray_t &x) const final |
Get the bin index for the given local per-axis bin indices x , using ComputeGlobalBin() . More... | |
CoordArray_t | GetBinTo (int binidx) const final |
Get the coordinates of the high limit of the bin with index binidx . More... | |
double | GetBinUncertainty (const CoordArray_t &x) const final |
Get the bin uncertainty for the bin at coordinate x . More... | |
double | GetBinUncertainty (int binidx) const final |
Return the uncertainties for the given bin index. 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... | |
BinArray_t | GetLocalBins (int binidx) const final |
Get the local per-axis bin indices x for the given bin index, using ComputeLocalBins() . More... | |
AxisIterRange_t< DATA::GetNDim()> | GetRange () 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... | |
template<int NDIMS> | |
BinArray_t | LocalBinsToVirtualBins (const BinArray_t &localBins) const |
Converts local axis bins from the standard kUnderflowBin /kOverflowBin for under/overflow bin indexing convention, to a "virtual bin" convention where the underflow bin has index 0 and the overflow bin has index N+1 where N is the axis' number of regular bins. More... | |
template<int NDIMS> | |
BinArray_t | VirtualBinsToLocalBins (const BinArray_t &virtualBins) const |
Converts zero-based virtual bins where the underflow bin has index 0 and the overflow bin has index N+1 where N is the axis' number of regular bins, to the standard kUnderflowBin /kOverflowBin for under/overflow bin indexing convention. More... | |
Public Member Functions inherited from ROOT::Experimental::Detail::RHistImplBase< DATA > | |
RHistImplBase ()=default | |
RHistImplBase (const RHistImplBase &)=default | |
RHistImplBase (RHistImplBase &&)=default | |
RHistImplBase (size_t numBins, size_t numOverflowBins) | |
RHistImplBase (std::string_view title, size_t numBins, size_t numOverflowBins) | |
void | AddBinContent (int binidx, Weight_t w) |
Add w to the bin at index bin . More... | |
virtual std::unique_ptr< RHistImplBase > | Clone () const =0 |
virtual void | FillN (const std::span< const CoordArray_t > xN)=0 |
Interface function to fill a vector or array of coordinates. More... | |
virtual void | FillN (const std::span< const CoordArray_t > xN, const std::span< const Weight_t > weightN)=0 |
Interface function to fill a vector or array of coordinates with corresponding weights. 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) |
Get the bin content (sum of weights) for bin index binidx (non-const). More... | |
Weight_t | GetBinContent (int binidx) const |
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... | |
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... | |
int | GetNBinsNoOver () const noexcept final |
Get the number of bins in this histogram, excluding possible under- and overflow bins. More... | |
int | GetNOverflowBins () const noexcept final |
Get the number of under- and overflow bins of this histogram, excluding all regular 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::RHistImplPrecisionAgnosticBase< DATA::GetNDim()> | |
RHistImplPrecisionAgnosticBase ()=default | |
RHistImplPrecisionAgnosticBase (const RHistImplPrecisionAgnosticBase &)=default | |
RHistImplPrecisionAgnosticBase (RHistImplPrecisionAgnosticBase &&)=default | |
RHistImplPrecisionAgnosticBase (std::string_view title) | |
virtual | ~RHistImplPrecisionAgnosticBase () |
virtual const RAxisBase & | GetAxis (int iAxis) const=0 |
Get a base-class view 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 double | GetBinContentAsDouble (int binidx) const=0 |
The bin content, cast to double. 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) const=0 |
Given the coordinate x , determine the index of the bin, possibly growing axes for which x is out of range. More... | |
virtual int | GetBinIndexFromLocalBins (const BinArray_t &x) const=0 |
Given the local per-axis bins x , determine the index of the bin. 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 |
Get the uncertainty of the bin with index binidx . More... | |
virtual BinArray_t | GetLocalBins (int binidx) const=0 |
Given the index of the bin, determine the local per-axis bins x . More... | |
virtual int | GetNBins () const noexcept=0 |
Number of bins of this histogram, including all overflow and underflow bins. More... | |
virtual int | GetNBinsNoOver () const noexcept=0 |
Number of bins of this histogram, excluding all overflow and underflow bins. More... | |
virtual int | GetNOverflowBins () const noexcept=0 |
Number of under- and overflow bins of this histogram, excluding all regular bins. More... | |
virtual AxisIterRange_t | GetRange () const=0 |
Get an AxisIterRange_t for the whole histogram, excluding under- and overflow. 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 | |
std::tuple< AXISCONFIG... > | fAxes |
The histogram's axes. More... | |
Iterator interface | |
using | const_iterator = RHistBinIter< const ImplBase_t > |
using | iterator = RHistBinIter< 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::RHistImplPrecisionAgnosticBase< DATA::GetNDim()> | |
static constexpr int | GetNDim () |
Number of dimensions of the coordinates. More... | |
#include <ROOT/RHistImpl.hxx>
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::AxisIterRange_t = typename Hist::AxisIterRange_t<NDIMS> |
Definition at line 733 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::BinArray_t = typename ImplBase_t::BinArray_t |
Definition at line 729 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::const_iterator = RHistBinIter<const ImplBase_t> |
Definition at line 1124 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::CoordArray_t = typename ImplBase_t::CoordArray_t |
Definition at line 728 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImplBase< DATA >::FillFunc_t = void (RHistImplBase::*)(const CoordArray_t &x, Weight_t w) |
Type of the Fill(x, w)
function.
Definition at line 163 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::ImplBase_t = RHistImplBase<DATA> |
Definition at line 727 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::iterator = RHistBinIter<ImplBase_t> |
Definition at line 1125 of file RHistImpl.hxx.
using ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::Weight_t = typename ImplBase_t::Weight_t |
Definition at line 730 of file RHistImpl.hxx.
ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::RHistImpl | ( | TRootIOCtor * | ) |
Definition at line 1134 of file RHistImpl.hxx.
ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::RHistImpl | ( | AXISCONFIG... | axisArgs | ) |
Definition at line 1138 of file RHistImpl.hxx.
ROOT::Experimental::Detail::RHistImpl< DATA, AXISCONFIG >::RHistImpl | ( | std::string_view | title, |
AXISCONFIG... | axisArgs | ||
) |
Definition at line 1143 of file RHistImpl.hxx.
|
inlinenoexcept |
Definition at line 1127 of file RHistImpl.hxx.
|
inlinenoexcept |
Definition at line 1126 of file RHistImpl.hxx.
|
inlineoverridevirtual |
Implements ROOT::Experimental::Detail::RHistImplBase< DATA >.
Definition at line 743 of file RHistImpl.hxx.
|
inline |
Computes the global index of a certain bin on an NDIMS
-dimensional histogram, knowing the local per-axis bin indices as returned by calling FindBin()
on each axis.
Definition at line 810 of file RHistImpl.hxx.
|
inline |
Computes a zero-based global bin index, given...
GetNBinsNoOver
or GetNBins
depending on what you are trying to do)Definition at line 766 of file RHistImpl.hxx.
|
inline |
Computes the local per-axis bin indices of a certain bin on an NDIMS
-dimensional histogram, knowing the global histogram bin index.
Definition at line 866 of file RHistImpl.hxx.
|
inline |
Computes zero-based local bin indices, given...
GetNBinsNoOver
or GetNBins
depending on what you are trying to do)Definition at line 779 of file RHistImpl.hxx.
|
inlinenoexcept |
Definition at line 1129 of file RHistImpl.hxx.
|
inlinenoexcept |
Definition at line 1128 of file RHistImpl.hxx.
|
inline |
Add a single weight w
to the bin at coordinate x
.
Definition at line 1076 of file RHistImpl.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::RHistImplBase< DATA >.
Definition at line 1068 of file RHistImpl.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::RHistImplBase< DATA >.
Definition at line 1051 of file RHistImpl.hxx.
|
inline |
Get the axes of this histogram.
Definition at line 754 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Normalized axes access, converting from actual axis type to base class.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 757 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the center coordinates of the bin with index binidx
.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1021 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the content of the bin at position x
.
Implements ROOT::Experimental::Detail::RHistImplBase< DATA >.
Definition at line 1083 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the coordinates of the low limit of the bin with index binidx
.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1030 of file RHistImpl.hxx.
|
inlinefinal |
Get the bin index for the given coordinates x
.
The use of RFindLocalBins
allows to convert the coordinates to local per-axis bin indices before using ComputeGlobalBin()
.
Definition at line 977 of file RHistImpl.hxx.
|
inlinefinal |
Get the bin index for the given coordinates x
, growing the axes as needed.
The use of RFindLocalBins
allows to convert the coordinates to local per-axis bin indices before using ComputeGlobalBin()
.
TODO: implement growable behavior
Definition at line 990 of file RHistImpl.hxx.
|
inlinefinal |
Get the bin index for the given local per-axis bin indices x
, using ComputeGlobalBin()
.
Definition at line 1005 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the coordinates of the high limit of the bin with index binidx
.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1039 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the bin uncertainty for the bin at coordinate x
.
Implements ROOT::Experimental::Detail::RHistImplBase< DATA >.
Definition at line 1093 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Return the uncertainties for the given bin index.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1090 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Retrieve the fill function for this histogram implementation, to prevent the virtual function call for high-frequency fills.
Implements ROOT::Experimental::Detail::RHistImplBase< DATA >.
Definition at line 749 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the local per-axis bin indices x
for the given bin index, using ComputeLocalBins()
.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1014 of file RHistImpl.hxx.
|
inlinefinalvirtual |
Get the begin() and end() for each axis.
Implements ROOT::Experimental::Detail::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1105 of file RHistImpl.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 RAxisGrow
).
Definition at line 1117 of file RHistImpl.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::RHistImplPrecisionAgnosticBase< DATA::GetNDim()>.
Definition at line 1101 of file RHistImpl.hxx.
|
inline |
Converts local axis bins from the standard kUnderflowBin
/kOverflowBin
for under/overflow bin indexing convention, to a "virtual bin" convention where the underflow bin has index 0
and the overflow bin has index N+1
where N
is the axis' number of regular bins.
Definition at line 790 of file RHistImpl.hxx.
|
inline |
Converts zero-based virtual bins where the underflow bin has index 0
and the overflow bin has index N+1
where N
is the axis' number of regular bins, to the standard kUnderflowBin
/kOverflowBin
for under/overflow bin indexing convention.
Definition at line 801 of file RHistImpl.hxx.
|
private |
The histogram's axes.
Definition at line 736 of file RHistImpl.hxx.