34 const char *
GetName()
const {
return fName.
Data(); }
35 const char *
GetBody()
const {
return fBody.
Data(); }
40 : fName(name),fBody(body),fNargs(numArgs),fFound(false),fFuncCall(true) {}
42 : fName(name),fBody(
""),fNargs(0),fFound(false),fFuncCall(false){}
66 const char *
GetName()
const {
return fName.
Data(); }
68 Int_t GetArrayPos()
const {
return fArrayPos; }
71 : fName(name), fValue(value), fArrayPos(pos),fFound(false) {}
74 return fName < rhv.
fName;
90 std::vector<Double_t> fClingVariables;
91 std::vector<Double_t> fClingParameters;
94 Bool_t fAllParametersSetted;
101 void InputFormulaIntoCling();
102 Bool_t PrepareEvalMethod();
104 void HandlePolN(
TString &formula);
105 void HandleParametrizedFunctions(
TString &formula);
106 void HandleExponentiation(
TString &formula);
107 void HandleLinear(
TString &formula);
108 Bool_t InitLambdaExpression(
const char * formula);
112 std::list<TFormulaFunction> fFuncs;
113 std::map<TString,TFormulaVariable> fVars;
114 std::map<TString,Int_t,TFormulaParamOrder> fParams;
115 std::map<TString,Double_t> fConsts;
116 std::map<TString,TString> fFunctionsShortcuts;
121 std::vector<TObject*> fLinearParts;
123 static Bool_t IsOperator(
const char c);
124 static Bool_t IsBracket(
const char c);
125 static Bool_t IsFunctionNameChar(
const char c);
126 static Bool_t IsScientificNotation(
const TString & formula,
int ipos);
127 static Bool_t IsHexadecimal(
const TString & formula,
int ipos);
128 static Bool_t IsAParameterName(
const TString & formula,
int ipos);
129 void ExtractFunctors(
TString &formula);
130 void PreProcessFormula(
TString &formula);
131 void ProcessFormula(
TString &formula);
136 void SetPredefinedParamNames();
143 kNotGlobal =
BIT(10),
144 kNormalized =
BIT(14),
151 TFormula(
const char *
name,
const char * formula =
"",
bool addToGlobList =
true);
152 TFormula(
const char *
name,
const char * formula,
int ndim,
int npar,
bool addToGlobList =
true);
156 void AddParameter(
const TString &
name,
Double_t value = 0) { DoAddParameter(name,value,
true); }
158 void AddVariables(
const TString *vars,
const Int_t size);
159 Int_t Compile(
const char *expression=
"");
161 virtual void Clear(
Option_t * option=
"");
169 Int_t GetNdim()
const {
return fNdim;}
170 Int_t GetNpar()
const {
return fNpar;}
171 Int_t GetNumber()
const {
return fNumber; }
172 const char * GetParName(
Int_t ipar)
const;
173 Int_t GetParNumber(
const char *
name)
const;
179 Int_t GetVarNumber(
const char *
name)
const;
181 Bool_t IsValid()
const {
return fReadyToExecute && fClingInitialized; }
182 Bool_t IsLinear()
const {
return TestBit(kLinear); }
192 void SetParName(
Int_t ipar,
const char *
name);
193 void SetParNames(
const char *name0=
"p0",
const char *name1=
"p1",
const char 194 *name2=
"p2",
const char *name3=
"p3",
const char 195 *name4=
"p4",
const char *name5=
"p5",
const char *name6=
"p6",
const char *name7=
"p7",
const char 196 *name8=
"p8",
const char *name9=
"p9",
const char *name10=
"p10");
198 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)
TRObject operator()(const T1 &t1) const
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)
Binding & operator=(OUT(*fun)(void))
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