Logo ROOT   6.14/05
Reference Guide
RooRealBinding.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooRealBinding.h,v 1.9 2007/05/11 09:11:30 verkerke Exp $
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 #ifndef ROO_REAL_BINDING
17 #define ROO_REAL_BINDING
18 
19 #include "RooAbsFunc.h"
20 #include <list>
21 
22 class RooAbsRealLValue;
23 class RooAbsReal;
24 class RooArgSet;
25 
26 class RooRealBinding : public RooAbsFunc {
27 public:
28  RooRealBinding(const RooAbsReal& func, const RooArgSet &vars, const RooArgSet* nset=0, Bool_t clipInvalid=kFALSE, const TNamed* rangeName=0);
29  RooRealBinding(const RooRealBinding& other, const RooArgSet* nset=0) ;
30  virtual ~RooRealBinding();
31 
32  virtual Double_t operator()(const Double_t xvector[]) const;
33  virtual Double_t getMinLimit(UInt_t dimension) const;
34  virtual Double_t getMaxLimit(UInt_t dimension) const;
35 
36  virtual void saveXVec() const ;
37  virtual void restoreXVec() const ;
38 
39  virtual const char* getName() const ;
40 
41  virtual std::list<Double_t>* binBoundaries(Int_t) const ;
42  virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ;
43 
44 protected:
45 
46  void loadValues(const Double_t xvector[]) const;
47  const RooAbsReal *_func;
49  const RooArgSet *_nset;
50  mutable Bool_t _xvecValid;
52  mutable Double_t* _xsave ;
53  const TNamed* _rangeName ; //!
54 
55  mutable std::list<RooAbsReal*> _compList ; //!
56  mutable std::list<Double_t> _compSave ; //!
57  mutable Double_t _funcSave ; //!
58 
59  ClassDef(RooRealBinding,0) // Function binding to RooAbsReal object
60 };
61 
62 #endif
63 
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Double_t getMinLimit(UInt_t dimension) const
Return lower limit on i-th variable.
Double_t _funcSave
const RooAbsReal * _func
virtual Double_t getMaxLimit(UInt_t dimension) const
Return upper limit on i-th variable.
#define ClassDef(name, id)
Definition: Rtypes.h:320
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
RooRealBinding(const RooAbsReal &func, const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE, const TNamed *rangeName=0)
Construct a lightweight function binding of RooAbsReal func to variables &#39;vars&#39;.
const RooArgSet * _nset
virtual Double_t operator()(const Double_t xvector[]) const
Evaluate the bound RooAbsReal at the variable values provided in xvector.
virtual void saveXVec() const
Save value of all variables.
RooAbsRealLValue ** _vars
const TNamed * _rangeName
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual const char * getName() const
Return name of function.
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
virtual ~RooRealBinding()
Destructor.
virtual std::list< Double_t > * binBoundaries(Int_t) const
void loadValues(const Double_t xvector[]) const
Load the vector of variable values into the RooRealVars associated as variables with the bound RooAbs...
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
std::list< RooAbsReal * > _compList
Double_t * _xsave
std::list< Double_t > _compSave
Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present i...
virtual void restoreXVec() const
Restore value of all variables to previously saved values by saveXVec()
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23