TROOT


class description - source file - inheritance tree

class TROOT : public TDirectory


    protected:
void InitSystem() void InitThreads() void* operator new(size_t l) public:
virtual void ~TROOT() virtual void Browse(TBrowser* b) TClass* Class() Bool_t ClassSaved(TClass* cl) TObject* FindObject(const char* name) TObject* FindObject(const char* name, void*& where) const char* FindObjectClassName(const char* name) const void ForceStyle(Bool_t force = kTRUE) Bool_t FromPopUp() TApplication* GetApplication() TClass* GetClass(const char* name, Bool_t load = kTRUE) TColor* GetColor(Int_t color) const char* GetDefCanvasName() const Bool_t GetEditHistograms() Int_t GetEditorMode() TFile* GetFile(const char* name) virtual TFile* GetFile() Bool_t GetForceStyle() TObject* GetFunction(const char* name) TObject* GetGeometry(const char* name) TGlobal* GetGlobal(TObject* obj, Bool_t load = kFALSE) TGlobal* GetGlobal(const char* name, Bool_t load = kFALSE) TFunction* GetGlobalFunction(const char* name, const char* params = 0, Bool_t load = kFALSE) TFunction* GetGlobalFunctionWithPrototype(const char* name, const char* proto = 0, Bool_t load = kFALSE) TList* GetListOfBrowsables() TSeqCollection* GetListOfBrowsers() TSeqCollection* GetListOfCanvases() TSeqCollection* GetListOfClasses() TSeqCollection* GetListOfColors() TSeqCollection* GetListOfFiles() TSeqCollection* GetListOfFunctions() TSeqCollection* GetListOfGeometries() TSeqCollection* GetListOfGlobalFunctions(Bool_t load = kFALSE) TSeqCollection* GetListOfGlobals(Bool_t load = kFALSE) TSeqCollection* GetListOfMappedFiles() TSeqCollection* GetListOfMessageHandlers() TSeqCollection* GetListOfSockets() TSeqCollection* GetListOfSpecials() TSeqCollection* GetListOfStyles() TSeqCollection* GetListOfTypes(Bool_t load = kFALSE) const char* GetMacroPath() const VoidFuncPtr_t GetMakeDefCanvas() Int_t GetNclasses() Int_t GetNtypes() TVirtualPad* GetSelectedPad() TObject* GetSelectedPrimitive() TStyle* GetStyle(const char* name) TDataType* GetType(const char* name, Bool_t load = kFALSE) const char* GetVersion() const Int_t GetVersionDate() Int_t GetVersionInt() Int_t GetVersionTime() void Idle(UInt_t idleTimeInSec, const char* command = 0) Int_t IgnoreInclude(const char* fname, const char* expandedfname) Bool_t Initialized() virtual TClass* IsA() const Bool_t IsBatch() const virtual Bool_t IsFolder() Bool_t IsInterrupted() const Bool_t IsLineProcessing() const Int_t LoadClass(const char* classname, const char* libname) void LoadMacro(const char* filename) virtual void ls(Option_t* option) Int_t Macro(const char* filename) void Message(Int_t id, TObject* obj) Bool_t MustClean() void ProcessLine(const char* line) Long_t ProcessLineFast(const char* line) void ProcessLineSync(const char* line) void Proof(const char* cluster = proof) Bool_t ReadingBasket() void Reset(Option_t* option) void SaveContext() void SetApplication(TApplication* app) void SetBatch(Bool_t batch = kTRUE) void SetDefCanvasName(const char* name = c1) void SetEditHistograms(Bool_t flag = kTRUE) void SetEditorMode(const char* mode) void SetFromPopUp(Bool_t flag = kTRUE) void SetInterrupt(Bool_t flag = kTRUE) void SetLineHasBeenProcessed() void SetLineIsProcessing() void SetMakeDefCanvas(VoidFuncPtr_t makecanvas) void SetMustClean(Bool_t flag = kTRUE) void SetReadingBasket(Bool_t flag = kTRUE) void SetSelectedPad(TVirtualPad* pad) void SetSelectedPrimitive(TObject* obj) void SetStyle(const char* stylename = Default) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void Time(Int_t casetime = 1) Int_t Timer()

Data Members

