54#ifdef ROOFIT_LEGACY_EVAL_BACKEND
62using std::ostream, std::istream, std::list;
79 _actualVars(
"actualVars",
"Variables used by formula expression",
this),
107 _actualVars(
"actualVars",
this,
other._actualVars),
108 _formExpr(
other._formExpr)
111 if (
other._evaluator) {
169 os <<
"formula=\"" <<
_formExpr <<
"\" " ;
180 coutE(InputArguments) <<
"RooFormulaVar::readFromStream(" <<
GetName() <<
"): can't read" << std::endl ;
192 std::cout <<
getVal() << std::endl ;
250 auto func =
static_cast<const RooAbsReal*
>(par);
253 if (func && (
binb = func->binBoundaries(obs,xlo,xhi)) ) {
273 auto func =
dynamic_cast<const RooAbsReal*
>(par);
276 if (func && (
hint = func->plotSamplingHint(obs,xlo,xhi)) ) {
300#ifdef ROOFIT_LEGACY_EVAL_BACKEND
305 if (
dynamic_cast<RooChi2Var*
>(arg)) {
312 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
313 <<
") Formula contains a RooNLLVar, using its error level" << std::endl ;
314 return nllArg->defaultErrorLevel() ;
316 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName()
317 <<
") Formula contains a RooChi2Var, using its error level" << std::endl ;
318 return chi2Arg->defaultErrorLevel() ;
320 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
321 <<
"Formula contains neither RooNLLVar nor RooChi2Var server, using default level of 1.0" << std::endl ;
323 coutI(Minimization) <<
"RooFormulaVar::defaultErrorLevel(" <<
GetName() <<
") WARNING: "
324 <<
"Formula contains BOTH RooNLLVar and RooChi2Var server, using default level of 1.0" << std::endl ;
332 return evaluator().getTFormula()->GetUniqueFuncName().Data();
335std::unique_ptr<RooAbsArg>
static void indent(ostringstream &buf, int indent_level)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Common abstract base class for objects that represent a value and a "shape" in RooFit.
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
TObject * Clone(const char *newname=nullptr) const override
Make a clone of an object using the Streamer facility.
Abstract base class for RooRealVar binning definitions.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
const RooArgSet * nset() const
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Structure printing.
double _value
Cache for current value of object.
double traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
const char * Data() const