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