private:
static Bool_t fgRootInit Singleton initialization flag Int_t fLineIsProcessing To synchronize multi-threads protected:
TString fVersion ROOT version (from CMZ VERSQQ) ex 0.05/01 Int_t fVersionInt ROOT version in integer format (501) Int_t fVersionDate Date of ROOT version (ex 951226) Int_t fVersionTime Time of ROOT version (ex 1152) Int_t fTimer Timer flag TApplication* fApplication Pointer to current application TInterpreter* fInterpreter Command interpreter TFile* fCurrentFile Current file TDirectory* fCurrentDirectory Current directory TVirtualPad* fCurrentCanvas Current graphics canvas TVirtualPad* fCurrentPad Current graphics pad TStyle* fCurrentStyle Current graphics style void* fCurrentFunction Current function Bool_t fBatch True if session without graphics Bool_t fEditHistograms True if histograms can be edited with the mouse Bool_t fFromPopUp True if command executed from a popup menu Bool_t fMustClean True if object destructor scans canvases Bool_t fReadingBasket True while reading a basket buffer Bool_t fForceStyle Force setting of current style when reading objects Bool_t fInterrupt True if macro should be interrupted Int_t fEditorMode Current Editor mode TObject* fPrimitive Currently selected primitive TVirtualPad* fSelectPad Currently selected pad TSeqCollection* fClasses List of classes definition TSeqCollection* fTypes List of data types definition TSeqCollection* fGlobals List of global variables TSeqCollection* fGlobalFunctions List of global functions TSeqCollection* fFiles List of files TSeqCollection* fMappedFiles List of memory mapped files TSeqCollection* fSockets List of network sockets TSeqCollection* fCanvases List of canvases TSeqCollection* fStyles List of styles TSeqCollection* fFunctions List of analytic functions TSeqCollection* fProcesses List of connected processes TSeqCollection* fColors List of colors TSeqCollection* fGeometries List of geometries TSeqCollection* fBrowsers List of browsers TSeqCollection* fSpecials List of special objects TSeqCollection* fMessageHandlers List of message handlers TList* fBrowsables List of browsables TString fDefCanvasName Name of default canvas static VoidFuncPtr_t fgMakeDefCanvas Pointer to default canvas constructor

Class Description

                R O O T top level object description

    The TROOT object is the entry point to the ROOT system.
    The single instance of TROOT is accessible via the global gROOT.
    Using the gROOT pointer one has access to basically every object
    created in a ROOT based program. The TROOT object is essentially a
    container of several lists pointing to the main ROOT objects.

    The following lists are accessible from gROOT object:
       gROOT->GetListOfClasses
       gROOT->GetListOfColors
       gROOT->GetListOfTypes
       gROOT->GetListOfGlobals
       gROOT->GetListOfGlobalFunctions
       gROOT->GetListOfFiles
       gROOT->GetListOfMappedFiles
       gROOT->GetListOfSockets
       gROOT->GetListOfCanvases
       gROOT->GetListOfStyles
       gROOT->GetListOfFunctions
       gROOT->GetListOfSpecials (for example graphical cuts)
       gROOT->GetListOfGeometries
       gROOT->GetListOfBrowsers
       gROOT->GetListOfMessageHandlers

   The TROOT class provides also many useful services:
     - Get pointer to an object in any of the lists above
     - Time utilities TROOT::Time

   The ROOT object must be created as a static object. An example
   of a main program creating an interactive version is shown below:

---------------------Example of a main program--------------------------------

       #include "TROOT.h"
       #include "TRint.h"

       TROOT root("Rint", "The ROOT Interactive Interface");

       int main(int argc, char **argv)
       {
          TRint *theApp = new TRint("ROOT example", &argc, argv);

          // Init Intrinsics, build all windows, and enter event loop
          theApp->Run();

          return(0);
       }
-----------------------End of Main program--------------------------------


~TROOT()
 Clean up and free resources used by ROOT (files, network sockets,
 shared memory segments, etc.).

void Browse(TBrowser *b)

Bool_t ClassSaved(TClass *cl)
 return class status bit kClassSaved for class cl
 This function is called by the SavePrimitive functions writing
 the C++ code for an object.

TObject* FindObject(const char *name, void *&where)
*-*-*-*-*Returns address of a ROOT object if it exists*-*-*-*-*-*-*-*-*-*
*-*      =============================================
*-*
*-*  This function looks in the following order in the ROOT lists:
*-*     - List of files
*-*     - List of memory mapped files
*-*     - List of functions
*-*     - List of geometries
*-*     - List of canvases
*-*     - List of styles
*-*     - List of specials
*-*     - List of materials in current geometry
*-*     - List of shapes in current geometry
*-*     - List of matrices in current geometry
*-*     - List of Nodes in current geometry
*-*     - Current Directory in memory
*-*     - Current Directory on file
*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

