12 #ifndef ROOT_THnSparse 13 #define ROOT_THnSparse 34 class THnSparseCompactBinCoord;
202 template <
class CONT>
224 #endif // ROOT_THnSparse Abstract array base class.
Double_t GetSparseFractionMem() const
Return the amount of used memory over memory that would be used by a non-sparse n-dimensional histogr...
THnSparseArrayChunk is used internally by THnSparse.
void SetFilledBins(Long64_t nbins)
void AddBinContent(const Int_t *idx, Double_t v=1.)
void FillExMap()
We have been streamed; set up fBins.
THnBase * RebinBase(Int_t group) const
Combine the content of "group" neighboring bins into a new bin and return the resulting THnBase...
THnSparseArrayChunk * AddChunk()
Create a new chunk of bin content.
Long64_t GetBin(const Int_t *idx) const
Double_t GetBinContent(const Int_t *idx) const
THnSparseT< TArrayI > THnSparseI
static THnBase * CreateHnAny(const char *name, const char *title, const TH1 *h1, Bool_t sparse, Int_t chunkSize=1024 *16)
Create a THn / THnSparse object from a histogram deriving from TH1.
Double_t GetBinError2(Long64_t linidx) const
Get square of the error of bin addressed by linidx as If errors are not enabled (via Sumw2() or Calc...
void InitStorage(Int_t *nbins, Int_t chunkSize)
Initialize the storage of a histogram created via Init()
THnSparseT< TArrayS > THnSparseS
void FillBinBase(Double_t w)
THnSparseCompactBinCoord * fCompactCoord
filled bins for non-unique hashes, containing pairs of (bin index 0, bin index 1) ...
Long64_t GetNbins() const
TH2D * Projection(Int_t yDim, Int_t xDim, Option_t *option="") const
void AddBinContent(const Int_t *x, Double_t v=1.)
THnSparseT< TArrayD > THnSparseD
TH3D * Projection(Int_t xDim, Int_t yDim, Int_t zDim, Option_t *option="") const
#define ClassDef(name, id)
Efficient multidimensional histogram.
TH1D * Projection(Int_t xDim, Option_t *option="") const
virtual TArray * GenerateArray() const =0
THnSparse * Projection(Int_t ndim, const Int_t *dim, Option_t *option="") const
TH1D * Projection(Int_t xDim, Option_t *option="") const
THnSparse * Rebin(const Int_t *group) const
void AddBinContent(Int_t idx, Double_t v=1.)
void SetBinContent(const Int_t *idx, Double_t v)
THnSparseArrayChunk * GetChunk(Int_t idx) const
THnSparseT< TArrayF > THnSparseF
Long64_t GetBin(const Double_t *x) const
virtual ~THnSparse()
Destruct a THnSparse.
Double_t GetBinContent(const Int_t *idx) const
THnSparseT(const char *name, const char *title, Int_t dim, const Int_t *nbins, const Double_t *xmin=0, const Double_t *xmax=0, Int_t chunksize=1024 *16)
void SetBinError2(Long64_t bin, Double_t e2)
Set error of bin with index "bin" to "e", enable errors if needed.
TExMap fBinsContinued
filled bins
void Reset(Option_t *option="")
Clear the histogram.
THnSparseT< TArrayL > THnSparseL
3-D histogram with a double per channel (see TH1 documentation)}
Iterator over THnBase bins (internal implementation).
void Sumw2()
Enable calculation of errors.
Int_t GetEntriesFast() const
THnSparseT< TArrayC > THnSparseC
1-D histogram with a double per channel (see TH1 documentation)}
void SetBinContent(const Int_t *idx, Double_t v)
TArray * GenerateArray() const
ROOT::Internal::THnBaseBinIter * CreateIter(Bool_t respectAxisRange) const
Create an iterator over all filled bins of a THnSparse.
void Reserve(Long64_t nbins)
Initialize storage for nbins.
THnBase * ProjectionND(Int_t ndim, const Int_t *dim, Option_t *option="") const
void AddBinError2(Long64_t bin, Double_t e2)
Add "e" to error of bin with index "bin", enable errors if needed.
Double_t GetSparseFractionBins() const
Return the amount of filled bins over all bins.
THnSparse()
Construct an empty THnSparse.
THnSparse * Rebin(Int_t group) const
void FillBin(Long64_t bin, Double_t w)
THnSparseCompactBinCoord * GetCompactCoord() const
Return THnSparseCompactBinCoord object.
THnSparse & operator=(const THnSparse &)
static THnSparse * CreateSparse(const char *name, const char *title, const TH1 *h1, Int_t chunkSize=1024 *16)
static THnSparse * CreateSparse(const char *name, const char *title, const THnBase *hn, Int_t chunkSize=1024 *16)
Multidimensional histogram base.
Templated implementation of the abstract base THnSparse.
Int_t GetChunkSize() const
Long64_t GetBinIndexForCurrentBin(Bool_t allocate)
Return the index for fCurrentBinIndex.
This class stores a (key,value) pair using an external hash.
Long64_t GetBin(const char *name[]) const
2-D histogram with a double per channel (see TH1 documentation)}