ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RooCFunction1Binding.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 /**
14 \file RooCFunction1Binding.cxx
15 \class RooCFunction1Binding
16 \ingroup Roofit
17 
18 RooCFunction1Binding is a templated implementation of class RooAbsReal that binds
19 generic C(++) functions to a RooAbsReal argument thus allowing generic C++
20 functions to be used as RooFit functions. Instances of function binding
21 classes are fully functional RooFit function objects with one exception:
22 if the bound function is _not_ a standard TMath or MathMore function the
23 class cannot be persisted in a RooWorkspace without registering the function
24 pointer first using RooCFunction1Binding<T1,T2>::register().
25 **/
26 
27 #include "Riostream.h"
28 #include "RooCFunction1Binding.h"
29 #include "RooCintUtils.h"
30 
31 using namespace std ;
32 
33 #ifndef ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
34 #define ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
37 #endif
38 
39 
42 
43 template<>
45  {
46  // Return reference to function pointer-to-name mapping service
47  if (!_fmap) {
49  }
50  return *_fmap ;
51  }
52 
53 template<>
55  {
56  // Return reference to function pointer-to-name mapping service
57  if (!_fmap) {
58  _fmap = new RooCFunction1Map<double,int> ;
59  }
60  return *_fmap ;
61  }
62 
63 namespace RooFit {
64 
67  }
68 
71  }
72 
75  }
76 
79  }
80 
81 }
82 
83 
84 
RooAbsPdf * bindPdf(const char *name, CFUNCD1D func, RooAbsReal &x)
static RooCFunction1Map< VO, VI > & fmap()
Double_t(* CFUNCD1D)(Double_t)
RooAbsReal * bindFunction(const char *name, CFUNCD1D func, RooAbsReal &x)
templateClassImp(RooCFunction1Binding) templateClassImp(RooCFunction1Ref) template<> RooCFunction1Map< double
Double_t x[n]
Definition: legend1.C:17
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooCFunction1Binding is a templated implementation of class RooAbsReal that binds generic C(++) funct...
double func(double *x, double *p)
Definition: stressTF1.cxx:213
#define name(a, b)
Definition: linkTestLib0.cpp:5
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
Double_t(* CFUNCD1I)(Int_t)