Logo ROOT  
Reference Guide
RooGenFunction.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 \file RooGenFunction.cxx
20 \class RooGenFunction
21 \ingroup Roofitcore
22 
23 Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction
24 **/
25 
26 
27 #include "RooFit.h"
28 #include "Riostream.h"
29 
30 #include "RooGenFunction.h"
31 #include "RooRealBinding.h"
32 #include "RooAbsReal.h"
33 #include "RooAbsPdf.h"
34 #include "RooArgSet.h"
35 
36 #include <assert.h>
37 
38 
39 
40 using namespace std;
41 
43 ;
44 
45 ////////////////////////////////////////////////////////////////////////////////
46 
47 RooGenFunction::RooGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters) :
48  _ftor(func,observables,parameters,observables)
49 {
50 }
51 
52 
53 ////////////////////////////////////////////////////////////////////////////////
54 
55 RooGenFunction::RooGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters, const RooArgSet& nset) :
56  _ftor(func,observables,parameters,nset)
57 {
58 }
59 
60 
61 ////////////////////////////////////////////////////////////////////////////////
62 
64  ROOT::Math::IGenFunction(other), _ftor(other._ftor)
65 {
66 }
67 
68 
69 ////////////////////////////////////////////////////////////////////////////////
70 
72 {
73 }
74 
75 
76 ////////////////////////////////////////////////////////////////////////////////
77 
78 double RooGenFunction::DoEval(double x) const
79 {
80  return _ftor(x) ;
81 }
82 
83 
RooGenFunction::~RooGenFunction
virtual ~RooGenFunction()
Definition: RooGenFunction.cxx:71
RooAbsReal.h
RooGenFunction
Definition: RooGenFunction.h:22
RooFit.h
RooArgSet.h
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
RooGenFunction.h
RooArgList
Definition: RooArgList.h:21
x
Double_t x[n]
Definition: legend1.C:17
RooAbsReal
Definition: RooAbsReal.h:61
RooGenFunction::_ftor
RooFunctor _ftor
Definition: RooGenFunction.h:55
RooGenFunction::DoEval
double DoEval(double) const
implementation of the evaluation function. Must be implemented by derived classes
Definition: RooGenFunction.cxx:78
RooAbsPdf.h
RooGenFunction::RooGenFunction
RooGenFunction(const RooAbsReal &func, const RooArgList &observables, const RooArgList &parameters)
Definition: RooGenFunction.cxx:47
ROOT::Math::IGenFunction
IBaseFunctionOneDim IGenFunction
Definition: IFunctionfwd.h:47
RooRealBinding.h
Riostream.h
ROOT
VSD Structures.
Definition: StringConv.hxx:21
Math
RooArgSet
Definition: RooArgSet.h:28