#ifndef ROO_FORMULA_VAR
#define ROO_FORMULA_VAR
#include "RooAbsReal.h"
#include "RooFormula.h"
#include "RooArgList.h"
#include "RooListProxy.h"
class RooArgSet ;
class RooFormulaVar : public RooAbsReal {
public:
inline RooFormulaVar() : _formula(0), _nset(0) { }
RooFormulaVar(const char *name, const char *title, const char* formula, const RooArgList& dependents);
RooFormulaVar(const char *name, const char *title, const RooArgList& dependents);
RooFormulaVar(const RooFormulaVar& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooFormulaVar(*this,newname); }
virtual ~RooFormulaVar();
inline Bool_t ok() const { return formula().ok() ; }
inline RooAbsArg* getParameter(const char* name) const {
return _actualVars.find(name) ;
}
inline RooAbsArg* getParameter(Int_t index) const {
return _actualVars.at(index) ;
}
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
virtual void writeToStream(ostream& os, Bool_t compact) const ;
virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent= "") const ;
void dumpFormula() { formula().dump() ; }
virtual Double_t getVal(const RooArgSet* set=0) const ;
virtual Double_t defaultErrorLevel() const ;
protected:
virtual Double_t evaluate() const ;
RooFormula& formula() const ;
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 ;
RooListProxy _actualVars ;
mutable RooFormula* _formula ;
mutable RooArgSet* _nset ;
TString _formExpr ;
ClassDef(RooFormulaVar,1)
};
#endif
Last change: Wed Jun 25 08:32:54 2008
Last generated: 2008-06-25 08:32
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.