Vassili,
You are creating the problem yourself by using object names containing
blank characters.
In ROOT in several places the pointer names are automatically derived
from the object names (SavePrimitive, but also when writing the object
to a file). We do not want to replace systematically the blank
characters by other special characters like the obvious "_" because this
would imply creating
a temporary string in the general case and deleting it for every GetName
operation and this would penalize the majority of users.
Rene Brun
Maroussov wrote:
> Dear ROOTers,
>
> In order to build legend easily I have in TCanvas TF1s with names "10
> cm", "20 cm", etc. If to save TCanvas as ROOT macro, the generated
> code looks like
>
> TF1 *10 cm = new TF1("10 cm","",0,7.938738);
> 10 cm->SetFillColor(19);
> 10 cm->SetFillStyle(0);
>
> Certainly, it may not be considered as a bug, but all the beautiful
> thing would be looking even nicer if the macro generator could always
> produce legal C++ variables...
>
> Regards,
>
> Vassili
>
Received on Sun Jun 20 2010 - 12:38:24 CEST
This archive was generated by hypermail 2.2.0 : Sun Jun 20 2010 - 23:50:01 CEST