00001
00010 #ifndef __SFSETOFHISTOGRAMS_H
00011 #define __SFSETOFHISTOGRAMS_H
00012
00013 #include "jbltools/sfh/SetOfHistograms.h"
00014 #include "jbltools/sfh/SFO.h"
00015 #include "jbltools/sfh/FloatFunPoR.h"
00016 #include "jbltools/sfh/BaseCutPoR.h"
00017 #include "jbltools/sfh/FillIteratorPoR.h"
00018
00019 class ROList;
00020
00021
00022
00024
00061 class SFSetOfHistograms: public SetOfHistograms, public SFO {
00062 public:
00064 SFSetOfHistograms (const char* name_,
00065 const char* title_,
00066 const ROListPoR& hhl,
00067 const FloatFunPoR& xfun_,
00068 const BaseCutPoR& cut_,
00069 const FloatFunPoR& wfun_,
00070 const BinningFunPoR& binning_,
00071 const FillIteratorPoR& iter_ = 0
00072 );
00073
00075 SFSetOfHistograms (const char* name_,
00076 const char* title_,
00077 Int_t nbinsx,
00078 Axis_t xlow,
00079 Axis_t xup,
00080 const ROListPoR& hhl,
00081 const FloatFunPoR& xfun_,
00082 const BaseCutPoR& cut_,
00083 const FloatFunPoR& wfun_,
00084 const BinningFunPoR& binning_,
00085 const FillIteratorPoR& iter_ = 0
00086 );
00088 SFSetOfHistograms (const char* name_,
00089 const char* title_,
00090 Int_t nbinsx,
00091 const Double_t* xbins,
00092 const ROListPoR& hhl,
00093 const FloatFunPoR& xfun_,
00094 const BaseCutPoR& cut_,
00095 const FloatFunPoR& wfun_,
00096 const BinningFunPoR& binning_,
00097 const FillIteratorPoR& iter_ = 0
00098 );
00100 SFSetOfHistograms (const char* name_,
00101 const char* title_,
00102 Int_t nbinsx,
00103 const Float_t* xbins,
00104 const ROListPoR& hhl,
00105 const FloatFunPoR& xfun_,
00106 const BaseCutPoR& cut_,
00107 const FloatFunPoR& wfun_,
00108 const BinningFunPoR& binning_,
00109 const FillIteratorPoR& iter_ = 0
00110 );
00112 SFSetOfHistograms (const char* name_,
00113 const char* title_,
00114 const Binning& axisbinning,
00115 const ROListPoR& hhl,
00116 const FloatFunPoR& xfun_,
00117 const BaseCutPoR& cut_,
00118 const FloatFunPoR& wfun_,
00119 const BinningFunPoR& binning_,
00120 const FillIteratorPoR& iter_ = 0
00121 );
00122
00124 virtual ~SFSetOfHistograms ();
00125
00127
00135 virtual void Fill ();
00136
00138 FloatFun *getXFun() const {return xfun;}
00140 BaseCut *getCut() const {return cut;}
00142 FloatFun *getWFun() const {return wfun;}
00144 FillIterator *getIter() const {return iter;}
00145
00146 protected:
00148 void checkIterators(const char *name
00149 );
00151 template<class Fun1, class Fun2>
00152 void checkTwoIterators(const char *name,
00153 const char *fun1name,
00154 Fun1 *fun1,
00155 const char *fun2name,
00156 Fun2 *fun2
00157 );
00159 template<class Fun>
00160 void checkOneIterator (const char *name,
00161 const char *funname,
00162 Fun *fun
00163 );
00164
00165
00166 FloatFun *xfun;
00167 BaseCut *cut;
00168 FloatFun *wfun;
00169 FillIterator *iter;
00170
00171
00172 private:
00174 SFSetOfHistograms (const SFSetOfHistograms& source);
00176 SFSetOfHistograms& operator= (const SFSetOfHistograms& source);
00177 };
00178
00179 #endif