00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "Riostream.h"
00027 #include "RooCFunction4Binding.h"
00028 #include "RooCintUtils.h"
00029
00030 using namespace std ;
00031
00032 #ifndef ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
00033 #define ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
00034 templateClassImp(RooCFunction4Binding)
00035 templateClassImp(RooCFunction4Ref)
00036 #endif
00037
00038
00039 template<> RooCFunction4Map<double,double,double,double,double>* RooCFunction4Ref<double,double,double,double,double>::_fmap = 0 ;
00040 template<> RooCFunction4Map<double,double,double,double,int>* RooCFunction4Ref<double,double,double,double,int>::_fmap = 0 ;
00041 template<> RooCFunction4Map<double,double,double,double,bool>* RooCFunction4Ref<double,double,double,double,bool>::_fmap = 0 ;
00042
00043
00044 namespace RooFit {
00045
00046 RooAbsReal* bindFunction(const char* name,void* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00047
00048
00049 if (RooCintUtils::matchFuncPtrArgs(func,"double,double,double,double")) return new RooCFunction4Binding<Double_t,Double_t,Double_t,Double_t,Double_t>(name,name,(CFUNCD4DDDD)func,x,y,z,w) ;
00050 if (RooCintUtils::matchFuncPtrArgs(func,"double,double,double,int")) return new RooCFunction4Binding<Double_t,Double_t,Double_t,Double_t,Int_t>(name,name,(CFUNCD4DDDI)func,x,y,z,w) ;
00051 if (RooCintUtils::matchFuncPtrArgs(func,"double,double,double,bool")) return new RooCFunction4Binding<Double_t,Double_t,Double_t,Double_t,Bool_t>(name,name,(CFUNCD4DDDB)func,x,y,z,w) ;
00052 oocoutE((TObject*)0,InputArguments) << "bindFunction::ERROR No matching RooCFunction4Binding<> class found for function " << RooCintUtils::functionName(func) << endl ;
00053 return 0 ;
00054 }
00055
00056
00057 RooAbsReal* bindFunction(const char* name,CFUNCD4DDDD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00058 return new RooCFunction4Binding<Double_t,Double_t,Double_t,Double_t,Double_t>(name,name,func,x,y,z,w) ;
00059 }
00060
00061 RooAbsReal* bindFunction(const char* name,CFUNCD4DDDI func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00062 return new RooCFunction4Binding<Double_t,Double_t,Double_t,Double_t,Int_t>(name,name,func,x,y,z,w) ;
00063 }
00064
00065 RooAbsReal* bindFunction(const char* name,CFUNCD4DDDB func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00066 return new RooCFunction4Binding<Double_t,Double_t,Double_t,Double_t,Bool_t>(name,name,func,x,y,z,w) ;
00067 }
00068
00069
00070 RooAbsPdf* bindPdf(const char* name,void* func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00071
00072
00073 if (RooCintUtils::matchFuncPtrArgs(func,"double,double,double,double")) return new RooCFunction4PdfBinding<Double_t,Double_t,Double_t,Double_t,Double_t>(name,name,(CFUNCD4DDDD)func,x,y,z,w) ;
00074 if (RooCintUtils::matchFuncPtrArgs(func,"double,double,double,int")) return new RooCFunction4PdfBinding<Double_t,Double_t,Double_t,Double_t,Int_t>(name,name,(CFUNCD4DDDI)func,x,y,z,w) ;
00075 if (RooCintUtils::matchFuncPtrArgs(func,"double,double,double,bool")) return new RooCFunction4PdfBinding<Double_t,Double_t,Double_t,Double_t,Bool_t>(name,name,(CFUNCD4DDDB)func,x,y,z,w) ;
00076 oocoutE((TObject*)0,InputArguments) << "bindPdf::ERROR No matching RooCFunction4PdfBinding<> class found for function " << RooCintUtils::functionName(func) << endl ;
00077 return 0 ;
00078 }
00079
00080
00081 RooAbsPdf* bindPdf(const char* name,CFUNCD4DDDD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00082 return new RooCFunction4PdfBinding<Double_t,Double_t,Double_t,Double_t,Double_t>(name,name,func,x,y,z,w) ;
00083 }
00084
00085 RooAbsPdf* bindPdf(const char* name,CFUNCD4DDDI func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00086 return new RooCFunction4PdfBinding<Double_t,Double_t,Double_t,Double_t,Int_t>(name,name,func,x,y,z,w) ;
00087 }
00088
00089 RooAbsPdf* bindPdf(const char* name,CFUNCD4DDDB func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z, RooAbsReal& w) {
00090 return new RooCFunction4PdfBinding<Double_t,Double_t,Double_t,Double_t,Bool_t>(name,name,func,x,y,z,w) ;
00091 }
00092
00093 }