Re: DLL

Valery Fine (fine@bnl.gov)
Fri, 21 Aug 1998 11:26:03 -0500


On 21 Aug 98 at 9:58, GENTIT Francois-Xavier DAPNI wrote:

> Is there a documentation about all the files .DLL that are in
> /root/bin ? Thanks to Valery Fine, I discovered for instance that
> self documenting is only available if one first do
> gSystem.Load("Root_Html.DLL"). But things are not so evident for
> other .DLL . For instance, what is Root_WinNT.DLL ?

Root_WinNT.DLL

is Windows NT implementation of TSystem class. Under UNIX the same
is provided with

libUnix.so"

> Do I have to load it through gSystem.Load ? What is Root_Hist.DLL, since
> histograms seams to work perfectly well without loading it ? Is it
> so that some of these .DLL are automatically loaded when I start
> ROOT, some not ? If yes, which ones are not automatically loaded ?

When ROOT starts it creates some kinds of the objects and and
Windows NT loads those DLL's to create it. If some class is no use at
ROOT start time that DLL is not loaded and should be loaded manually
via ".L", "#include" or "gSystem.Load" command

Since many ROOT classes come with the global pointer from the
the global instance of TROOT class (gROOT) many of them are
pre-loaded as well.

For example ROOT creates somehow the global instance of some class
provided with Root_Hist.DLL and this force the entire DLL to be
loaded at ROOT start time.

For example you discovered that Root_Html.DLL must be loaded
manually. This means NO instance of THtml class is created at ROOT
start time. I find it is reasonable. Why we should load DLL and waste
the RAM if program dos'nt need. May be I am wrong and ALL DLL's must
pre-loaded. But this way there will no reason to keep all of them
separately and we should create one huge DLL with ALL classes inside.

Any opinions ?

Anyway as far as I know the following ROOT DLL for Windows NT are
not loaded at start time:

1. Root_Html.DLL -- Html class definition
2. Root_Tree.DLL -- TTree/TBranch class definition
3. Matrix and Vector -- Vector and Matrix classes
4. Root_RGL.DLL -- OpenGL interface
5. All "special HEP classes like "Event generators" "Pythia" etc
6. All user's DLL as well.

In fact all things above should be regarded as some kind of extra
"user-level utility" classes. One always can check whether some
documented class is available via

.class <classname>

ROOT/Cint command.

I'd like to mention that Root_Tree.DLL is not loaded by ROOT
but it is loded by "Rootlogon.C" script supplied with the ROOT
Tutorial directory. If one uses very this file as his/her "logon"
script he/she may not realized some extra DLL should be loaded to
play with TTree/TBranch classes. "rootlogon.C" script is a quite
convinient way to define DLL's one wants to be loaded for his/her
sessions.

Another example is a Root_RGL library. NT version of NT "knows"
to produce OpenGL view this DLL must be loaded and checks
whether the GL classes are loaded. If it is not case it loads the
ROOT_RGL.DLL itself (and supplies some message)

For the rest DLL's no special effort was provided. They are loaded
by operating system as soon as some instance from those DLL is
REALLY created when ROOT starts.

Hope this helps.
Valery
=================================================================
Dr. Valeri Faine (Fine)
------------------- Phone: +1 516 344 7806
Brookhaven National Laboratory FAX : +1 516 344 4206
Bldg. 510A /STAR mailto:fine@bnl.gov
Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
USA

Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su