Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
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
16RooCFunction1Binding is a templated implementation of class RooAbsReal that binds
17generic C(++) functions to a RooAbsReal argument thus allowing generic C++
18functions to be used as RooFit functions. Instances of function binding
19classes are fully functional RooFit function objects with one exception:
20if the bound function is _not_ a standard TMath or MathMore function the
21class cannot be persisted in a RooWorkspace without registering the function
22pointer first using RooCFunction1Binding<T1,T2>::register().
23**/
24
25#include "Riostream.h"
27
28
29template<>
31 {
32 // Return reference to function pointer-to-name mapping service
33 if (!_fmap) {
35 }
36 return *_fmap ;
37 }
38
39template<>
41 {
42 // Return reference to function pointer-to-name mapping service
43 if (!_fmap) {
45 }
46 return *_fmap ;
47 }
48
49namespace RooFit {
50
51 RooAbsReal* bindFunction(const char* name,CFUNCD1D func,RooAbsReal& x) {
53 }
54
55 RooAbsReal* bindFunction(const char* name,CFUNCD1I func,RooAbsReal& x) {
57 }
58
59 RooAbsPdf* bindPdf(const char* name,CFUNCD1D func,RooAbsReal& x) {
61 }
62
63 RooAbsPdf* bindPdf(const char* name,CFUNCD1I func,RooAbsReal& x) {
65 }
66
67}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char name[80]
Definition TGX11.cxx:110
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
static RooCFunction1Map< VO, VI > & fmap()
Double_t x[n]
Definition legend1.C:17
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition CodegenImpl.h:64
RooAbsPdf * bindPdf(const char *name, CFUNCD1D func, RooAbsReal &x)
RooAbsReal * bindFunction(const char *name, CFUNCD1D func, RooAbsReal &x)