TROOT


class description - source file - inheritance tree

class TROOT : public TDirectory


    protected:
void InitSystem() void* operator new(size_t l) public:
virtual void ~TROOT() virtual void Browse(TBrowser* b) TClass* Class() Bool_t ClassSaved(TClass* cl) void DisplayColorTable() TObject* FindObject(Text_t* name) TObject* FindObject(Text_t* name, void*& where) const Text_t* FindObjectClassName(Text_t* name) void ForceStyle(Bool_t force = kTRUE) Bool_t FromPopUp() TApplication* GetApplication() TClass* GetClass(Text_t* name, Bool_t load = kTRUE) TColor* GetColor(Int_t color) const Text_t* GetDefCanvasName() Bool_t GetEditHistograms() Int_t GetEditorMode() virtual TFile* GetFile() TFile* GetFile(Text_t* name) Bool_t GetForceStyle() TF1* GetFunction(Text_t* name) TGeometry* GetGeometry(Text_t* name) TGlobal* GetGlobal(Text_t* name, Bool_t load = kFALSE) TGlobal* GetGlobal(TObject* obj, Bool_t load = kFALSE) TFunction* GetGlobalFunction(Text_t* name, Text_t* params = 0, Bool_t load = kFALSE) TFunction* GetGlobalFunctionWithPrototype(Text_t* name, Text_t* 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* GetListOfSockets() TSeqCollection* GetListOfSpecials() TSeqCollection* GetListOfStyles() TSeqCollection* GetListOfTypes() const char* GetMacroPath() VoidFuncPtr_t GetMakeDefCanvas() Int_t GetNclasses() Int_t GetNtypes() TVirtualPad* GetSelectedPad() TObject* GetSelectedPrimitive() TStyle* GetStyle(Text_t* name) TDataType* GetType(Text_t* name) const Text_t* GetVersion() Int_t GetVersionDate() Int_t GetVersionInt() Int_t GetVersionTime() void Idle(UInt_t idleTimeInSec, Text_t* command = 0) Bool_t Initialized() virtual TClass* IsA() Bool_t IsBatch() virtual Bool_t IsFolder() Bool_t IsInterrupted() Bool_t IsLineProcessing() void LoadMacro(Text_t* filename) virtual void ls(Option_t* option) Int_t Macro(Text_t* filename) Bool_t MustClean() void ProcessLine(Text_t* line) Long_t ProcessLineFast(Text_t* line) void Proof(Text_t* cluster = proof) Bool_t ReadingBasket() void Reset(Option_t* option) void SaveContext() void SetApplication(TApplication* app) void SetBatch(Bool_t batch = kTRUE) void SetDefCanvasName(Text_t* name = c1) void SetEditHistograms(Bool_t flag = kTRUE) void SetEditorMode(Text_t* 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(Text_t* 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 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

   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"

       extern void  InitGui();

       VoidFuncPtr_t initfuncs[] = { InitGui, 0 };

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

       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.

void DisplayColorTable()
*-*-*-*-*-*-*-*-*-*-*Display Color Table in the pad*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============================
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TObject* FindObject(const Text_t *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 Text_t* FindObjectClassName(const Text_t *name) const
*-*-*-*-*Returns class name of a ROOT object including CINT globals*-*
*-*      ==========================================================

TClass* GetClass(const Text_t *name1, 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 Text_t *name)
*-*-*-*-*Return pointer to type with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      =================================

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

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

TF1* GetFunction(const Text_t *name)
*-*-*-*-*Return pointer to function with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-*      ===================================

TGlobal* GetGlobal(const Text_t *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 Text_t *function, const Text_t *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 Text_t *function, const Text_t *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".

TGeometry* GetGeometry(const Text_t *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()
 Return list containing all TDataTypes (typedefs) currently defined.

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

void InitSystem()

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 Text_t *filename)
 Load a macro in the interpreter's memory. Equivalent to the command line
 command ".L filename".

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

void ProcessLine(const Text_t *line)
 Process interpreter command via TApplication::ProcessLine().

Long_t ProcessLineFast(const Text_t *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 Text_t *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 Text_t *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 Text_t *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(Text_t* name, void*& where)
                   void ForceStyle(Bool_t force = kTRUE)
                 Bool_t FromPopUp()
          TApplication* GetApplication()
          const Text_t* GetDefCanvasName()
                 Bool_t GetEditHistograms()
                  Int_t GetEditorMode()
                 Bool_t GetForceStyle()
                  Int_t GetVersionDate()
                  Int_t GetVersionTime()
                  Int_t GetVersionInt()
          const Text_t* GetVersion()
        TSeqCollection* GetListOfClasses()
        TSeqCollection* GetListOfColors()
        TSeqCollection* GetListOfFiles()
        TSeqCollection* GetListOfMappedFiles()
        TSeqCollection* GetListOfSockets()
        TSeqCollection* GetListOfCanvases()
        TSeqCollection* GetListOfStyles()
        TSeqCollection* GetListOfFunctions()
        TSeqCollection* GetListOfGeometries()
        TSeqCollection* GetListOfBrowsers()
        TSeqCollection* GetListOfSpecials()
                 TList* GetListOfBrowsables()
                 TFile* GetFile(Text_t* name)
               TObject* GetSelectedPrimitive()
           TVirtualPad* GetSelectedPad()
                  Int_t GetNclasses()
                  Int_t GetNtypes()
                 Bool_t IsBatch()
                 Bool_t IsFolder()
                 Bool_t IsInterrupted()
                 Bool_t IsLineProcessing()
                 Bool_t MustClean()
                 Bool_t ReadingBasket()
                   void SetApplication(TApplication* app)
                   void SetBatch(Bool_t batch = kTRUE)
                   void SetDefCanvasName(Text_t* 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()
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)


Author: Rene Brun 08/12/94
Last update: 2.22/07 24/06/99 23.34.57 by Fons Rademakers
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.