12 #ifndef ROOT_TStatistic 13 #define ROOT_TStatistic 27 #include "TCollection.h" 47 TStatistic(
const char *name =
"") : fName(name), fN(0), fW(0.), fW2(0.), fM(0.), fM2(0.) { }
48 TStatistic(
const char *name, Int_t n,
const Double_t *val,
const Double_t *w = 0);
53 ULong_t
Hash()
const {
return fName.Hash(); }
55 inline Long64_t
GetN()
const {
return fN; }
58 inline Double_t
GetMean()
const {
return (fW > 0) ? fM/
fW : 0; }
61 inline Double_t
GetVar()
const {
return (fW>0) ? ( (fN>1) ? (fM2 / fW)*(fN / (fN-1.)) : 0 ) : -1; }
62 inline Double_t
GetW()
const {
return fW; }
66 Int_t
Merge(TCollection *in);
69 void Fill(Double_t val, Double_t w = 1.);
72 void Print(Option_t * =
"")
const;
73 void ls(Option_t *opt =
"")
const {
Print(opt); }
const char * GetName() const
Double_t GetMeanErr() const
void Print(Option_t *="") const
TStatistic(const char *name="")
Statistical variable, defined by its mean and variance (RMS).
~TStatistic()
TStatistic destructor.
void ls(Option_t *opt="") const
void Fill(Double_t val, Double_t w=1.)
Int_t Merge(TCollection *in)
Double_t Sqrt(Double_t x)