Re: TGeoElementTable::Instance (fwd)

From: Sue Kasahara <>
Date: Tue, 26 Apr 2005 11:48:42 -0500

Hi Rene & Andrei,
It works! Thanks very much! -Sue

Rene Brun wrote:

>Hi Sue,
>I have implemented the necessary changes such that it is now
>possible to draw different geometries in the same pad.
>(now in CVS).
>Let us know if everything works in your case.
>Rene Brun
>On Sun, 24 Apr
>2005, Sue Kasahara wrote:
>>Hi Andrei & Rene,
>>Thanks! I've tested the fix and I seem to be able to build two
>>geometries now in memory and switch between them.
>> I'm wondering if you can expand a little bit on this restriction:
>> > - do not try to draw in the same time 2 geometries
>>I can see that it would be a problem to draw two geometries
>>on the same canvas simultaneously, but I'm wondering if I should
>>expect that it's possible to draw 2 geometries sequentially in the same
>>session after switching gGeoManager to point to the current geometry?
>>In my own experiment this fails: the first geometry draws okay, the
>>second does
>>Thanks again,
>>Andrei Gheata wrote:
>>>Hi Sue,
>>>I will fix the problem with TGeoElementTable and let you know.
>>>Hopefully you should not run into other problems - different
>>>geometries can reside in the same time in memory - however you will be
>>>the first testing this in detail. The only cautions you should take are:
>>>- set gGeoManager pointer to 0 before adding a new geometry in memory
>>>(by whatever method)- if you have already one.
>>>- switch gGeoManager to the active geometry before starting to use it.
>>>- do not try to draw in the same time 2 geometries
>>>I will let you know,
>>>>Hi root team,
>>>>I'm making use of the TGeo associated classes to build
>>>>our detector geometries. We need to be able to build more
>>>>than one geometry in the course of a job, and we store these multiple
>>>>geometries in a loan pool of geometries available for use. These
>>>>geometries are to be used within a vmc application, but also for other
>>>>In order to manage multiple geometries in memory, I realize
>>>>I need to manage the gGeoManager global pointer so
>>>>that it points to the geometry in use and I've attempted to do this.
>>>>I've run into my first problem however, in that I find that I receive
>>>>a complaint when building a second geometry after the first is built
>>>>which is:
>>>> Error in <TGeoElementTable::ctor>: Element table already instantiated
>>>>Investigating a bit, I see that TGeoElementTable is a singleton to
>>>>hold the default list of elements, but it's not really treated like a
>>>>For example, the TGeoManager destructor will delete the Instance.
>>>>This is of course a problem when one has multiple geometry in memory,
>>>>one of which may go out of use before another. Can this behavior be
>>>> A more general question: will I run into other problems trying to
>>>>multiple geometries in memory in this way? How do you recommend
>>>>this problem?
Received on Tue Apr 26 2005 - 18:49:22 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET