Skip to content
Snippets Groups Projects
Commit 7a2799cf authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files
call InitArgs for interpreted function in implementation of operator()


git-svn-id: http://root.cern.ch/svn/root/trunk@24829 27541ba8-7e3a-0410-8455-c3a389f83636
parent 24b729c8
No related branches found
No related tags found
No related merge requests found
...@@ -201,8 +201,8 @@ public: ...@@ -201,8 +201,8 @@ public:
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const; virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const;
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0); virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0);
// for using TF1 as a callable object (functor) // for using TF1 as a callable object (functor)
virtual Double_t operator()(Double_t x, Double_t y=0, Double_t z = 0, Double_t t = 0) const { return Eval(x,y,z,t); } virtual Double_t operator()(Double_t x, Double_t y=0, Double_t z = 0, Double_t t = 0) const;
virtual Double_t operator()(const Double_t *x, const Double_t *params=0) { return EvalPar(x,params); } virtual Double_t operator()(const Double_t *x, const Double_t *params=0);
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual void FixParameter(Int_t ipar, Double_t value); virtual void FixParameter(Int_t ipar, Double_t value);
Double_t GetChisquare() const {return fChisquare;} Double_t GetChisquare() const {return fChisquare;}
...@@ -294,6 +294,15 @@ public: ...@@ -294,6 +294,15 @@ public:
ClassDef(TF1,7) //The Parametric 1-D function ClassDef(TF1,7) //The Parametric 1-D function
}; };
inline Double_t TF1::operator()(Double_t x, Double_t y, Double_t z, Double_t t) const
{ return Eval(x,y,z,t); }
inline Double_t TF1::operator()(const Double_t *x, const Double_t *params)
{
if (fMethodCall) InitArgs(x,params);
return EvalPar(x,params);
}
inline void TF1::SetRange(Double_t xmin, Double_t, Double_t xmax, Double_t) inline void TF1::SetRange(Double_t xmin, Double_t, Double_t xmax, Double_t)
{ TF1::SetRange(xmin, xmax); } { TF1::SetRange(xmin, xmax); }
inline void TF1::SetRange(Double_t xmin, Double_t, Double_t, Double_t xmax, Double_t, Double_t) inline void TF1::SetRange(Double_t xmin, Double_t, Double_t, Double_t xmax, Double_t, Double_t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment