00001
00008 #ifndef __SFH2F_H
00009 #define __SFH2F_H
00010
00011 #include "jbltools/sfh/SFO.h"
00012 #include "jbltools/sfh/RegH2F.h"
00013 #include "jbltools/sfh/FloatFunPoR.h"
00014 #include "jbltools/sfh/BaseCutPoR.h"
00015 #include "jbltools/sfh/FillIteratorPoR.h"
00016
00017 class FloatFun;
00018 class BaseCut;
00019 class FillIterator;
00020 class Binning;
00021
00022
00024
00049 class SFH2F : public RegH2F, public SFO {
00050 public:
00052 SFH2F (const char* name,
00053 const char* title,
00054 Int_t nbinsx,
00055 Axis_t xlow,
00056 Axis_t xup,
00057 Int_t nbinsy,
00058 Axis_t ylow,
00059 Axis_t yup,
00060 const ROListPoR& hhl,
00061 const FloatFunPoR& xfun_,
00062 const FloatFunPoR& yfun_,
00063 const BaseCutPoR& cut_ = 0,
00064 const FloatFunPoR& wfun_ = 0,
00065 const FillIteratorPoR& iter_ = 0
00066 );
00068 SFH2F (const char* name,
00069 const char* title,
00070 Int_t nbinsx,
00071 const Double_t* xbins,
00072 Int_t nbinsy,
00073 Axis_t ylow,
00074 Axis_t yup,
00075 const ROListPoR& hhl,
00076 const FloatFunPoR& xfun_,
00077 const FloatFunPoR& yfun_,
00078 const BaseCutPoR& cut_ = 0,
00079 const FloatFunPoR& wfun_ = 0,
00080 const FillIteratorPoR& iter_ = 0
00081 );
00083 SFH2F (const char* name,
00084 const char* title,
00085 Int_t nbinsx,
00086 Axis_t xlow,
00087 Axis_t xup,
00088 Int_t nbinsy,
00089 const Double_t* ybins,
00090 const ROListPoR& hhl,
00091 const FloatFunPoR& xfun_,
00092 const FloatFunPoR& yfun_,
00093 const BaseCutPoR& cut_ = 0,
00094 const FloatFunPoR& wfun_ = 0,
00095 const FillIteratorPoR& iter_ = 0
00096 );
00098 SFH2F (const char* name,
00099 const char* title,
00100 Int_t nbinsx,
00101 const Double_t* xbins,
00102 Int_t nbinsy,
00103 const Double_t* ybins,
00104 const ROListPoR& hhl,
00105 const FloatFunPoR& xfun_,
00106 const FloatFunPoR& yfun_,
00107 const BaseCutPoR& cut_ = 0,
00108 const FloatFunPoR& wfun_ = 0,
00109 const FillIteratorPoR& iter_ = 0
00110 );
00112 SFH2F (const char* name,
00113 const char* title,
00114 Int_t nbinsx,
00115 const Float_t* xbins,
00116 Int_t nbinsy,
00117 const Float_t* ybins,
00118 const ROListPoR& hhl,
00119 const FloatFunPoR& xfun_,
00120 const FloatFunPoR& yfun_,
00121 const BaseCutPoR& cut_ = 0,
00122 const FloatFunPoR& wfun_ = 0,
00123 const FillIteratorPoR& iter_ = 0
00124 );
00126 SFH2F (const char* name,
00127 const char* title,
00128 const Binning& xbinning,
00129 const Binning& ybinning,
00130 const ROListPoR& hhl,
00131 const FloatFunPoR& xfun_,
00132 const FloatFunPoR& yfun_,
00133 const BaseCutPoR& cut_ = 0,
00134 const FloatFunPoR& wfun_ = 0,
00135 const FillIteratorPoR& iter_ = 0
00136 );
00137 virtual ~SFH2F ();
00139
00147 virtual void Fill ();
00148
00150 FloatFun *getXFun() const {return xfun;}
00152 FloatFun *getYFun() const {return yfun;}
00154 BaseCut *getCut() const {return cut;}
00156 FloatFun *getWFun() const {return wfun;}
00158 FillIterator *getIter() const {return iter;}
00159
00160 private:
00162 SFH2F (const SFH2F& source);
00164 SFH2F& operator= (const SFH2F& source);
00165 protected:
00167 void checkIterators (const char *name
00168 );
00170 template<class Fun1, class Fun2>
00171 void checkTwoIterators(const char *name,
00172 const char *fun1name,
00173 Fun1 *fun1,
00174 const char *fun2name,
00175 Fun2 *fun2);
00176
00177 template<class Fun>
00178 void checkOneIterator (const char *name,
00179 const char *funname,
00180 Fun *fun);
00181
00182
00183 FloatFun *xfun;
00184 FloatFun *yfun;
00185 BaseCut *cut;
00186 FloatFun *wfun;
00187 FillIterator *iter;
00188 };
00189
00190 #endif