23 #ifndef ROOT_TObjArray 40 const char *
GetName()
const {
return fName.
Data(); }
41 const char *
GetBody()
const {
return fBody.
Data(); }
46 : fName(name),fBody(body),fNargs(numArgs),fFound(false),fFuncCall(true) {}
48 : fName(name),fBody(
""),fNargs(0),fFound(false),fFuncCall(false){}
72 const char *
GetName()
const {
return fName.
Data(); }
74 Int_t GetArrayPos()
const {
return fArrayPos; }
77 : fName(name), fValue(value), fArrayPos(pos),fFound(false) {}
80 return fName < rhv.
fName;
96 std::vector<Double_t> fClingVariables;
97 std::vector<Double_t> fClingParameters;
100 Bool_t fAllParametersSetted;
107 void InputFormulaIntoCling();
108 Bool_t PrepareEvalMethod();
110 void HandlePolN(
TString &formula);
111 void HandleParametrizedFunctions(
TString &formula);
112 void HandleExponentiation(
TString &formula);
113 void HandleLinear(
TString &formula);
114 Bool_t InitLambdaExpression(
const char * formula);
118 std::list<TFormulaFunction> fFuncs;
119 std::map<TString,TFormulaVariable> fVars;
120 std::map<TString,Int_t,TFormulaParamOrder> fParams;
121 std::map<TString,Double_t> fConsts;
122 std::map<TString,TString> fFunctionsShortcuts;
127 std::vector<TObject*> fLinearParts;
129 static Bool_t IsOperator(
const char c);
130 static Bool_t IsBracket(
const char c);
131 static Bool_t IsFunctionNameChar(
const char c);
132 static Bool_t IsScientificNotation(
const TString & formula,
int ipos);
133 static Bool_t IsHexadecimal(
const TString & formula,
int ipos);
134 void ExtractFunctors(
TString &formula);
135 void PreProcessFormula(
TString &formula);
136 void ProcessFormula(
TString &formula);
141 void SetPredefinedParamNames();
148 kNotGlobal =
BIT(10),
149 kNormalized =
BIT(14),
156 TFormula(
const char *
name,
const char * formula =
"",
bool addToGlobList =
true);
157 TFormula(
const char *
name,
const char * formula,
int ndim,
int npar,
bool addToGlobList =
true);
161 void AddParameter(
const TString &
name,
Double_t value = 0) { DoAddParameter(name,value,
true); }
163 void AddVariables(
const TString *vars,
const Int_t size);
164 Int_t Compile(
const char *expression=
"");
166 virtual void Clear(
Option_t * option=
"");
174 Int_t GetNdim()
const {
return fNdim;}
175 Int_t GetNpar()
const {
return fNpar;}
176 Int_t GetNumber()
const {
return fNumber; }
177 const char * GetParName(
Int_t ipar)
const;
178 Int_t GetParNumber(
const char *
name)
const;
184 Int_t GetVarNumber(
const char *
name)
const;
186 Bool_t IsValid()
const {
return fReadyToExecute && fClingInitialized; }
187 Bool_t IsLinear()
const {
return TestBit(kLinear); }
197 void SetParName(
Int_t ipar,
const char *
name);
198 void SetParNames(
const char *name0=
"p0",
const char *name1=
"p1",
const char 199 *name2=
"p2",
const char *name3=
"p3",
const char 200 *name4=
"p4",
const char *name5=
"p5",
const char *name6=
"p6",
const char *name7=
"p7",
const char 201 *name8=
"p8",
const char *name9=
"p9",
const char *name10=
"p10");
203 void SetVariables(
const std::pair<TString,Double_t> *vars,
const Int_t size);
static double p3(double t, double a, double b, double c, double d)
void SetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Restore the parameters from pars into the function.
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
static double p2(double t, double a, double b, double c)
void(* Generic_t)(void *, int, void **, void *)
Method or function calling interface.
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Stores the parameters of the given function into pars.
static double p1(double t, double a, double b)
void Copy(void *source, void *dest)
void Print(std::ostream &os, const OptionType &opt)
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
const char * Data() const