The ROOT Dictionary
When a ROOT based application is running, the following information
is stored in its memory resident dictionary:
- a list of all global functions
- a list of all global variables
- a list of all classes
- for each class, the full description of its data members:
- data member name
- data member type
- associated comment field
- access information (private, protected or public)
- for each class, the full description of its member functions:
- function name
- function return type
- list of parameters and their type
- associated comment field
- access information (private, protected or public)
- the class' title and version as specified in the
ClassDef macro.
- the class' object creation function New()
This dictionary is much more extensive than the RTTI facility
as proposed in the (draft) C++ standard document. In the ROOT system
the dictionary information is used to support, among others, the
following features:
- automatic generation of the Streamer() functions used by the
TBuffer class
- input/output via the
TObject::Write()
and TKey::Read() methods
- input/output via the TTree
and TNtuple classes.
The automatic generation of containers for each object attribute relies
on the data member information in the dictionary.
- the documentation generation class THtml
- the context menus. When an object
drawn in a pad is picked,
a context menu is shown with a list of items corresponding to the member
functions of its class that have been declared candidates for a menu.
If an item of the context menu is selected, a dialog box appears with
the list of parameters of the corresponding member function. When the OK
button of the dailog box is clicked, the member function is executed.
- the object inspector utility.
The TObject::Inspect()
function generates
a graphical dump of an object including clickable hyperlinks for pointers.
- the browser utility. The ROOT browser
can automatically browse
through list of objects and list of lists, etc.
- the CINT C++ interpreter itself is fundamentaly
based on the information stored in the dictionary
- the ROOT dynamic linker uses the dictionary information to
dynamically link classes in shared libraries or DLLs. This gives the
possibility to interactively build a program from existing components
in these libraries.
With this approach, the link time is considerably reduced and the
executable modules are much smaller.
- Inter-Process Communication (IPC) is based on the
object serializer facility provided by the Streamer() method
The picture below gives a schematic overview of the pervasive usage of the
dictionary in ROOT based systems:
The dictionary is generated by the
CINT Dictionary Generator using the C++ header files
(see picture).
ROOT does not require files generated from the Object Description Language
ODL as is the case for some Object Oriented Data Bases.
ROOT does not require files generated from the Interface Definition Language
IDL as is the case for some inter-process communications tools
like CORBA.
Note that the ROOT classes and the ROOT dictionary functions have been
generated in view of multi-threaded applications. In the Windows/NT and
Windows95 environment, ROOT already runs with several threads of execution.
Last update 2/6/96 by FR