00001 #ifndef Solaris
00002
00003 #ifndef FRANKS2HISTO__HH
00004 #define FRANKS2HISTO__HH
00005
00006 #ifndef __CINT__
00007 #include <Stiostream.h>
00008 #include <math.h>
00009 #ifdef GNU_GCC
00010 # include <stddef.h>
00011 #endif
00012 #endif
00013
00014
00015
00016
00017
00018 #ifdef ST_NO_TEMPLATE_DEF_ARGS
00019 template<class T>
00020 #else
00021 template<class T = double>
00022 #endif
00023
00024 class franks2Histo {
00025 private:
00026
00027 char* mC1;
00028 char* mC2;
00029
00030 int mXbins;
00031 T mXmin;
00032 T mXmax;
00033 T mXstep;
00034 int mXpos;
00035
00036 int mYbins;
00037 T mYmin;
00038 T mYmax;
00039 T mYstep;
00040 T *vec;
00041 int mYpos;
00042
00043 int mBins;
00044
00045 int mPos;
00046 int mEntries;
00047
00048 public:
00049
00050 franks2Histo(const char* c1, const char* c2,
00051 int bins1, T xmin1, T xmax1,
00052 int bins2, T xmin2, T xmax2);
00053 ~franks2Histo();
00054
00055
00056 #ifndef ST_NO_MEMBER_TEMPLATES
00057 template<class X, class Y, class Z> void Add( franks2Histo<X>* , franks2Histo<X>* , Y w1=1., Z w2=1., const char* c="");
00058 template<class X, class Y, class Z> void Divide( franks2Histo<X>* , franks2Histo<X>* , Y w1=1., Z w2=1., const char* c="");
00059 template<class X, class Y, class Z> void Fill( X value1, Y value2, Z weight=1);
00060 template<class X> int GetBin(X value);
00061 template<class X> void Scale(X scale);
00062 #endif
00063
00064 void Draw(const char* c="");
00065 T GetBinContent(int bin) { return vec[bin]; }
00066 T GetBinCenter(int bin);
00067 int GetNbinsX() { return mBins; }
00068 T GetMean();
00069 T GetMaximum();
00070 T GetMinimum();
00071 T GetRMS();
00072 void Reset(const char* c="");
00073 void SetDirectory(int dummy) { };
00074 void Sumw2() {};
00075 T Integral();
00076 T GetEntries() { return mEntries; }
00077 };
00078 #endif // FRANKS2DHISTO_HH
00079
00080 #endif // Solaris