RE: [ROOT] two stupid questions

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Dec 19 2001 - 16:30:53 MET


Hi Jacek,

One way to handle (which ROOT does use commonly),

> There are also two special functions (C/C++) which should be called automatically 
> when loading / unloading the shared library. 

is to add static global object to one of the source file in the shared library.
This static global object will be created and deleted respectively during 
loading and unloading the shared library.   Then make sure the proper
function are being called in the constructor and destructor.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Jacek M. Holeczek
Sent: Wednesday, December 19, 2001 8:48 AM
To: RootTalk
Subject: [ROOT] two stupid questions


Hi,
The question one is : what would be the (best ?) recommended way to deal
in CINT/ROOT with the following situation ? Assume you create a shared
library with some registered classes. There are also two special functions
(C/C++) which should be called automatically when loading / unloading the
shared library. What it the best way to achieve it in CINT/ROOT ?

The question two is : ... unfortunately I have now forgotten what the
question was ... feel free, however, to answer it ... in case I get no
answer, I will ask this question again, once I remember it

Thanks in advance,
Jacek.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:12 MET