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
23Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction
24**/
25
26
27#include "Riostream.h"
28
29#include "RooGenFunction.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
39using namespace std;
40
42;
43
44////////////////////////////////////////////////////////////////////////////////
45
46RooGenFunction::RooGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters) :
47 _ftor(func,observables,parameters,observables)
48{
49}
50
51
52////////////////////////////////////////////////////////////////////////////////
53
54RooGenFunction::RooGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters, const RooArgSet& nset) :
55 _ftor(func,observables,parameters,nset)
56{
57}
58
59
60////////////////////////////////////////////////////////////////////////////////
61
63 ROOT::Math::IGenFunction(other), _ftor(other._ftor)
64{
65}
66
67
68////////////////////////////////////////////////////////////////////////////////
69
71{
72}
73
74
75////////////////////////////////////////////////////////////////////////////////
76
77double RooGenFunction::DoEval(double x) const
78{
79 return _ftor(x) ;
80}
81
82
#define ClassImp(name)
Definition: Rtypes.h:375
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:56
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction.
~RooGenFunction() override
double DoEval(double) const override
implementation of the evaluation function. Must be implemented by derived classes
RooGenFunction(const RooAbsReal &func, const RooArgList &observables, const RooArgList &parameters)
RooFunctor _ftor
Double_t x[n]
Definition: legend1.C:17
Namespace for new Math classes and functions.
IBaseFunctionOneDim IGenFunction
Definition: IFunctionfwd.h:37
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.