virtual | ~TFormula() |
void | TObject::AbstractMethod(const char* method) const |
void | AddParameter(const TString& name, Double_t value = 0) |
void | AddVariable(const TString& name, Double_t value = 0) |
void | AddVariables(const TString* vars, const Int_t size) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
Int_t | Compile(const char* expression = "") |
virtual void | Copy(TObject& f1) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
Double_t | Eval(Double_t x) const |
Double_t | Eval(Double_t x, Double_t y) const |
Double_t | Eval(Double_t x, Double_t y, Double_t z) const |
Double_t | Eval(Double_t x, Double_t y, Double_t z, Double_t t) const |
Double_t | EvalPar(const Double_t* x, const Double_t* params = 0) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
TString | GetExpFormula(Option_t* option = "") const |
virtual const char* | TObject::GetIconName() const |
const TObject* | GetLinearPart(Int_t i) const |
virtual const char* | TNamed::GetName() const |
Int_t | GetNdim() const |
Int_t | GetNpar() const |
Int_t | GetNumber() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
Double_t | GetParameter(const char* name) const |
Double_t | GetParameter(Int_t param) const |
Double_t* | GetParameters() const |
void | GetParameters(Double_t* params) const |
const char* | GetParName(Int_t ipar) const |
Int_t | GetParNumber(const char* name) const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
Double_t | GetVariable(const char* name) const |
TString | GetVarName(Int_t ivar) const |
Int_t | GetVarNumber(const char* name) const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | IsLinear() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | IsValid() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
void | TObject::operator delete(void* ptr) |
void | TObject::operator delete(void* ptr, void* vp) |
void | TObject::operator delete[](void* ptr) |
void | TObject::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) |
TFormula& | operator=(const TFormula& rhs) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | SetName(const char* name) |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetParameter(const char* name, Double_t value) |
void | SetParameter(Int_t param, Double_t value) |
void | SetParameters(const Double_t* params) |
void | SetParameters(Double_t p0, Double_t p1, Double_t p2 = 0, Double_t p3 = 0, Double_t p4 = 0, Double_t p5 = 0, Double_t p6 = 0, Double_t p7 = 0, Double_t p8 = 0, Double_t p9 = 0, Double_t p10 = 0)MENU |
void | SetParName(Int_t ipar, const char* name) |
void | SetParNames(const char* name0 = "p0", const char* name1 = "p1", const char* name2 = "p2", const char* name3 = "p3", const char* name4 = "p4", const char* name5 = "p5", const char* name6 = "p6", const char* name7 = "p7", const char* name8 = "p8", const char* name9 = "p9", const char* name10 = "p10")MENU |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetVariable(const TString& name, Double_t value) |
void | SetVariables(const pair<TString,Double_t>* vars, const Int_t size) |
virtual void | ShowMembers(TMemberInspector& insp) const |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
TFormula() | |
TFormula(const TFormula& formula) | |
TFormula(const char* name, const char* formula = "", bool addToGlobList = true) | |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | DoAddParameter(const TString& name, Double_t value, bool processFormula) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
Double_t | DoEval(const Double_t* x, const Double_t* p = nullptr) const |
void | DoSetParameters(const Double_t* p, Int_t size) |
void | ExtractFunctors(TString& formula) |
static Bool_t | IsBracket(const char c) |
static Bool_t | IsFunctionNameChar(const char c) |
static Bool_t | IsHexadecimal(const TString& formula, int ipos) |
static Bool_t | IsOperator(const char c) |
static Bool_t | IsScientificNotation(const TString& formula, int ipos) |
void | TObject::MakeZombie() |
Bool_t | PrepareFormula(TString& formula) |
void | PreProcessFormula(TString& formula) |
void | ProcessFormula(TString& formula) |
void | ReplaceParamName(TString& formula, const TString& oldname, const TString& name) |
void | SetPredefinedParamNames() |
void | FillDefaults() |
void | HandleExponentiation(TString& formula) |
void | HandleLinear(TString& formula) |
void | HandleParametrizedFunctions(TString& formula) |
void | HandlePolN(TString& formula) |
void | InputFormulaIntoCling() |
static Bool_t | IsDefaultVariableName(const TString& name) |
Bool_t | PrepareEvalMethod() |
static TObject::(anonymous) | TObject::kBitMask | |
static TObject::EStatusBits | TObject::kCanDelete | |
static TObject::EStatusBits | TObject::kCannotPick | |
static TObject::EStatusBits | TObject::kHasUUID | |
static TObject::EStatusBits | TObject::kInvalidObject | |
static TObject::(anonymous) | TObject::kIsOnHeap | |
static TObject::EStatusBits | TObject::kIsReferenced | |
static TFormula::(anonymous) | kLinear | |
static TObject::EStatusBits | TObject::kMustCleanup | |
static TObject::EStatusBits | TObject::kNoContextMenu | |
static TFormula::(anonymous) | kNormalized | |
static TObject::(anonymous) | TObject::kNotDeleted | |
static TObject::EStatusBits | TObject::kObjInCanvas | |
static TObject::(anonymous) | TObject::kOverwrite | |
static TObject::(anonymous) | TObject::kSingleKey | |
static TObject::(anonymous) | TObject::kWriteDelete | |
static TObject::(anonymous) | TObject::kZombie |
map<TString,Double_t> | fConsts | ! |
TString | fFormula | |
list<TFormulaFunction> | fFuncs | ! |
map<TString,TString> | fFunctionsShortcuts | ! |
vector<TObject*> | fLinearParts | vector of linear functions |
TString | TNamed::fName | object identifier |
Int_t | fNdim | ! |
Int_t | fNpar | ! |
Int_t | fNumber | ! |
map<TString,Int_t,TFormulaParamOrder> | fParams | list of parameter names |
TString | TNamed::fTitle | object title |
map<TString,TFormulaVariable> | fVars | ! list of variable names |
static TFormula::(anonymous) | kNotGlobal |
Bool_t | fAllParametersSetted | flag to control if all parameters are setted |
Bool_t | fClingInitialized | ! transient to force re-initialization |
TString | fClingInput | ! input function passed to Cling |
TString | fClingName | ! unique name passed to Cling to define the function ( double clingName(double*x, double*p) ) |
vector<Double_t> | fClingParameters | parameter values |
vector<Double_t> | fClingVariables | ! cached variables |
TInterpreter::CallFuncIFacePtr_t::Generic_t | fFuncPtr | ! function pointer |
TMethodCall* | fMethod | ! pointer to methocall |
Bool_t | fReadyToExecute | ! |
check if the character at position i is part of a scientific notation
check if the character at position i is part of a scientific notation
Compile the given expression with Cling backward compatibility method to be used in combination with the empty constructor if no expression is given , the current stored formula (retrieved with GetExpFormula()) or the title is used. return 0 if the formula compilation is successfull
clear the formula setting expression to empty and reset the variables and parameters containers
- *-* Sets TMethodCall to function inside Cling environment *-* TFormula uses it to execute function. *-* After call, TFormula should be ready to evaluate formula. -
- *-* Fill structures with default variables, constants and function shortcuts - #ifdef ROOT_CPLUSPLUS11
- *-* Handling polN *-* If before 'pol' exist any name, this name will be treated as variable used in polynomial *-* eg. *-* varpol2(5) will be replaced with: [5] + [6]*var + [7]*var^2 *-* Empty name is treated like variable x. -
- *-* Handling parametrized functions *-* Function can be normalized, and have different variable then x. *-* Variables should be placed in brackets after function name. *-* No brackets are treated like [x]. *-* Normalized function has char 'n' after name, eg. *-* gausn[var](0) will be replaced with [0]*exp(-0.5*((var-[1])/[2])^2)/(sqrt(2*pi)*[2]) - *-* Adding function is easy, just follow these rules: *-* - Key for function map is pair of name and dimension of function *-* - value of key is a pair function body and normalized function body *-* - {Vn} is a place where variable appear, n represents n-th variable from variable list. *-* Count starts from 0. *-* - [num] stands for parameter number. *-* If user pass to function argument 5, num will stand for (5 + num) parameter. -
- *-* Handling exponentiation *-* Can handle multiple carets, eg. *-* 2^3^4 will be treated like 2^(3^4) -
- *-* Preprocessing of formula *-* Replace all ** by ^, and removes spaces. *-* Handle also parametrized functions like polN,gaus,expo,landau *-* and exponentiation. *-* Similar functionality should be added here. -
prepare the formula to be executed normally is called with fFormula
- *-* Extracts functors from formula, and put them in fFuncs. *-* Simple grammar: *-* <function> := name(arg1,arg2...) *-* <variable> := name *-* <parameter> := [number] *-* <name> := String containing lower and upper letters, numbers, underscores *-* <number> := Integer number *-* Operators are omitted. -
- *-* Iterates through funtors in fFuncs and performs the appropriate action. *-* If functor has 0 arguments (has only name) can be: *-* - variable *-* * will be replaced with x[num], where x is an array containing value of this variable under num. *-* - pre-defined formula *-* * will be replaced with formulas body *-* - constant *-* * will be replaced with constant value *-* - parameter *-* * will be replaced with p[num], where p is an array containing value of this parameter under num. *-* If has arguments it can be : *-* - function shortcut, eg. sin *-* * will be replaced with fullname of function, eg. sin -> TMath::Sin *-* - function from cling environment, eg. TMath::BreitWigner(x,y,z) *-* * first check if function exists, and has same number of arguments, then accept it and set as found. *-* If all functors after iteration are matched with corresponding action, *-* it inputs C++ code of formula into cling, and sets flag that formula is ready to evaluate. -
- *-* Adds variable to known variables, and reprocess formula. -
- *-* Adds multiple variables. *-* First argument is an array of pairs<TString,Double>, where *-* first argument is name of variable, *-* second argument represents value. *-* size - number of variables passed in first argument -
Set the name of the formula. We need to allow the list of function to properly handle the hashes.
- *-* Sets multiple variables. *-* First argument is an array of pairs<TString,Double>, where *-* first argument is name of variable, *-* second argument represents value. *-* size - number of variables passed in first argument -
- *-* Returns variable number (positon in array) given its name -
- *-* Adds parameter to known parameters. *-* User should use SetParameter, because parameters are added during initialization part, *-* and after that adding new will be pointless. -
return parameter index given a name (return -1 for not existing parameters) non need to print an error
- *-* Set multiple parameters. *-* First argument is an array of pairs<TString,Double>, where *-* first argument is name of parameter, *-* second argument represents value. *-* size - number of params passed in first argument -
set a vector of parameters value Order in the vector is by default the aphabetic order given to the parameters apart if the users has defined explicitly the parameter names
Set a parameter given a parameter index The parameter index is by default the aphabetic order given to the parameters apart if the users has defined explicitly the parameter names
replace in Formula expression the parameter name
- *-* Sets first 4 variables (e.g. x, y, z, t) and evaluate formula. -
- *-* Sets first 3 variables (e.g. x, y, z) and evaluate formula. -
- *-* Sets first 2 variables (e.g. x and y) and evaluate formula. -
- *-* Sets first variable (e.g. x) and evaluate formula. - double xxx[1] = {x};
- *-* Evaluate formula. *-* If formula is not ready to execute(missing parameters/variables), *-* print these which are not known. *-* If parameter has default value, and has not been setted, appropriate warning is shown. -