ROOT logo
ROOT » HIST » HIST » TFormulaPrimitive

class TFormulaPrimitive: public TNamed

 The Formula Primitive class

    Helper class for TFormula to speed up TFormula evaluation
    TFormula can use all functions registered in the list of TFormulaPrimitives
    User can add new function to the list of primitives
    if FormulaPrimitive with given name is already defined new primitive is ignored
      TFormulaPrimitive::AddFormula(new TFormulaPrimitive("Pow2","Pow2",TFastFun::Pow2));
      TF1 f1("f1","Pow2(x)");

    TFormulaPrimitive is used to get direct acces to the function pointers
    GenFunc     -  pointers  to the static function
    TFunc       -  pointers  to the data member functions

    The following sufixes are currently used, to describe function arguments:

    G     - generic layout - pointer to double (arguments), pointer to double (parameters)
    10    - double
    110   - double, double
    1110  - double, double, double

Function Members (Methods)

TFormulaPrimitive(const char* name, const char* formula, TFormulaPrimitive::GenFunc0 fpointer)
TFormulaPrimitive(const char* name, const char* formula, TFormulaPrimitive::TFunc0 fpointer)
TFormulaPrimitive(const char* name, const char* formula, TFormulaPrimitive::GenFuncG fpointer, Int_t npar)
voidTObject::AbstractMethod(const char* method) const
static Int_tAddFormula(TFormulaPrimitive* formula)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Double_tEval(Double_t* x)
Double_tEval(TObject* o, Double_t* x)
Double_tEval(Double_t* x, Double_t* param)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
static TFormulaPrimitive*FindFormula(const char* name)
static TFormulaPrimitive*FindFormula(const char* name, const char* args)
static TFormulaPrimitive*FindFormula(const char* name, UInt_t nargs)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
static Int_tBuildBasicFormulas()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const

Data Members

void*fFunc0!pointer to the function
void*fFunc10!pointer to the function
void*fFunc110!pointer to the function
void*fFunc1110!pointer to the function
void*fFuncG!pointer to the TFormula generic function
Bool_tfIsStaticindication if the function is static
Int_tfNArgumentsnumber of arguments
Int_tfNParametersnumber of parameters
TStringTNamed::fNameobject identifier
G__p2memfuncfTFunc0! pointer to member function
G__p2memfuncfTFunc10! pointer to member function
G__p2memfuncfTFunc110! pointer to member function
G__p2memfuncfTFunc1110! pointer to member function
G__p2memfuncfTFuncG!pointer to the TFormula generic function
TStringTNamed::fTitleobject title
Int_tfTypetype of the function
static TObjArray*fgListOfFunction!list of global primitive formulas

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

 Default constructor.
TFormulaPrimitive(const char *name,const char *formula, GenFunc0 fpointer)
TFormulaPrimitive(const char *name,const char *formula, GenFunc10 fpointer)
TFormulaPrimitive(const char *name,const char *formula, GenFunc110 fpointer)
TFormulaPrimitive(const char *name,const char *formula, GenFunc1110 fpointer)
Int_t AddFormula(TFormulaPrimitive* formula)
 Add formula to the list of primitive formulas.
 If primitive formula already defined do nothing.
Double_t Eval(Double_t* x)
 Eval primitive function at point x.
Double_t Eval(TObject* o, Double_t* x)
 Eval member function of object o at point x.
Double_t Eval(Double_t* x, Double_t* param)
 Eval primitive parametric function.
TFormulaPrimitive* FindFormula(const char* name)
 Find the formula in the list of formulas.
TFormulaPrimitive* FindFormula(const char* name, UInt_t nargs)
 Find the formula in the list of formulas.
TFormulaPrimitive* FindFormula(const char* name, const char* args)
 Find the formula in the list of formulas.
Int_t BuildBasicFormulas()
 Built-in functions.
TFormulaPrimitive& operator=(const TFormulaPrimitive& )