27#include <unordered_map>
44 Double_t value,
const char *unit=
"") ;
46 Double_t maxValue,
const char *unit=
"");
117 virtual void printValue(std::ostream& os)
const ;
129 using RooAbsRealLValue::operator= ;
160 std::shared_ptr<RooRealVarSharedProperties>
sharedProp()
const;
165 static std::map<std::string,std::weak_ptr<RooRealVarSharedProperties>>*
sharedPropList();
#define ClassDef(name, id)
static void indent(ostringstream &buf, int indent_level)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
RefCountList_t _serverList
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
RooErrorVar is an auxilary class that represents the error of a RooRealVar as a seperate object.
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
Class RooRealVarSharedProperties is an implementation of RooSharedProperties that stores the properti...
RooRealVar represents a variable that can be changed from the outside.
void setMin(Double_t value)
Double_t getAsymErrorLo() const
static std::map< std::string, std::weak_ptr< RooRealVarSharedProperties > > * sharedPropList()
Return a reference to a map of weak pointers to RooRealVarSharedProperties.
static void printSigDigits(Int_t ndig=5)
Set number of digits to show when printing RooRealVars.
RooSpan< const double > getValues(RooBatchCompute::RunContext &inputData, const RooArgSet *=nullptr) const final
Retrieve data column of this variable.
void setRange(Double_t min, Double_t max)
Set the limits of the default range.
Bool_t hasBinning(const char *name) const
Returns true if variable has a binning named 'name'.
std::unordered_map< std::string, std::unique_ptr< RooAbsBinning > > _altNonSharedBinning
static RooRealVarSharedProperties & _nullProp()
Return a dummy object to use when properties are not initialised.
Double_t getErrorHi() const
Bool_t hasAsymError(Bool_t allowZero=kTRUE) const
std::shared_ptr< RooRealVarSharedProperties > sharedProp() const
Non-shareable alternative binnings.
virtual void printValue(std::ostream &os) const
Print value of variable.
static void printScientific(Bool_t flag=kFALSE)
If true, contents of RooRealVars will be printed in scientific notation.
virtual void setValFast(Double_t value)
virtual Int_t defaultPrintContents(Option_t *opt) const
Mapping of Print() option string to RooPrintable contents specifications.
Double_t getErrorLo() const
void setMin(const char *name, Double_t value)
Set minimum of name range to given value.
void setBins(Int_t nBins, const char *name=0)
Create a uniform binning under name 'name' for this variable.
std::unique_ptr< RooAbsBinning > _binning
void installSharedProp(std::shared_ptr< RooRealVarSharedProperties > &&prop)
Install the shared property into the member _sharedProp.
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
std::shared_ptr< RooRealVarSharedProperties > _sharedProp
void setError(Double_t value)
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Detailed printing interface.
virtual void printExtras(std::ostream &os) const
Print extras of variable: (asymmetric) error, constant flag, limits and binning.
void setMax(Double_t value)
Double_t chopAt(Double_t what, Int_t where) const
Utility to calculate number of decimals to show based on magnitude of error.
static Int_t _printSigDigits
void setRange(const char *name, Double_t min, Double_t max)
Set a fit or plotting range.
static void cleanup()
Explicitely deletes the shared properties list on exit to avoid problems with the initialization orde...
std::list< std::string > getBinningNames() const
Get a list of all binning names.
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
virtual void attachToVStore(RooVectorDataStore &vstore)
Overload RooAbsReal::attachToTree to also attach branches for errors and/or asymmetric errors attribu...
void removeRange(const char *name=0)
Remove range limits for binning with given name. Empty name means default range.
Double_t getAsymErrorHi() const
void setMax(const char *name, Double_t value)
Set maximum of name range to given value.
void setRange(RooAbsReal &min, RooAbsReal &max)
Set parameterised limits of the default range. See setRange(const char*, RooAbsReal&,...
virtual Double_t getValV(const RooArgSet *nset=0) const
Return value of variable.
void setAsymError(Double_t lo, Double_t hi)
void deleteSharedProperties()
Stop sharing properties.
virtual void fillTreeBranch(TTree &t)
Overload RooAbsReal::fillTreeBranch to also fill tree branches with (asymmetric) errors if requested.
Bool_t hasError(Bool_t allowZero=kTRUE) const
virtual ~RooRealVar()
Destructor.
RooErrorVar * errorVar() const
Return a RooAbsRealLValue representing the error associated with this variable.
Double_t getError() const
void removeMax(const char *name=0)
Remove upper range limit for binning with given name. Empty name means default range.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache Warning: This function copies the cached valu...
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
void removeMin(const char *name=0)
Remove lower range limit for binning with given name. Empty name means default range.
static Bool_t _printScientific
TString * format(const RooCmdArg &formatArg) const
Format contents of RooRealVar for pretty printing on RooPlot parameter boxes.
const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const
Return binning definition with name.
void copyCacheFast(const RooRealVar &other, Bool_t setValDirty=kTRUE)
RooRealVar()
Default constructor.
virtual void attachToTree(TTree &t, Int_t bufSize=32000)
Overload RooAbsReal::attachToTree to also attach branches for errors and/or asymmetric errors attribu...
void setBinning(const RooAbsBinning &binning, const char *name=0)
Add given binning under name 'name' with this variable.
virtual TObject * clone(const char *newname) const
virtual void setVal(Double_t value)
Set value of variable to 'value'.
RooRealVar & operator=(const RooRealVar &other)
Assign the values of another RooRealVar to this instance.
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &)
virtual Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
bool empty() const
Check if empty.
A simple container to hold a batch of data values.
RooVectorDataStore uses std::vectors to store data columns.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Mother of all ROOT objects.
A TTree represents a columnar dataset.
Namespace for dispatching RooFit computations to various backends.
This struct enables passing computation data around between elements of a computation graph.