Hi,
In this case, as Axel pointed out the interpreted function has more information and knows the name of the function.
We can have the same behavior only by removing the setting of the function title in case of interpreted function.
This is not nice in my opinion and will change the behavior of the existing users.
I think is then better to maintain this difference, which is not the only one (for example see TF1::EvalPar and TF1::InitArgs)
The user must be aware when using an interpreted function (in CINT or Python) or a compiled one. The performances can
be also very different.
We will, however, document this differences in the TF1 reference doc
Cheers , Lorenzo
On Aug 4, 2010, at 11:04 AM, Axel Naumann wrote:
> Hi, > > this is simply the way TF1 sets the title when being passed an > interpreted function (TF1.cxx:603-604): > const char *funcname = gCint->Getp2f2funcname(fcn); > SetTitle(funcname); > I.e. the different behavior is expected. You can explicitly set the > title after the creation of the TF1 to circumvent the automatic naming. > > Cheers, Axel. > > Olivier Couet wrote on 08/04/2010 10:58 AM:
>>> Dear ROOTers, >>> >>> after running the CheckBuildLegend.C script attached I expect to see >>> plots of sine (kBlue) and cosine (kRed) in the same TCanvas with >>> legend which contain "Sine" and "Cosine". However, neither in the >>> interpreter (.x CheckBuildLegend.C) nor in the ACLiC (.x >>> CheckBuildLegend.C+) mode a see both plots, but only the last >>> "TF1::Draw". Moreover, resulting plot looks differently in the >>> interpreter and ACLiC modes. What's wrong? >>> >>> Regards, >>> >>> Vassili >>> >>> P.S. Linux 2.6.32.16-141.fc12.x86_64, gcc version 4.4.4 20100630 (Red >>> Hat 4.4.4-10), ROOT 5.27/05 (trunk_at_34633, Jul 28 2010, 13:31:45 on >>> linuxx8664gcc) >>>
This archive was generated by hypermail 2.2.0 : Wed Aug 04 2010 - 17:50:01 CEST