Re: two ROOT problems

Rene Brun (Rene.Brun@cern.ch)
Fri, 20 Feb 1998 12:07:19 +0100


Christoph Borgmeier wrote:
>
> Hello Rene,
>
> I have a question, which I have sent to the mailing list, but got lost by
> now. If you think, it is of common interest, could you post it?
>
> Why do ROOT-overlaying histograms look different than the ones in PAW? As
> far as I know, in PAW you can mix patterns like
>
> //// \\\\ XXXX
> //// and \\\\ resulting in XXXX
> //// \\\\ XXXX
>
> while in ROOT, the fill pattern of one histogram shadows the other. Is
> that behaviour intended?
>

Root does not currently support "transparent" fill areas.
It is on my list of things to do since a long time.

> Another question, which still makes trouble to me is the reading of
> persistent objects, which are connected via pointers: Is there a way
> (maybe by means of special flags) to remove objects, which are
> automatically created by ROOT when reads a pointer? Reading the next event
> results in the creation of another object and some heap garbage. Has the
> memory allocated by this something to do with the CINT garbage collection?
> My current problem is, that I can read my 1000 event file once ( for(int
> i=0;i<1000;++i) { GetEvent(i); } ) , and then ROOT has allocated ~100MB of
> memory so that I cannot do it again.
>

You should take care in the object destructors to delete other
referenced objects if these referenced objects do not belong
to any list. When reading an object, Root reads the graph of objects
referenced by this object when the object was Streamed to the
output buffer. To give a more precise diagnostic, I have to see
your header files, constructors and destructors.

Rene Brun