Re: TFormula

From: Matej Batic <matej.batic1_at_guest.arnes.si>
Date: Tue, 25 Oct 2005 07:09:55 +0200


One possibility would be to make it parameter and then use SetParameter method ...
Just my 2 cents.

Best, etc
matej

zaldy wrote:

>Dear Rooter,
>
>I wanted to insert a numerical constant inside the TFormula class.
>If I change the value of the numerical constant I
>keep on changing the code to update the numerical value.
>
>How can we insert a numerical constant in TFormula?
>
>
>For example:
>
> TFormula * form1 = TFormula("form1","10*sin(x)");
>
>Sometimes I want to change the constant 10 to 15 or other values so I have
>to update the code again.
>
>How do we make it like this:
>
> TFormula * form1 = TFormula("form1","FuncConst()*sin(x)");
>
>where FuncConst() is defined (Double_t FuncConst() ) elsewhere.
>
>------
>I see one hint in the use of the TMath functions, for example:
>
> TFormula * form1 = TFormula("form1","TMath::C()*sin(x)");
>
>Can inheriting from TMath class be possible for this case?
>
>Thanks.
>
>
>
Received on Tue Oct 25 2005 - 07:10:18 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET