Logo ROOT  
Reference Guide
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 /** \class RooCFunction1Binding
14  \ingroup Roofit
15 
16 RooCFunction1Binding 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 RooCFunction1Binding<T1,T2>::register().
23 **/
24 
25 #include "Riostream.h"
26 #include "RooCFunction1Binding.h"
27 
28 using namespace std ;
29 
30 #ifndef ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
31 #define ROOFIT_R__NO_CLASS_TEMPLATE_SPECIALIZATION
34 #endif
35 
36 
37 template<>
39  {
40  // Return reference to function pointer-to-name mapping service
41  if (!_fmap) {
43  }
44  return *_fmap ;
45  }
46 
47 template<>
49  {
50  // Return reference to function pointer-to-name mapping service
51  if (!_fmap) {
52  _fmap = new RooCFunction1Map<double,int> ;
53  }
54  return *_fmap ;
55  }
56 
57 namespace RooFit {
58 
61  }
62 
65  }
66 
67  RooAbsPdf* bindPdf(const char* name,CFUNCD1D func,RooAbsReal& x) {
69  }
70 
71  RooAbsPdf* bindPdf(const char* name,CFUNCD1I func,RooAbsReal& x) {
73  }
74 
75 }
RooCFunction1PdfBinding
Definition: RooCFunction1Binding.h:284
RooCFunction1Binding
RooCFunction1Binding is a templated implementation of class RooAbsReal that binds generic C(++) funct...
Definition: RooCFunction1Binding.h:220
RooCFunction1Binding.h
x
Double_t x[n]
Definition: legend1.C:17
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooFit::bindFunction
RooAbsReal * bindFunction(const char *name, CFUNCD1D func, RooAbsReal &x)
Definition: RooCFunction1Binding.cxx:59
RooFit::CFUNCD1D
Double_t(* CFUNCD1D)(Double_t)
Definition: RooCFunction1Binding.h:31
RooFit
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition: RooCFunction1Binding.h:29
RooFit::CFUNCD1I
Double_t(* CFUNCD1I)(Int_t)
Definition: RooCFunction1Binding.h:32
RooCFunction1Ref::fmap
static RooCFunction1Map< VO, VI > & fmap()
templateClassImp
#define templateClassImp(name)
Definition: Rtypes.h:408
RooCFunction1Ref
Definition: RooCFunction1Binding.h:91
RooCFunction1Map
Definition: RooCFunction1Binding.h:43
name
char name[80]
Definition: TGX11.cxx:110
RooAbsPdf
Definition: RooAbsPdf.h:43
RooFit::bindPdf
RooAbsPdf * bindPdf(const char *name, CFUNCD1D func, RooAbsReal &x)
Definition: RooCFunction1Binding.cxx:67
Riostream.h