66 Int_t overBins = addOverflow ? 2 : 0;
68 for (
Int_t i = 0; i < ndim; ++i) {
69 fSizes[ndim - i - 1] =
fSizes[ndim - i] * (nbins[ndim - i - 1] + overBins);
102 template <
typename T>
115 R__ASSERT(
fSizes == 0 &&
"Element operator can only be used on non-array element. Missing an operator[] level?");
125 template <
typename T>
171 return fData[linidx];
175 return fData[linidx];
179 if (!
fData)
return 0.;
180 return fData[linidx];
184 fData[linidx] = (
T) value;
188 fData[linidx] += (
T) value;
210 #endif // ROOT_TNDArray
Long64_t GetCellSize(Int_t dim) const
TNDArrayT(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
T At(ULong64_t linidx) const
virtual Double_t AtAsDouble(ULong64_t linidx) const =0
Buffer base class used for serializing objects.
void SetAsDouble(ULong64_t linidx, Double_t value)
virtual void SetAsDouble(ULong64_t linidx, Double_t value)=0
Long64_t GetBin(const Int_t *idx) const
TNDArray & operator=(const TNDArray &)
void Init(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
virtual void Reset(Option_t *option="")=0
ClassDefNV(TNDArrayRef, 0)
TNDArrayRef< T > operator[](Int_t idx) const
void Streamer(TBuffer &R__b)
TNDArray(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
TNDArrayRef< T > operator[](Int_t idx) const
void Reset(Option_t *="")
Long64_t GetNbins() const
void AddAt(ULong64_t linidx, Double_t value)
T At(const Int_t *idx) const
The ROOT global object gROOT contains a list of all defined classes.
TNDArrayRef(const T *data, const Long64_t *sizes)
Int_t GetNdimensions() const
unsigned long long ULong64_t
virtual void Init(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
Mother of all ROOT objects.
Double_t AtAsDouble(ULong64_t linidx) const
virtual void AddAt(ULong64_t linidx, Double_t value)=0