const char* FindObjectClassName(const char *name) const
*-*-*-*-*Returns class name of a ROOT object including CINT globals*-*
*-*      ==========================================================

TClass* GetClass(const char *name, Bool_t load)
*-*-*-*-*Return pointer to class with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      =================================

TColor* GetColor(Int_t color)
*-*-*-*-*-*-*-*Return address of color with index color*-*-*-*-*-*-*-*-*
*-*            ========================================

VoidFuncPtr_t GetMakeDefCanvas()
*-*-*-*-*-*-*-*Return default canvas function*-*-*-*-*-*-*-*-*
*-*            ==============================

TDataType* GetType(const char *name, Bool_t load)
*-*-*-*-*Return pointer to type with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      =================================

TFile* GetFile(const char *name)
*-*-*-*-*Return pointer to file with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      ================================

TStyle* GetStyle(const char *name)
*-*-*-*-*Return pointer to style with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      =================================

TObject* GetFunction(const char *name)
*-*-*-*-*Return pointer to function with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      ===================================

TGlobal* GetGlobal(const char *name, Bool_t load)
 Return pointer to global variable by name. If load is true force
 reading of all currently defined globals from CINT (more expensive).

TGlobal* GetGlobal(TObject *addr, Bool_t load)
 Return pointer to global variable with address addr. If load is true
 force reading of all currently defined globals from CINT (more
 expensive).

TFunction* GetGlobalFunction(const char *function, const char *params, Bool_t load)
 Return pointer to global function by name. If params != 0
 it will also resolve overloading. If load is true force reading
 of all currently defined global functions from CINT (more expensive).
 The param string must be of the form: "3189,"aap",1.3".

TFunction* GetGlobalFunctionWithPrototype(const char *function, const char *proto, Bool_t load)
 Return pointer to global function by name. If proto != 0
 it will also resolve overloading. If load is true force reading
 of all currently defined global functions from CINT (more expensive).
 The proto string must be of the form: "int, char*, float".

TObject* GetGeometry(const char *name)
*-*-*-*-*Return pointer to Geometry with name*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      ===================================

TSeqCollection* GetListOfGlobals(Bool_t load)
 Return list containing the TGlobals currently defined.
 Since globals are created and deleted during execution of the
 program, we need to update the list of globals every time we
 execute this method. However, when calling this function in
 a (tight) loop where no interpreter symbols will be created
 you can set load=kFALSE (default).

TSeqCollection* GetListOfGlobalFunctions(Bool_t load)
 Return list containing the TFunctions currently defined.
 Since functions are created and deleted during execution of the
 program, we need to update the list of functions every time we
 execute this method. However, when calling this function in
 a (tight) loop where no interpreter symbols will be created
 you can set load=kFALSE (default).

TSeqCollection* GetListOfTypes(Bool_t load)
 Return list containing all TDataTypes (typedefs) currently defined.
 Since types can be added and removed during execution of the
 program, we need to update the list of types every time we
 execute this method. However, when calling this function in
 a (tight) loop where no new types will be created
 you can set load=kFALSE (default).

void Idle(UInt_t idleTimeInSec, const char *command)
 Execute command when system has been idle for idleTimeInSec seconds.

Int_t IgnoreInclude(const char *fname, const char *expandedfname)
 Return true if the given include file correspond to a class that has
 been loaded through a compiled dictionnary.

void InitSystem()
 Initialize operating system interface.

void InitThreads()
 Load and initialize thread library.

Int_t LoadClass(const char *classname, const char *libname)
 Check if class "classname" is known to the interpreter. If
 not it will load library "libname". Returns 0 on successful loading
 and -1 in case libname does not exist or in case of error.

