35 : fName(name), fN(0), fW(0.), fW2(0.), fM(0.), fM2(0.)
38 for (
Int_t i = 0; i <
n; i++) {
63 Warning(
"Fill",
"Sum of weights is zero - ignore current data point");
69 fM2 += w * rr * rr / (tW *
fW);
79 Printf(
" OBJ: TStatistic\t %s = %.5g +- %.4g \t RMS = %.5g \t N = %lld",
93 if (
fW == 0 || c->
fW == 0 || ((
fW + c->
fW) == 0) ) {
94 Error(
"Merge",
"Zero sum of weights - cannot merge data from %s",c->
GetName() );
97 double temp = (c->
fW)/(
fW) *
fM - c->
fM;
void Print(Option_t *="") const
This method must be overridden when a class wants to print itself.
const char * GetName() const
Returns name of object.
templateClassImp(TStatistic) TStatistic
Constructor from a vector of values.
const char * Data() const
Statistical variable, defined by its mean and variance (RMS).
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Collection abstract base class.
void Fill(Double_t val, Double_t w=1.)
Mother of all ROOT objects.
Int_t Merge(TCollection *in)
Double_t GetMeanErr() const
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.