ROOT  6.06/09
Reference Guide
RooMultiGenFunction.cxx
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * @(#)root/roofitcore:$Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 
17 
18 //////////////////////////////////////////////////////////////////////////////
19 //
20 // BEGIN_HTML
21 // Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction
22 // END_HTML
23 //
24 
25 
26 #include "RooFit.h"
27 #include "Riostream.h"
28 
29 #include "RooMultiGenFunction.h"
30 #include "RooRealBinding.h"
31 #include "RooAbsReal.h"
32 #include "RooAbsPdf.h"
33 #include "RooArgSet.h"
34 
35 #include <assert.h>
36 
37 
38 
39 using namespace std;
40 
42 ;
43 
44 
45 ////////////////////////////////////////////////////////////////////////////////
46 
48  _ftor(func)
49 {
50 }
51 
52 
53 
54 ////////////////////////////////////////////////////////////////////////////////
55 
56 RooMultiGenFunction::RooMultiGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters) :
57  _ftor(func,observables,parameters)
58 {
59 }
60 
61 
62 ////////////////////////////////////////////////////////////////////////////////
63 
64 RooMultiGenFunction::RooMultiGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters, const RooArgSet& nset) :
65  _ftor(func,observables,parameters,nset)
66 {
67 }
68 
69 
70 ////////////////////////////////////////////////////////////////////////////////
71 
73  ROOT::Math::IMultiGenFunction(other), _ftor(other._ftor)
74 {
75 }
76 
77 
78 ////////////////////////////////////////////////////////////////////////////////
79 
81 {
82 }
83 
84 
85 ////////////////////////////////////////////////////////////////////////////////
86 
87 double RooMultiGenFunction::DoEval(const double* x) const
88 {
89  return _ftor(x) ;
90 }
91 
92 
93 
double DoEval(const double *) const
Implementation of the evaluation function.
ClassImp(RooMultiGenFunction)
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
STL namespace.
Double_t x[n]
Definition: legend1.C:17
RooMultiGenFunction(const RooAbsFunc &func)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
double func(double *x, double *p)
Definition: stressTF1.cxx:213
IBaseFunctionMultiDim IMultiGenFunction
Definition: IFunctionfwd.h:28
Namespace for new Math classes and functions.