[ROOT] another two stupid questions.

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Mon Feb 18 2002 - 15:16:33 MET


Question One :
I create some TGraphs in a subroutine.
By default these TGraphs are not owned by anything. As soon as I exit the
subroutine they are lost (in principle this generates a "memory leak").
In order to be able to FindObject("MyGraph") from outside of my subroutine
I gROOT->Append(MyGraph") in my subroutine. This almost works. I am able
to find these TGraphs by "Name", but ... as soon as I MyGraph->Draw() and
then gPAD->Clear() they are lost again. Is there any easy way to protect
MyGraph from this (the MyGraph->ResetBit(kCanDelete) does not help) ?

Question Two :
I have a couple of TGraphs. Two of them are MinValue and MaxValue.
Now I would like to draw a "gray band" in my TCanvas between MinValue and
MaxValue (and then the rest of my graphs would be drawn on "top" of it.)
How can I draw such a "gray band" ?

Thanks in advance,
Jacek.



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