12 #ifndef ROOT_THnSparse
13 #define ROOT_THnSparse
29 #ifndef ROOT_THnSparse_Internal
50 class THnSparseCompactBinCoord;
218 template <
class CONT>
240 #endif // ROOT_THnSparse
Abstract array base class.
Double_t GetBinContent(const Int_t *idx) const
THnSparseCompactBinCoord * GetCompactCoord() const
Return THnSparseCompactBinCoord object.
THnSparseArrayChunk is used internally by THnSparse.
void SetFilledBins(Long64_t nbins)
THnSparse * Projection(Int_t ndim, const Int_t *dim, Option_t *option="") const
void AddBinContent(const Int_t *idx, Double_t v=1.)
TH1D * Projection(Int_t xDim, Option_t *option="") const
void FillExMap()
We have been streamed; set up fBins.
THnSparseArrayChunk * AddChunk()
Create a new chunk of bin content.
THnSparseT< TArrayI > THnSparseI
Int_t GetChunkSize() const
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.
THnSparse * Rebin(Int_t group) const
Long64_t GetBin(const Double_t *x) const
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)
Int_t GetEntriesFast() const
Long64_t GetNbins() const
THnSparseCompactBinCoord * fCompactCoord
filled bins for non-unique hashes, containing pairs of (bin index 0, bin index 1) ...
void AddBinContent(const Int_t *x, Double_t v=1.)
THnSparseT< TArrayD > THnSparseD
Efficient multidimensional histogram.
virtual TArray * GenerateArray() const =0
Double_t GetSparseFractionBins() const
Return the amount of filled bins over all bins.
void AddBinContent(Int_t idx, Double_t v=1.)
void SetBinContent(const Int_t *idx, Double_t v)
TH2D * Projection(Int_t yDim, Int_t xDim, Option_t *option="") const
TH1D * Projection(Int_t xDim, Option_t *option="") const
THnSparse * Rebin(const Int_t *group) const
THnSparseT< TArrayF > THnSparseF
Long64_t GetBin(const Int_t *idx) const
THnBase * RebinBase(Int_t group) const
Combine the content of "group" neighboring bins into a new bin and return the resulting THnBase...
virtual ~THnSparse()
Destruct a THnSparse.
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)}
THnSparseArrayChunk * GetChunk(Int_t idx) const
Iterator over THnBase bins (internal implementation).
ROOT::Internal::THnBaseBinIter * CreateIter(Bool_t respectAxisRange) const
Create an iterator over all filled bins of a THnSparse.
void Sumw2()
Enable calculation of errors.
THnSparseT< TArrayC > THnSparseC
Double_t GetBinError2(Long64_t linidx) const
Get square of the error of bin addressed by linidx as BEGIN_LATEX #sum weight^{2} END_LATEX If errors...
1-D histogram with a double per channel (see TH1 documentation)}
void SetBinContent(const Int_t *idx, Double_t v)
void Reserve(Long64_t nbins)
Initialize storage for nbins.
void AddBinError2(Long64_t bin, Double_t e2)
Add "e" to error of bin with index "bin", enable errors if needed.
Double_t GetBinContent(const Int_t *idx) const
THnSparse()
Construct an empty THnSparse.
Double_t GetSparseFractionMem() const
Return the amount of used memory over memory that would be used by a non-sparse n-dimensional histogr...
void FillBin(Long64_t bin, Double_t w)
Long64_t GetBin(const char *name[]) const
TH3D * Projection(Int_t xDim, Int_t yDim, Int_t zDim, Option_t *option="") const
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.
THnBase * ProjectionND(Int_t ndim, const Int_t *dim, Option_t *option="") const
TArray * GenerateArray() const
Long64_t GetBinIndexForCurrentBin(Bool_t allocate)
Return the index for fCurrentBinIndex.
This class stores a (key,value) pair using an external hash.
2-D histogram with a double per channel (see TH1 documentation)}