Re: root dictionary & packages

Nick van Eijndhoven (Nick@phys.uu.nl)
Fri, 21 Aug 1998 16:54:24 +0200


Rutger van der Eijk wrote:
>
> Hi ROOTers
>
> My code in getting in a stage that I should split it into seperate
> packages. Every package performs a specific task and results in a library
> with corresponding include files.
>
> My question is with respect to the ROOT dictionary code (generated by
> rootcint). I assume the best way to proceed is to generate the
> 'dictionary' for every package seperatly, and include corresponding code
> into the package library. But it is not completly clear to me which
> statements I should include in de Linkdef.h file corresponding to the
> package. More specific I can't find the documentation telling me what
> statemenst like
>
> #pragma link off all globals;
> #pragma link off all classes;
> #pragma link off all functions;
>
> exactly do. Which are 'all globals' linked in this way? Should every
> package dictionary Linkdef.h have this statements or are they only needed
> once in an application (i.e. should I put them only once in some 'common'
> package, which I include in all my packages?)
>
> Can anyone give me more insight into this matter?
>
> Thanks,
>
> Rutger van der Eijk.

Hi Rutger,
The I solved it for various packages of software for ALICE
is to have a linkdef.h for each package separately containg :

#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class A;
#pragma link C++ class B;
#pragma link C++ class C;
#endif

where the classes A,B and C are the classes contained a
that particular package.
Note : The dictionary files produced by ROOTCINT for your various
packages should all have different names.
In this way you can load in a certain ROOT session/ batch job
more than one of your packages without problem.

-- 

Cheers,

_/_/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/

*----------------------------------------------------------------------* Dr. Nick van Eijndhoven Department of Subatomic Physics email : nick@phys.uu.nl Utrecht University / NIKHEF tel. +31-30-2532331 (direct) P.O. Box 80.000 tel. +31-30-2531492 (secr.) NL-3508 TA Utrecht fax. +31-30-2518689 The Netherlands WWW : http://www.phys.uu.nl/~nick Office : Ornstein lab. 172 ---------------------------------------------------------------------- tel. +41-22-7679751 (direct) CERN PPE Division / ALICE exp. tel. +41-22-7675857 (secr.) CH-1211 Geneva 23 fax. +41-22-7679480 Switzerland CERN beep : 13+7294 Office : B 160 1-012 *----------------------------------------------------------------------*