Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooCFunction3Binding.cxx
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id$
5  * Authors: *
6  * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl *
7  * *
8  * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California *
9  * and Stanford University. All rights reserved. *
10  * *
11  *****************************************************************************/
12 
13 /** \class RooCFunction3Binding
14  \ingroup Roofit
15 
16 RooCFunction3Binding is a templated implementation of class RooAbsReal that binds
17 generic C(++) functions to a RooAbsReal argument thus allowing generic C++
18 functions to be used as RooFit functions. Instances of function binding
19 classes are fully functional RooFit function objects with one exception:
20 if the bound function is _not_ a standard TMath or MathMore function the
21 class cannot be persisted in a RooWorkspace without registering the function
22 pointer first using RooCFunction3Binding<T1,T2,T3,T4>::register().
23 **/
24 
25 #include "Riostream.h"
26 #include "RooCFunction3Binding.h"
27 
28 using namespace std ;
29 
30 #ifndef ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
31 #define ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
32 templateClassImp(RooCFunction3Binding);
33 templateClassImp(RooCFunction3Ref);
34 #endif
35 
36 
37 namespace RooFit {
38 
39  RooAbsReal* bindFunction(const char* name,CFUNCD3DDD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
40  return new RooCFunction3Binding<Double_t,Double_t,Double_t,Double_t>(name,name,func,x,y,z) ;
41  }
42 
43  RooAbsReal* bindFunction(const char* name,CFUNCD3DDB func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
44  return new RooCFunction3Binding<Double_t,Double_t,Double_t,Bool_t>(name,name,func,x,y,z) ;
45  }
46 
47  RooAbsReal* bindFunction(const char* name,CFUNCD3DII func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
48  return new RooCFunction3Binding<Double_t,Double_t,Int_t,Int_t>(name,name,func,x,y,z) ;
49  }
50 
51  RooAbsReal* bindFunction(const char* name,CFUNCD3UDU func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
52  return new RooCFunction3Binding<Double_t,UInt_t,Double_t,UInt_t>(name,name,func,x,y,z) ;
53  }
54 
55  RooAbsReal* bindFunction(const char* name,CFUNCD3UDD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
56  return new RooCFunction3Binding<Double_t,UInt_t,Double_t,Double_t>(name,name,func,x,y,z) ;
57  }
58 
59  RooAbsReal* bindFunction(const char* name,CFUNCD3UUD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
60  return new RooCFunction3Binding<Double_t,UInt_t,UInt_t,Double_t>(name,name,func,x,y,z) ;
61  }
62 
63  RooAbsPdf* bindPdf(const char* name,CFUNCD3DDD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
64  return new RooCFunction3PdfBinding<Double_t,Double_t,Double_t,Double_t>(name,name,func,x,y,z) ;
65  }
66 
67  RooAbsPdf* bindPdf(const char* name,CFUNCD3DDB func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
68  return new RooCFunction3PdfBinding<Double_t,Double_t,Double_t,Bool_t>(name,name,func,x,y,z) ;
69  }
70 
71  RooAbsPdf* bindPdf(const char* name,CFUNCD3DII func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
72  return new RooCFunction3PdfBinding<Double_t,Double_t,Int_t,Int_t>(name,name,func,x,y,z) ;
73  }
74 
75  RooAbsPdf* bindPdf(const char* name,CFUNCD3UDU func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
76  return new RooCFunction3PdfBinding<Double_t,UInt_t,Double_t,UInt_t>(name,name,func,x,y,z) ;
77  }
78 
79  RooAbsPdf* bindPdf(const char* name,CFUNCD3UDD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
80  return new RooCFunction3PdfBinding<Double_t,UInt_t,Double_t,Double_t>(name,name,func,x,y,z) ;
81  }
82 
83  RooAbsPdf* bindPdf(const char* name,CFUNCD3UUD func,RooAbsReal& x, RooAbsReal& y, RooAbsReal& z) {
84  return new RooCFunction3PdfBinding<Double_t,UInt_t,UInt_t,Double_t>(name,name,func,x,y,z) ;
85  }
86 
87 }