63 _actualVars(
"actualVars",
"Variables used by PDF expression",this),
78 const char* inFormula,
const RooArgList& dependents) :
80 _actualVars(
"actualVars",
"Variables used by PDF expression",this),
96 _actualVars(
"actualVars",this,other._actualVars),
97 _formExpr(other._formExpr)
108 const_cast<std::unique_ptr<RooFormula>&
>(
_formula).reset(
129 if (normSet !=
nullptr && normSet !=
_normSet)
130 throw std::logic_error(
"Got conflicting normSets");
133 inputData.
spans[
this] = results;
150 if (
formula().reCompile(inFormula))
return true ;
174 bool error =
_formula ?
_formula->changeDependents(newServerList,mustReplaceAll,nameChange) :
true;
187 os <<
" --- RooGenericPdf --- " << endl ;
201 os <<
"formula=\"" <<
_formExpr <<
"\" " ;
212 coutE(InputArguments) <<
"RooGenericPdf::readFromStream(" <<
GetName() <<
"): can't read in compact mode" << endl ;
static void indent(ostringstream &buf, int indent_level)
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooArgSet const * _normSet
Normalization integral (owned by _normMgr)
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Print multi line detailed information of this RooAbsPdf.
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
The cache manager.
const RooArgSet * nset() const
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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.
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
RooGenericPdf is a concrete implementation of a probability density function, which takes a RooArgLis...
double evaluate() const override
Calculate current value of this object.
RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &inputData, const RooArgSet *normSet) const override
Evaluate this formula for values found in inputData.
bool setFormula(const char *formula)
Change formula expression to given expression.
bool readFromStream(std::istream &is, bool compact, bool verbose=false) override
Read object contents from given stream.
const RooArgList & dependents() const
bool isValidReal(double value, bool printError) const override
Check if given value is valid.
void printMetaArgs(std::ostream &os) const override
Add formula expression as meta argument in printing interface.
void writeToStream(std::ostream &os, bool compact) const override
Write object contents to given stream.
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Base function for computing multiple values of a RooAbsReal.
std::unique_ptr< RooFormula > _formula
! Formula engine
RooFormula & formula() const
TString _formExpr
Formula expression string.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print info about this object to the specified stream.
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursive) override
Propagate server changes to embedded formula object.
A simple container to hold a batch of data values.
TString readLine()
Read an entire line from the stream and return as TString This method recognizes the use of '\' in th...
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
const char * Data() const
This struct enables passing computation data around between elements of a computation graph.
std::map< RooFit::Detail::DataKey, RooSpan< const double > > spans
Once an object has computed its value(s), the span pointing to the results is registered here.