Re: [ROOT] How do I retreive pointers to Editor created - objects in root?

From: Tommaso Chiarusi (Tommaso.Chiarusi@bo.infn.it)
Date: Fri Jun 07 2002 - 15:26:18 MEST


Hi Annalisa,
Thanks!
Your empirical Idea is fair!
But unfortunately form the canvas.C i see that  Root initialises with the 
name "line" 
one  TLine pointer at first, for the first 
TLine; then Root reassigns to the same pointer all the
next TLines I draw.......

Nevertheless I can modify at any time, with the mouse, all the TLines I 
have 
drawn. This means that  Root must keep into some of its memory the 
information about the ID 
of each TLine. I need to know (for implementing an automathic routine) 
such an address for each TLine!
 

That is the problem!

Tommaso



On Fri, 7 Jun 2002, Annalisa De Caro wrote:

>   Hi Tommaso,
> i don't understand very well your question.
> If you need to know the pointer to the lines drawn in a canvas, you can
> save this canvas as .C file and you can see the file content;
>    ex:
>        root [0] new TCanvas();
> open the Editor menu, clik on Line button and draw the first line on the
> canvas, clik on Line button an other time and draw the second line ...
> Then, you can go on File menu and in Save As canvas.C;
> the file c1.C was created. You can see the content...
> I don't know if this can help you...
>   Ciao 
>                Annalisa
> 
> > Hi Rooters, 
> > My question in the subject is because if i draw a TLine with the Editor on 
> > a plot, 
> > I get a pointer to it simply with 
> > 
> > TLine *l = TLine;
> > 
> > 
> > But if I draw more than one line, I don't know how to get the pointer to 
> > the newer ones. (If I right-click with the mouse on the line, i get as the 
> > header name TLine only, instead of for example TLine::pippo).
> > 
> > Anyone can help?
> > 
> > Thanks a lot,
> > Tommaso
> > 
> > 
> > 
> > 
> > 
> 
> 



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