00001
00002
00003
00004
00005
00006
00007 #ifndef ROOTFNBINDING
00008 #define ROOTFNBINDING
00009
00010 #include "RooAbsReal.h"
00011 #include "RooListProxy.h"
00012 #include "RooAbsReal.h"
00013 class TF1 ;
00014 class TF2 ;
00015 class TF3 ;
00016
00017 class RooTFnBinding : public RooAbsReal {
00018 public:
00019 RooTFnBinding() {} ;
00020 RooTFnBinding(const char *name, const char *title, TF1* _func, const RooArgList& _list);
00021 RooTFnBinding(const char *name, const char *title, TF1* _func, const RooArgList& _list, const RooArgList& _plist);
00022 RooTFnBinding(const RooTFnBinding& other, const char* name=0) ;
00023 virtual TObject* clone(const char* newname) const { return new RooTFnBinding(*this,newname); }
00024 inline virtual ~RooTFnBinding() { }
00025
00026 void printArgs(ostream& os) const ;
00027
00028 protected:
00029
00030 RooListProxy olist ;
00031 RooListProxy plist ;
00032 TF1* func ;
00033
00034 Double_t evaluate() const ;
00035
00036 private:
00037
00038 ClassDef(RooTFnBinding,1)
00039 };
00040
00041
00042 namespace RooFit {
00043
00044 RooAbsReal* bindFunction(TF1* func,RooAbsReal& x) ;
00045 RooAbsReal* bindFunction(TF2* func,RooAbsReal& x, RooAbsReal& y) ;
00046 RooAbsReal* bindFunction(TF3* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) ;
00047
00048 RooAbsReal* bindFunction(TF1* func,RooAbsReal& x, const RooArgList& params) ;
00049 RooAbsReal* bindFunction(TF2* func,RooAbsReal& x, RooAbsReal& y, const RooArgList& params) ;
00050 RooAbsReal* bindFunction(TF3* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, const RooArgList& params) ;
00051
00052 }
00053
00054
00055 #endif