[ROOT] #ifdef NOCINT

From: Paolo Adragna (paolo.adragna@pi.infn.it)
Date: Sat Oct 02 2004 - 10:24:49 MEST


Hello everyone.

Let's suppose that I would like to use dynamically loaded libraries inside a 
program (a compiled one, I mean) who is heavily exploiting ROOT capabilities. 
I suppose I should use, for I'm working on a Linux platform,

TUnixSystem::Load to load the library
TUnixSystem::Unload to unload it.

For the purpose of compare different pieces of code I'm revising, I took a 
look to the source code of TUnixSystem, especially to the Load and Unload 
member function. I am interested in understanding the difference between 
ROOT's way of loading library and dlopen-dlclose way.

I don't undestand the preprocessor statement #ifdef NOCINT inside Load

#ifdef NOCINT
   int i = UnixDynLoad(module);
   if (!entry || !strlen(entry)) return i;

   Func_t f = UnixDynFindSymbol(module, entry);
   if (f) return 0;
   return -1;
#else
   return TSystem::Load(module, entry, system);
#endif

and inside Unload

#ifdef NOCINT
   UnixDynUnload(module);
#else
   if (module) { TSystem::Unload(module); }
#endif

functions. What is the path the ROOT compiled classes follow when the code is 
executed. To put it another way, what is the option ROOT team gives when he 
compiles the framework? What function is used inside my compiled code: 
UnixDynLoad or TSystem::Load?

Thanks a lot,

Paolo



-- 
Paolo Adragna
Istituto Nazionale di Fisica Nucleare
Sezione di Pisa
Via Buonarroti, 2 - Edificio C - Stanza 203
56127 Pisa - Italia
Tel. +39 050 221 4912



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET