#ifndef ROO_REAL_VAR
#define ROO_REAL_VAR
#include "Riosfwd.h"
#include <math.h>
#include <float.h>
#include "TString.h"
#include "RooAbsRealLValue.h"
#include "RooUniformBinning.h"
#include "RooNumber.h"
#include "RooSharedPropertiesList.h"
#include "RooRealVarSharedProperties.h"
class RooArgSet ;
class RooErrorVar ;
class RooRealVar : public RooAbsRealLValue {
public:
RooRealVar() ;
RooRealVar(const char *name, const char *title,
Double_t value, const char *unit= "") ;
RooRealVar(const char *name, const char *title, Double_t minValue,
Double_t maxValue, const char *unit= "");
RooRealVar(const char *name, const char *title, Double_t value,
Double_t minValue, Double_t maxValue, const char *unit= "") ;
RooRealVar(const RooRealVar& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooRealVar(*this,newname); }
virtual ~RooRealVar();
virtual Double_t getVal(const RooArgSet* nset=0) const ;
virtual void setVal(Double_t value);
inline Double_t getError() const { return _error>=0?_error:0. ; }
inline Bool_t hasError() const { return (_error>=0) ; }
inline void setError(Double_t value) { _error= value ; }
inline void removeError() { _error = -1 ; }
inline Double_t getAsymErrorLo() const { return _asymErrLo<=0?_asymErrLo:0. ; }
inline Double_t getAsymErrorHi() const { return _asymErrHi>=0?_asymErrHi:0. ; }
inline Bool_t hasAsymError() const { return (_asymErrHi>=0 && _asymErrLo<=0) ; }
inline void removeAsymError() { _asymErrLo = 1 ; _asymErrHi = -1 ; }
inline void setAsymError(Double_t lo, Double_t hi) { _asymErrLo = lo ; _asymErrHi = hi ; }
RooErrorVar* errorVar() const ;
void setMin(const char* name, Double_t value) ;
void setMax(const char* name, Double_t value) ;
void setRange(const char* name, Double_t min, Double_t max) ;
void setRange(const char* name, RooAbsReal& min, RooAbsReal& max) ;
inline void setMin(Double_t value) { setMin(0,value) ; }
inline void setMax(Double_t value) { setMax(0,value) ; }
inline void setRange(Double_t min, Double_t max) { setRange(0,min,max) ; }
inline void setRange(RooAbsReal& min, RooAbsReal& max) { setRange(0,min,max) ; }
void setBins(Int_t nBins, const char* name=0) { setBinning(RooUniformBinning(getMin(name),getMax(name),nBins),name) ; }
void setBinning(const RooAbsBinning& binning, const char* name=0) ;
Bool_t hasBinning(const char* name) const ;
const RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const ;
RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) ;
inline void removeMin(const char* name=0) { getBinning(name).setMin(-RooNumber::infinity()) ; }
inline void removeMax(const char* name=0) { getBinning(name).setMax(RooNumber::infinity()) ; }
inline void removeRange(const char* name=0) { getBinning(name).setRange(-RooNumber::infinity(),RooNumber::infinity()) ; }
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
virtual void writeToStream(ostream& os, Bool_t compact) const ;
inline virtual Bool_t isFundamental() const { return kTRUE; }
virtual void printValue(ostream& os) const ;
virtual void printExtras(ostream& os) const ;
virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
virtual Int_t defaultPrintContents(Option_t* opt) const ;
TString* format(const RooCmdArg& formatArg) const ;
TString* format(Int_t sigDigits, const char *options) const ;
static void printScientific(Bool_t flag=kFALSE) ;
static void printSigDigits(Int_t ndig=5) ;
using RooAbsRealLValue::operator= ;
void deleteSharedProperties() ;
protected:
static Bool_t _printScientific ;
static Int_t _printSigDigits ;
virtual void setVal(Double_t value, const char* rangeName) ;
virtual Double_t evaluate() const { return _value ; }
virtual void copyCache(const RooAbsArg* source) ;
virtual void attachToTree(TTree& t, Int_t bufSize=32000) ;
virtual void fillTreeBranch(TTree& t) ;
Double_t chopAt(Double_t what, Int_t where) const ;
Double_t _error;
Double_t _asymErrLo ;
Double_t _asymErrHi ;
RooAbsBinning* _binning ;
RooLinkedList _altNonSharedBinning ;
inline RooRealVarSharedProperties* sharedProp() const {
if (!_sharedProp) {
_sharedProp = (RooRealVarSharedProperties*) _sharedPropList.registerProperties(new RooRealVarSharedProperties()) ;
}
return _sharedProp ;
}
static RooSharedPropertiesList _sharedPropList;
static RooRealVarSharedProperties _nullProp ;
mutable RooRealVarSharedProperties* _sharedProp ;
ClassDef(RooRealVar,4)
};
#endif
Last change: Wed Jun 25 08:34:04 2008
Last generated: 2008-06-25 08:34
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.