00001 #ifndef ROOT_TH1Helper
00002 #define ROOT_TH1Helper
00003
00004
00006
00007
00008
00009
00011 #include "TH1.h"
00012
00013 class TH1Helper: public TObject
00014 {
00015 public:
00016 TH1Helper(const TH1 *h=0, int binMin=0, int binMax=0);
00017 TH1Helper(const TH1 *h, double xMin, double xMax);
00018 ~TH1Helper();
00019
00020 void Set(const TH1 *h, int binMin, int binMax);
00021 void Set(const TH1 *h, double xMin, double xMax);
00022 double GetMean() ;
00023 double GetMeanErr() ;
00024 double GetRMS () ;
00025 double GetRMSErr () ;
00026 int GetNonZeros() const;
00027 double GetIntegral() ;
00028 double GetIntegErr() ;
00029
00030
00031 private:
00032 void Build();
00033 void Aver ();
00034
00035
00036 const TH1* fH1;
00037 int fBMin;
00038 int fBMax;
00039 double fXMin;
00040 double fXMax;
00041 int fNonZeros;
00042 double fMom[5];
00043 ClassDef(TH1Helper,0)
00044
00045 };
00046 #endif //ROOT_TH1Helper