TObject
The following may be needed if not using
CINT Shortcuts
#include "TObject.h"
Description
TObject is the primordial
class
of ROOT. It acts as an interface across which services are provided both
within the subsystems of ROOT, and more importantly here, between ROOT and the
user. It allows ROOT to act as a framework, which is sometimes contrasted
with a package library by saying: "Don't call us, we'll call you!". In
other words the compiled ROOT code can interact with user
objects
passing
messages
in both directions even though the designers of ROOT have, of course, no idea
of the user code! It is possible to create TObject objects, that is to say
that TObject is not an
abstract base class
although user code rarely needs to deal directly with such low-level objects.
For more information about classes whose primary function is to act as an
interface see
Concepts: Interfaces & Abstract Classes.
The interfaces that are most important to the new user, for any class that
inherits
from TObject, are:-
- Containers. That is to say objects that hold other objects.
See ROOT Containers.
- I/O. This requires that the class has a Streamer
member function
to read/write the object's
data members.
CINT, the interactive C++ interpreter, can generate the code automatically from
the class's
header file.
See
ROOT I/O.
- Display. ROOT provides graphical windows (TCanvas) and manages lists of
objects to be displayed within them. Classes that can be displayed have to
provide a Paint member function. See
TCanvas.
Example Use in MINFast
MINFast does not directly use TObjects although there are many
examples of TObject
pointers
being converted to MINOS Class pointers - a sure sign of services flowing from
ROOT into user code.
For more information see:-
Go Back to the
The ROOT Crib Top Page
If you have any comments about this page please send them to
Nick West