Re: Dynamic loading of classes

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Sep 30 1998 - 14:31:21 MEST


Christoph Borgmeier wrote:
> 
> Hello all,
> 
> I am trying to figure out, how the loading of classes works. When I start
> Root and load my shared library, the object browser does not show me my
> classes, until they are used explicitely.
> 

Hi Cristoph,
This is correct. Classes are only loaded from the shared library
when there is an explicit reference to the class.
All the class names are known to Root.
You can see the list of all classes and the ones active via:
   gSystemTable->Print();

> There is an event class connected to a branch. When I enter
> branch->GetEvent(0), I get:
> 
>    Error in <TBuffer::ReadClass>: illegal class name in I/O buffer
> 
>     *** Break *** segmentation violation
> 
> If I do an event->Print() first, this message does not show up and the
> event is read correctly. (Print calls mainly the Print function of the
> class members)
> 

I do not understand this point. Could you send me a short macro
reproducing the problem?

Rene Brun


> Is there a systematic way to prevent the error? Thank you for your help
> Christoph
> 
> --
>  Christoph Borgmeier    Mail:  DESY F15/HERA-B, Geb. 61/117
>                                Notkestr. 85, 22607 Hamburg
>  Humboldt Univ Berlin   Phone: +49 40 8998 4850
>                         Email: Christoph.Borgmeier@desy.de



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET