#ifndef ROO_GENERIC_PDF
#define ROO_GENERIC_PDF
#include "RooAbsPdf.h"
#include "RooFormula.h"
#include "RooListProxy.h"
class RooArgList ;
class RooGenericPdf : public RooAbsPdf {
public:
inline RooGenericPdf() : _formula(0) { }
RooGenericPdf(const char *name, const char *title, const char* formula, const RooArgList& dependents);
RooGenericPdf(const char *name, const char *title, const RooArgList& dependents);
RooGenericPdf(const RooGenericPdf& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooGenericPdf(*this,newname); }
virtual ~RooGenericPdf();
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
virtual void writeToStream(ostream& os, Bool_t compact) const ;
void printMultiline(ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
void printMetaArgs(ostream& os) const ;
void dumpFormula() { formula().dump() ; }
protected:
RooFormula& formula() const ;
RooListProxy _actualVars ;
virtual Double_t evaluate() const ;
Bool_t setFormula(const char* formula) ;
virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
virtual Bool_t isValidReal(Double_t value, Bool_t printError) const ;
mutable RooFormula* _formula ;
TString _formExpr ;
ClassDef(RooGenericPdf,1)
};
#endif