void ls(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*-*-*To list all objects of the application*-*-*-*-*-*
*-*                      ======================================
*-*  Loop on all objects created in the ROOT linked lists
*-*  objects may be files and windows or any other object directly
*-*  attached to the ROOT linked list.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void LoadMacro(const char *filename)
 Load a macro in the interpreter's memory. Equivalent to the command line
 command ".L filename".

Int_t Macro(const char *filename)
 Execute a macro in the interpreter. Equivalent to the command line
 command ".x filename".

void Message(Int_t id, TObject *obj)
 Process message id called by obj

void ProcessLine(const char *line)
 Process interpreter command via TApplication::ProcessLine().
 On Win32 the line will be processed a-synchronously by sending
 it to the CINT interpreter thread. For explicit synchrounous processing
 use ProcessLineSync(). On non-Win32 platforms there is not difference
 between ProcessLine() and ProcessLineSync().

void ProcessLineSync(const char *line)
 Process interpreter command via TApplication::ProcessLine().
 On Win32 the line will be processed synchronously (i.e. it will
 only return when the CINT interpreter thread has finished executing
 the line). On non-Win32 platforms there is not difference between
 ProcessLine() and ProcessLineSync().

Long_t ProcessLineFast(const char *line)
 Process interpreter command directly via CINT interpreter.
 Only executable statements are allowed (no variable declarations),
 In all other cases use TROOT::ProcessLine().

void Proof(const char *cluster)
 Start PROOF session on a specific cluster (default is "proof").
 The cluster configuration is defined either in the file ."cluster".conf,
 or $HOME/."cluster".conf or /usr/proof/etc/"cluster".conf.
 The TProof object can be accessed via the gProof global. Creating a
 new TProof object will delete the current one.

void Reset(Option_t *)
 Delete all global interpreter objects created since the last call to Reset

 If option="a" is set reset to startup context (i.e. unload also
 all loaded files, classes, structs, typedefs, etc.).

 This function is typically used at the beginning (or end) of a macro
 to clean the environment.

void SaveContext()
 Save the current interpreter context.

void SetEditorMode(const char *mode)
 Set editor mode

void SetMakeDefCanvas(VoidFuncPtr_t makecanvas)
 Static function used to set the address of the default make canvas method.
 This address is by default initialized to 0.
 It is set as soon as the library containing the TCanvas class is loaded.

void SetStyle(const char *stylename)
 Change current style to style with name stylename

Bool_t Initialized()

const char* GetMacroPath()
 Get macro search path. Static utility function.



Inline Functions


                  void* operator new(size_t l)
               TObject* FindObject(const char* name, void*& where)
                   void ForceStyle(Bool_t force = kTRUE)
                 Bool_t FromPopUp()
          TApplication* GetApplication()
            const char* GetDefCanvasName() const
                 Bool_t GetEditHistograms()
                  Int_t GetEditorMode()
                 Bool_t GetForceStyle()
                  Int_t GetVersionDate()
                  Int_t GetVersionTime()
                  Int_t GetVersionInt()
            const char* GetVersion() const
        TSeqCollection* GetListOfClasses()
        TSeqCollection* GetListOfColors()
        TSeqCollection* GetListOfFiles()
        TSeqCollection* GetListOfMappedFiles()
        TSeqCollection* GetListOfSockets()
        TSeqCollection* GetListOfCanvases()
        TSeqCollection* GetListOfStyles()
        TSeqCollection* GetListOfFunctions()
        TSeqCollection* GetListOfGeometries()
        TSeqCollection* GetListOfBrowsers()
        TSeqCollection* GetListOfSpecials()
        TSeqCollection* GetListOfMessageHandlers()
                 TList* GetListOfBrowsables()
                 TFile* GetFile(const char* name)
               TObject* GetSelectedPrimitive()
           TVirtualPad* GetSelectedPad()
                  Int_t GetNclasses()
                  Int_t GetNtypes()
                 Bool_t IsBatch() const
                 Bool_t IsFolder()
                 Bool_t IsInterrupted() const
                 Bool_t IsLineProcessing() const
                 Bool_t MustClean()
                 Bool_t ReadingBasket()
                   void SetApplication(TApplication* app)
                   void SetBatch(Bool_t batch = kTRUE)
                   void SetDefCanvasName(const char* name = c1)
                   void SetEditHistograms(Bool_t flag = kTRUE)
                   void SetFromPopUp(Bool_t flag = kTRUE)
                   void SetInterrupt(Bool_t flag = kTRUE)
                   void SetLineIsProcessing()
                   void SetLineHasBeenProcessed()
                   void SetReadingBasket(Bool_t flag = kTRUE)
                   void SetMustClean(Bool_t flag = kTRUE)
                   void SetSelectedPrimitive(TObject* obj)
                   void SetSelectedPad(TVirtualPad* pad)
                   void Time(Int_t casetime = 1)
                  Int_t Timer()
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)


Author: Rene Brun 08/12/94
Last update: 2.23/12 26/01/2000 09.41.50 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.