Warning, file /include/root/RooGenericPdf.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_GENERIC_PDF
0017 #define ROO_GENERIC_PDF
0018
0019 #include "RooAbsPdf.h"
0020 #include "RooListProxy.h"
0021
0022 class RooArgList ;
0023 class RooFormula ;
0024
0025 class RooGenericPdf : public RooAbsPdf {
0026 public:
0027
0028 RooGenericPdf();
0029 ~RooGenericPdf() override;
0030 RooGenericPdf(const char *name, const char *title, const char* formula, const RooArgList& dependents);
0031 RooGenericPdf(const char *name, const char *title, const RooArgList& dependents);
0032 RooGenericPdf(const RooGenericPdf& other, const char* name=nullptr);
0033 TObject* clone(const char* newname) const override { return new RooGenericPdf(*this,newname); }
0034
0035
0036 bool readFromStream(std::istream& is, bool compact, bool verbose=false) override ;
0037 void writeToStream(std::ostream& os, bool compact) const override ;
0038
0039
0040 inline RooAbsArg* getParameter(const char* name) const {
0041 return _actualVars.find(name) ;
0042 }
0043
0044 inline RooAbsArg* getParameter(Int_t index) const {
0045 return _actualVars.at(index) ;
0046 }
0047
0048 inline size_t nParameters() const {
0049 return _actualVars.size();
0050 }
0051
0052
0053 void printMultiline(std::ostream& os, Int_t content, bool verbose=false, TString indent="") const override ;
0054 void printMetaArgs(std::ostream& os) const override ;
0055
0056
0057 void dumpFormula();
0058
0059 const char* expression() const { return _formExpr.Data(); }
0060 const RooArgList& dependents() const { return _actualVars; }
0061
0062 protected:
0063
0064 RooFormula& formula() const ;
0065
0066
0067 RooListProxy _actualVars ;
0068 double evaluate() const override ;
0069 void doEval(RooFit::EvalContext &) const override;
0070 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0071
0072
0073 bool redirectServersHook(const RooAbsCollection& newServerList, bool mustReplaceAll, bool nameChange, bool isRecursive) override ;
0074
0075 bool isValidReal(double , bool ) const override { return true; }
0076
0077 mutable RooFormula * _formula = nullptr;
0078 TString _formExpr ;
0079
0080 ClassDefOverride(RooGenericPdf,1)
0081 };
0082
0083 #endif