Re: TGeoElementTable::Instance

From: Rene Brun <>
Date: Wed, 20 Apr 2005 17:33:56 +0200 (MEST)

Hi Sue,

This problem has been fixed by Andrei. Now in CVS. Here is the CVS log:

Rene Brun

Tue, 19 Apr 2005, Sue
Kasahara wrote:

> 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
> purposes.
> 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
> singleton.
> 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
> changed?
> A more general question: will I run into other problems trying to manage
> multiple geometries in memory in this way? How do you recommend handling
> this problem?
> Thanks,
> -Sue
Received on Wed Apr 20 2005 - 17:34:33 MEST

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