36using std::endl, std::istream, std::ostream;
47 _binning = std::make_unique<RooUniformBinning>(-1,1,100) ;
114 if (!createOnTheFly) {
120 coutI(Contents) <<
"RooErrorVar::getBinning(" <<
GetName() <<
") new range named '"
121 <<
name <<
"' created with default bounds" << std::endl ;
134 std::list<std::string> binningNames(1,
"");
137 const char*
name = binning->GetName();
138 binningNames.push_back(
name);
193 coutW(InputArguments) <<
"RooErrorVar::setMin(" <<
GetName()
194 <<
"): Proposed new fit min. larger than max., setting min. to max." << std::endl ;
223 coutW(InputArguments) <<
"RooErrorVar::setMax(" <<
GetName()
224 <<
"): Proposed new fit max. smaller than min., setting max. to min." << std::endl ;
259 coutW(InputArguments) <<
"RooErrorVar::setRange(" <<
GetName()
260 <<
"): Proposed new fit max. smaller than min., setting max. to min." << std::endl ;
267 coutI(InputArguments) <<
"RooErrorVar::setRange(" <<
GetName()
268 <<
") new range named '" <<
name <<
"' created with bounds ["
269 << min <<
"," << max <<
"]" << std::endl ;
283 TString errorPrefix(
"RooErrorVar::readFromStream(");
290 if (parser.
readDouble(value,verbose))
return true ;
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
int Int_t
Signed integer 4 bytes (int).
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
Abstract base class for RooRealVar binning definitions.
virtual void setRange(double xlo, double xhi)=0
virtual void setMin(double xlo)
Change lower bound to xlo.
virtual void setMax(double xhi)
Change upper bound to xhi.
virtual RooAbsBinning * clone(const char *name=nullptr) const =0
bool isValidReal(double value, bool printError=false) const override
Check if given value is valid.
virtual double getMax(const char *name=nullptr) const
Get maximum of currently defined range.
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
bool inRange(const char *name) const override
Check if current value is inside range with given name.
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
double _value
Cache for current value of object.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
bool hasBinning(const char *name) const override
Return true if we have binning with given name.
void removeMin(const char *name=nullptr)
Remove lower bound from named binning, or default binning if name is null.
void setBinning(const RooAbsBinning &binning, const char *name=nullptr)
Store given binning with this variable under the given name.
void setMax(double value)
Set upper bound of default range to value.
std::list< std::string > getBinningNames() const override
Get a list of all binning names.
RooLinkedList _altBinning
! Optional alternative ranges and binnings
void setRange(double min, double max)
Set default ranges to [min,max].
void setVal(double value) override
Set the current value of the object. Needs to be overridden by implementations.
double getValV(const RooArgSet *set=nullptr) const override
Return value, i.e. error on input variable.
std::unique_ptr< RooAbsBinning > _binning
! Pointer to default binning definition
RooErrorVar()
Default constructor.
void setMin(double value)
Set lower bound of default range to value.
void syncCache(const RooArgSet *set=nullptr) override
Force the internal value cache to be up to date.
const RooAbsBinning & getBinning(const char *name=nullptr, bool verbose=true, bool createOnTheFly=false, bool shared=true) const override
Return binning with given name.
void writeToStream(std::ostream &os, bool compact) const override
Write value to stream.
void removeMax(const char *name=nullptr)
Remove upper bound from named binning, or default binning if name is null.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
bool readFromStream(std::istream &is, bool compact, bool verbose=false) override
Read object contents from given stream.
void setBins(Int_t nBins)
Set default binning to nBins uniform bins.
RooRealProxy _realVar
RealVar with the original error.
static constexpr double infinity()
Return internal infinity representation.
Binning/range definition that only defines a range but no binning.
Variable that can be changed from the outside.
bool readDouble(double &value, bool zapOnError=false)
Read the next token and convert it to a double.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
TString & Append(const char *cs)