[ROOT] float or double to string

From: Guillaume Blanc (gblanc@hep.saclay.cea.fr)
Date: Wed Oct 02 2002 - 22:29:00 MEST


Hello,

I would like to put the value of a (int, float or double) variable in the
label of a TLegend. Basically my problem is how to convert a double to a
string. Is there an easy way to do that in root?

I need somethng like that:

  Stat_t sta1 = h1->GetEntries();

  leg = new TLegend(0.67,0.2,0.94,0.4);
  leg->AddEntry(h1,"Tout ("+sta1+")", "L"); // where "sta1" has been
                                            // converted to a string by
                                            // some way...
  leg->SetFillColor(10);
  leg->Draw();


Thanks by advance for your help.

		Guillaume Blanc



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:12 MET