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