20 struct CounterRange_t {
37 ~THnBinIter() {
delete [] fCounter; }
42 THnBinIter(
const THnBinIter&);
49 CounterRange_t* fCounter;
58 ROOT::Internal::THnBaseBinIter(respectAxisRange),
59 fNdimensions(dim), fIndex(-1), fArray(arr) {
60 fCounter =
new CounterRange_t[dim]();
61 for (
Int_t i = 0; i < dim; ++i) {
63 fCounter[i].len = axis->
GetNbins() + 2;
66 fCounter[i].first = 0;
67 fCounter[i].last = fCounter[i].len - 1;
71 fHaveSkippedBin =
kTRUE;
74 if (min == 0 && max == 0) {
81 fCounter[i].first = min;
82 fCounter[i].last = max;
84 fIndex += fCounter[i].first * fCounter[i].cellSize;
87 --fCounter[dim - 1].i;
95 if (fNdimensions < 0)
return -1;
96 ++fCounter[fNdimensions - 1].i;
99 for (
Int_t d = fNdimensions - 1;
d > 0 && fCounter[
d].i > fCounter[
d].last; --
d) {
101 Int_t skippedCells = fCounter[
d].len - (fCounter[
d].last + 1);
102 skippedCells += fCounter[
d].first;
103 fIndex += skippedCells * fCounter[
d].cellSize;
104 fCounter[
d].i = fCounter[
d].first;
107 if (fCounter[0].i > fCounter[0].last) {
112 for (
Int_t d = 0;
d < fNdimensions; ++
d) {
113 coord[
d] = fCounter[
d].i;
186 fSumw2(dim, nbins,
kTRUE ),
218 for (
Long64_t ibin = 0; ibin < nbins; ++ibin)
Binding & operator=(OUT(*fun)(void))
Iterator over THnBase bins (internal implementation).
virtual Int_t GetCoord(Int_t dim) const =0
virtual Long64_t Next(Int_t *coord=0)=0
Class to manage histogram axis.
Int_t GetLast() const
Return last bin on the axis i.e.
Int_t GetFirst() const
Return first bin on the axis i.e.
Multidimensional histogram base.
TObjArray * GetListOfAxes()
Int_t GetNdimensions() const
Bool_t GetCalculateErrors() const
Multidimensional histogram.
void AllocCoordBuf() const
Create the coordinate buffer.
void InitStorage(Int_t *nbins, Int_t chunkSize)
Initialize the storage of a histogram created via Init()
virtual ~THn()
Destruct a THn.
TNDArrayT< Double_t > fSumw2
void Reset(Option_t *option="")
Reset the contents of a THn.
Long64_t GetNbins() const
void Sumw2()
Enable calculation of errors.
virtual const TNDArray & GetArray() const =0
ROOT::Internal::THnBaseBinIter * CreateIter(Bool_t respectAxisRange) const
Create an iterator over all bins. Public interface is THnIter.
void Reset(Option_t *="")
void Init(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
T At(const Int_t *idx) const
virtual Double_t AtAsDouble(ULong64_t linidx) const =0
Long64_t GetCellSize(Int_t dim) const
virtual void Init(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
virtual void Reset(Option_t *option="")=0
TObject * At(Int_t idx) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...