#ifndef ROO_REAL_PROXY
#define ROO_REAL_PROXY
#include "RooAbsReal.h"
#include "RooArgProxy.h"
#include "RooAbsRealLValue.h"
class RooRealProxy : public RooArgProxy {
public:
RooRealProxy() {} ;
RooRealProxy(const char* name, const char* desc, RooAbsArg* owner,
Bool_t valueServer=kTRUE, Bool_t shapeServer=kFALSE, Bool_t proxyOwnsArg=kFALSE) ;
RooRealProxy(const char* name, const char* desc, RooAbsArg* owner, RooAbsReal& ref,
Bool_t valueServer=kTRUE, Bool_t shapeServer=kFALSE, Bool_t proxyOwnsArg=kFALSE) ;
RooRealProxy(const char* name, RooAbsArg* owner, const RooRealProxy& other) ;
virtual TObject* Clone(const char* newName=0) const { return new RooRealProxy(newName,_owner,*this); }
virtual ~RooRealProxy();
inline operator Double_t() const { return _isFund?((RooAbsReal*)_arg)->_value:((RooAbsReal*)_arg)->getVal(_nset) ; }
inline const RooAbsReal& arg() const { return (RooAbsReal&)*_arg ; }
virtual Bool_t setArg(RooAbsReal& newRef) ;
protected:
RooAbsRealLValue* lvptr() const ;
public:
RooRealProxy& operator=(const Double_t& value) { lvptr()->setVal(value) ; return *this ; }
Double_t min(const char* rname=0) const { return lvptr()->getMin(rname) ; }
Double_t max(const char* rname=0) const { return lvptr()->getMax(rname) ; }
ClassDef(RooRealProxy,1)
};
#endif