66 fNdimensions(0), fEntries(0),
67 fTsumw(0), fTsumw2(-1.), fIntegral(0), fIntegralStatus(kNoInt)
74 if (GetCalculateErrors()) {
75 for (
Int_t d = 0; d < fNdimensions; ++d) {
78 fTsumwx2[d] += w * xd * xd;
86 if (GetCalculateErrors()) {
90 fIntegralStatus = kInvalidInt;
93 virtual void InitStorage(
Int_t* nbins,
Int_t chunkSize) = 0;
94 void Init(
const char* name,
const char* title,
96 Int_t chunkSize = 1024 * 16);
97 THnBase* CloneEmpty(
const char* name,
const char* title,
103 TH1* CreateHist(
const char* name,
const char* title,
111 void ResetBase(
Option_t *option=
"");
113 static THnBase* CreateHnAny(
const char* name,
const char* title,
115 Int_t chunkSize = 1024 * 16);
116 static THnBase* CreateHnAny(
const char* name,
const char* title,
118 Int_t chunkSize = 1024 * 16);
132 virtual Long64_t GetNbins()
const = 0;
165 void SetTitle(
const char *title);
172 virtual Long64_t GetBin(
const char* name[])
const = 0;
196 return (
TH1D*) ProjectionAny(1, &xDim,
false, option);
211 const Int_t dim[2] = {xDim, yDim};
212 return (
TH2D*) ProjectionAny(2, dim,
false, option);
225 const Int_t dim[3] = {xDim, yDim, zDim};
226 return (
TH3D*) ProjectionAny(3, dim,
false, option);
231 return (
THnBase*)ProjectionAny(ndim, dim,
kTRUE , option);
239 void Multiply(
const THnBase* h);
246 virtual void Sumw2() = 0;
254 PrintBin(-1, coord, options);
289 fRespectAxisRange(respectAxisRange), fHaveSkippedBin(
kFALSE) {}
307 fIter(hist->CreateIter(respectAxisRange)) {}
315 return fIter->Next(coord);
327 #endif // ROOT_THnBase Double_t GetBinError(const Int_t *idx) const
Bool_t GetCalculateErrors() const
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
void SetEntries(Double_t entries)
void CalculateErrors(Bool_t calc=kTRUE)
Namespace for new ROOT classes and functions.
Long64_t Fill(const Double_t *x, Double_t w=1.)
Double_t GetBinContent(const Int_t *idx) const
void FillBinBase(Double_t w)
THnBaseBinIter(Bool_t respectAxisRange)
Bool_t HaveSkippedBin() const
TH3D * Projection(Int_t xDim, Int_t yDim, Int_t zDim, Option_t *option="") const
void AddBinContent(const Int_t *x, Double_t v=1.)
THnIter(const THnBase *hist, Bool_t respectAxisRange=kFALSE)
Double_t fEntries
browser-helpers for each axis
TBrowser helper for THnBase.
#define ClassDef(name, id)
TList * GetListOfFunctions()
The TNamed class is the base class for all named ROOT classes.
TH1D * Projection(Int_t xDim, Option_t *option="") const
Long64_t Fill(const char *name[], Double_t w=1.)
Int_t GetCoord(Int_t dim) const
virtual void Reserve(Long64_t)
void SetBinContent(const Int_t *idx, Double_t v)
Double_t GetSumw2() const
Using a TBrowser one can browse all ROOT objects.
virtual void SetFilledBins(Long64_t)
void PrintBin(Int_t *coord, Option_t *options) const
TAxis * GetAxis(Int_t dim) const
Class to manage histogram axis.
tomato 3-D histogram with a double per channel (see TH1 documentation)}
Long64_t Next(Int_t *coord=0)
Iterator over THnBase bins (internal implementation).
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Collection abstract base class.
Double_t GetSumwx2(Int_t dim) const
TH2D * Projection(Int_t yDim, Int_t xDim, Option_t *option="") const
void Reset(Detail::TBranchProxy *x)
tomato 1-D histogram with a double per channel (see TH1 documentation)}
Double_t GetEntries() const
Double_t GetSumwx(Int_t dim) const
void UpdateXStat(const Double_t *x, Double_t w=1.)
void SetBinError(const Int_t *idx, Double_t e)
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, const THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
void Print(std::ostream &os, const OptionType &opt)
ROOT::Internal::THnBaseBinIter * fIter
THnBase * ProjectionND(Int_t ndim, const Int_t *dim, Option_t *option="") const
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Double_t GetBinError(Long64_t linidx) const
const TObjArray * GetListOfAxes() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Array of doubles (64 bits per element).
Int_t GetNdimensions() const
Binding & operator=(OUT(*fun)(void))
Mother of all ROOT objects.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Double_t GetWeightSum() const
Bool_t RespectsAxisRange() const
Bool_t HaveSkippedBin() const
Iterator over THnBase bins.
Bool_t RespectsAxisRange() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TObjArray * GetListOfAxes()
Multidimensional histogram base.
Double_t Sqrt(Double_t x)
void SetBinError(Long64_t bin, Double_t e)
tomato 2-D histogram with a double per channel (see TH1 documentation)}