ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
TROOT Class Reference

ROOT 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->GetListOfSecContexts
gROOT->GetListOfCanvases
gROOT->GetListOfStyles
gROOT->GetListOfFunctions
gROOT->GetListOfSpecials (for example graphical cuts)
gROOT->GetListOfGeometries
gROOT->GetListOfBrowsers
gROOT->GetListOfCleanups
gROOT->GetListOfMessageHandlers

The TROOT class provides also many useful services:

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 "TRint.h"
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);
}

Definition at line 80 of file TROOT.h.

Public Types

typedef std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
 
- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 

Public Member Functions

 TROOT (const char *name, const char *title, VoidFuncPtr_t *initfunc=0)
 Initialize the ROOT system. More...
 
virtual ~TROOT ()
 Clean up and free resources used by ROOT (files, network sockets, shared memory segments, etc.). More...
 
void AddClass (TClass *cl)
 Add a class to the list and map of classes. More...
 
void AddClassGenerator (TClassGenerator *gen)
 Add a class generator. More...
 
void Browse (TBrowser *b)
 Add browsable objects to TBrowser. More...
 
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. More...
 
void CloseFiles ()
 Close any files and sockets that gROOT knows about. More...
 
void EndOfProcessCleanups ()
 Execute the cleanups necessary at the end of the process, in particular those that must be executed before the library start being unloaded. More...
 
virtual TObjectFindObject (const char *name) const
 Returns address of a ROOT object if it exists. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Find an object in one Root folder. More...
 
virtual TObjectFindObjectAny (const char *name) const
 Return a pointer to the first object with name starting at //root. More...
 
virtual TObjectFindObjectAnyFile (const char *name) const
 Scan the memory lists of all files for an object with name. More...
 
TObjectFindSpecialObject (const char *name, void *&where)
 Returns address and folder of a ROOT object if it exists. More...
 
const char * FindObjectClassName (const char *name) const
 Returns class name of a ROOT object including CINT globals. More...
 
const char * FindObjectPathName (const TObject *obj) const
 Return path name of obj somewhere in the //root/... More...
 
TClassFindSTLClass (const char *name, Bool_t load, Bool_t silent=kFALSE) const
 return a TClass object corresponding to 'name' assuming it is an STL container. More...
 
void ForceStyle (Bool_t force=kTRUE)
 
Bool_t FromPopUp () const
 
TPluginManagerGetPluginManager () const
 
TApplicationGetApplication () const
 
TInterpreterGetInterpreter () const
 
TClassGetClass (const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE) const
 Return pointer to class with name. Obsolete, use TClass::GetClass directly. More...
 
TClassGetClass (const type_info &typeinfo, Bool_t load=kTRUE, Bool_t silent=kFALSE) const
 Return pointer to class from its name. More...
 
TColorGetColor (Int_t color) const
 Return address of color with index color. More...
 
const char * GetConfigOptions () const
 
const char * GetConfigFeatures () const
 
const char * GetCutClassName () const
 
const char * GetDefCanvasName () const
 
Bool_t GetEditHistograms () const
 
Int_t GetEditorMode () const
 
Bool_t GetForceStyle () const
 
Int_t GetBuiltDate () const
 
Int_t GetBuiltTime () const
 
const char * GetGitCommit () const
 
const char * GetGitBranch () const
 
const char * GetGitDate ()
 Return date/time make was run. More...
 
Int_t GetVersionDate () const
 
Int_t GetVersionTime () const
 
Int_t GetVersionInt () const
 
Int_t GetVersionCode () const
 
const char * GetVersion () const
 
TCollectionGetListOfClasses () const
 
TSeqCollectionGetListOfColors () const
 
TCollectionGetListOfTypes (Bool_t load=kFALSE)
 Return a dynamic list giving access to all TDataTypes (typedefs) currently defined. More...
 
TCollectionGetListOfGlobals (Bool_t load=kFALSE)
 Return list containing the TGlobals currently defined. More...
 
TCollectionGetListOfGlobalFunctions (Bool_t load=kFALSE)
 Return list containing the TFunctions currently defined. More...
 
TSeqCollectionGetListOfClosedObjects () const
 
TSeqCollectionGetListOfFiles () const
 
TSeqCollectionGetListOfMappedFiles () const
 
TSeqCollectionGetListOfSockets () const
 
TSeqCollectionGetListOfCanvases () const
 
TSeqCollectionGetListOfStyles () const
 
TCollectionGetListOfFunctions () const
 
TCollectionGetListOfFunctionOverloads (const char *name) const
 Return the collection of functions named "name". More...
 
TSeqCollectionGetListOfGeometries () const
 
TSeqCollectionGetListOfBrowsers () const
 
TSeqCollectionGetListOfSpecials () const
 
TSeqCollectionGetListOfTasks () const
 
TSeqCollectionGetListOfCleanups () const
 
TSeqCollectionGetListOfStreamerInfo () const
 
TSeqCollectionGetListOfMessageHandlers () const
 
TCollectionGetListOfClassGenerators () const
 
TSeqCollectionGetListOfSecContexts () const
 
TSeqCollectionGetListOfProofs () const
 
TSeqCollectionGetClipboard () const
 
TSeqCollectionGetListOfDataSets () const
 
TCollectionGetListOfEnums (Bool_t load=kFALSE)
 
TCollectionGetListOfFunctionTemplates ()
 
TListGetListOfBrowsables () const
 
TDataTypeGetType (const char *name, Bool_t load=kFALSE) const
 Return pointer to type with name. More...
 
TFileGetFile () const
 
TFileGetFile (const char *name) const
 Return pointer to file with name. More...
 
TFunctionTemplateGetFunctionTemplate (const char *name)
 
TStyleGetStyle (const char *name) const
 Return pointer to style with name. More...
 
TObjectGetFunction (const char *name) const
 Return pointer to function with name. More...
 
TGlobalGetGlobal (const char *name, Bool_t load=kFALSE) const
 Return pointer to global variable by name. More...
 
TGlobalGetGlobal (const TObject *obj, Bool_t load=kFALSE) const
 Return pointer to global variable with address addr. More...
 
TFunctionGetGlobalFunction (const char *name, const char *params=0, Bool_t load=kFALSE)
 Return pointer to global function by name. More...
 
TFunctionGetGlobalFunctionWithPrototype (const char *name, const char *proto=0, Bool_t load=kFALSE)
 Return pointer to global function by name. More...
 
TObjectGetGeometry (const char *name) const
 Return pointer to Geometry with name. More...
 
const TObjectGetSelectedPrimitive () const
 
TVirtualPadGetSelectedPad () const
 
Int_t GetNclasses () const
 
Int_t GetNtypes () const
 
TFolderGetRootFolder () const
 
TProcessUUIDGetUUIDs () const
 
void Idle (UInt_t idleTimeInSec, const char *command=0)
 Execute command when system has been idle for idleTimeInSec seconds. More...
 
Int_t IgnoreInclude (const char *fname, const char *expandedfname)
 Return 1 if the name of the given include file corresponds to a class that is known to ROOT, e.g. More...
 
Bool_t IsBatch () const
 
Bool_t IsExecutingMacro () const
 
Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
Bool_t IsInterrupted () const
 
Bool_t IsEscaped () const
 
Bool_t IsLineProcessing () const
 
Bool_t IsProofServ () const
 
Bool_t IsRootFile (const char *filename) const
 Return true if the file is local and is (likely) to be a ROOT file. More...
 
void ls (Option_t *option="") const
 To list all objects of the application. More...
 
Int_t LoadClass (const char *classname, const char *libname, Bool_t check=kFALSE)
 Check if class "classname" is known to the interpreter (in fact, this check is not needed anymore, so classname is ignored). More...
 
TClassLoadClass (const char *name, Bool_t silent=kFALSE) const
 Helper function used by TClass::GetClass(). More...
 
Int_t LoadMacro (const char *filename, Int_t *error=0, Bool_t check=kFALSE)
 Load a macro in the interpreter's memory. More...
 
Long_t Macro (const char *filename, Int_t *error=0, Bool_t padUpdate=kTRUE)
 Execute a macro in the interpreter. More...
 
TCanvasMakeDefCanvas () const
 Return a default canvas. More...
 
void Message (Int_t id, const TObject *obj)
 Process message id called by obj. More...
 
Bool_t MustClean () const
 
Long_t ProcessLine (const char *line, Int_t *error=0)
 Process interpreter command via TApplication::ProcessLine(). More...
 
Long_t ProcessLineSync (const char *line, Int_t *error=0)
 Process interpreter command via TApplication::ProcessLine(). More...
 
Long_t ProcessLineFast (const char *line, Int_t *error=0)
 Process interpreter command directly via CINT interpreter. More...
 
Bool_t ReadingObject () const
 Deprecated (will be removed in next release). More...
 
void RefreshBrowsers ()
 Refresh all browsers. More...
 
void RemoveClass (TClass *)
 Remove a class from the list and map of classes. More...
 
void Reset (Option_t *option="")
 Delete all global interpreter objects created since the last call to Reset. More...
 
void SaveContext ()
 Save the current interpreter context. More...
 
void SetApplication (TApplication *app)
 
void SetBatch (Bool_t batch=kTRUE)
 
void SetCutClassName (const char *name="TCutG")
 Set the default graphical cut class name for the graphics editor By default the graphics editor creates an instance of a class TCutG. More...
 
void SetDefCanvasName (const char *name="c1")
 
void SetEditHistograms (Bool_t flag=kTRUE)
 
void SetEditorMode (const char *mode="")
 Set editor mode. More...
 
void SetExecutingMacro (Bool_t flag=kTRUE)
 
void SetFromPopUp (Bool_t flag=kTRUE)
 
void SetInterrupt (Bool_t flag=kTRUE)
 
void SetEscape (Bool_t flag=kTRUE)
 
void SetLineIsProcessing ()
 
void SetLineHasBeenProcessed ()
 
void SetReadingObject (Bool_t flag=kTRUE)
 
void SetMustClean (Bool_t flag=kTRUE)
 
void SetSelectedPrimitive (const TObject *obj)
 
void SetSelectedPad (TVirtualPad *pad)
 
void SetStyle (const char *stylename="Default")
 Change current style to style with name stylename. More...
 
void Time (Int_t casetime=1)
 
Int_t Timer () const
 
- Public Member Functions inherited from TDirectory
 TDirectory ()
 
 TDirectory (const char *name, const char *title, Option_t *option="", TDirectory *motherDir=0)
 Create a new Directory. More...
 
virtual ~TDirectory ()
 Destructor. More...
 
virtual void Append (TObject *obj, Bool_t replace=kFALSE)
 Append object to this directory. More...
 
virtual void Add (TObject *obj, Bool_t replace=kFALSE)
 
virtual Int_t AppendKey (TKey *)
 
virtual void Build (TFile *motherFile=0, TDirectory *motherDir=0)
 Initialise directory to defaults. More...
 
virtual void Clear (Option_t *option="")
 Delete all objects from a Directory list. More...
 
virtual TObjectCloneObject (const TObject *obj, Bool_t autoadd=kTRUE)
 Clone an object. More...
 
virtual void Close (Option_t *option="")
 Delete all objects from memory and directory structure itself. More...
 
virtual void Copy (TObject &) const
 Copy this to obj. More...
 
virtual Bool_t cd (const char *path=0)
 Change current directory to "this" directory. More...
 
virtual void DeleteAll (Option_t *option="")
 Delete all objects from memory. More...
 
virtual void Delete (const char *namecycle="")
 Delete Objects or/and keys in a directory. More...
 
virtual void Draw (Option_t *option="")
 Fill Graphics Structure and Paint. More...
 
virtual TKeyFindKey (const char *) const
 
virtual TKeyFindKeyAny (const char *) const
 
virtual TObjectGet (const char *namecycle)
 Return pointer to object identified by namecycle. More...
 
virtual TDirectoryGetDirectory (const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
 Find a directory using apath. More...
 
template<class T >
void GetObject (const char *namecycle, T *&ptr)
 
virtual voidGetObjectChecked (const char *namecycle, const char *classname)
 See documentation of TDirectory::GetObjectCheck(const char *namecycle, const TClass *cl) More...
 
virtual voidGetObjectChecked (const char *namecycle, const TClass *cl)
 Return pointer to object identified by namecycle if and only if the actual object is a type suitable to be stored as a pointer to a "expectedClass" If expectedClass is null, no check is performed. More...
 
virtual voidGetObjectUnchecked (const char *namecycle)
 Return pointer to object identified by namecycle. More...
 
virtual Int_t GetBufferSize () const
 
virtual TKeyGetKey (const char *, Short_t=9999) const
 
virtual TListGetList () const
 
virtual TListGetListOfKeys () const
 
virtual TObjectGetMother () const
 
virtual TDirectoryGetMotherDir () const
 
virtual Int_t GetNbytesKeys () const
 
virtual Int_t GetNkeys () const
 
virtual Long64_t GetSeekDir () const
 
virtual Long64_t GetSeekParent () const
 
virtual Long64_t GetSeekKeys () const
 
virtual const char * GetPathStatic () const
 Returns the full path of the directory. More...
 
virtual const char * GetPath () const
 Returns the full path of the directory. More...
 
TUUID GetUUID () const
 
virtual Bool_t IsModified () const
 
virtual Bool_t IsWritable () const
 
virtual TDirectorymkdir (const char *name, const char *title="")
 Create a sub-directory and return a pointer to the created directory. More...
 
virtual TFileOpenFile (const char *, Option_t *="", const char *="", Int_t=1, Int_t=0)
 
virtual void Paint (Option_t *option="")
 Paint all objects in the directory. More...
 
virtual void Print (Option_t *option="") const
 Print all objects in the directory. More...
 
virtual void Purge (Short_t=1)
 
virtual void pwd () const
 Print the path of the directory. More...
 
virtual void ReadAll (Option_t *="")
 
virtual Int_t ReadKeys (Bool_t=kTRUE)
 
virtual Int_t ReadTObject (TObject *, const char *)
 
virtual TObjectRemove (TObject *)
 Remove an object from the in-memory list. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove object from a Directory. More...
 
virtual void rmdir (const char *name)
 Removes subdirectory from the directory When directory is deleted, all keys in all subdirectories will be read first and deleted from file (if exists) Equivalent call is Delete("name;*");. More...
 
virtual void Save ()
 
virtual Int_t SaveObjectAs (const TObject *, const char *="", Option_t *="") const
 Save object in filename, if filename is 0 or "", a file with "objectname.root" is created. More...
 
virtual void SaveSelf (Bool_t=kFALSE)
 
virtual void SetBufferSize (Int_t)
 
virtual void SetModified ()
 
virtual void SetMother (TObject *mother)
 
virtual void SetName (const char *newname)
 Set the name for directory If the directory name is changed after the directory was written once, ROOT currently would NOT change the name of correspondent key in the mother directory. More...
 
virtual void SetTRefAction (TObject *, TObject *)
 
virtual void SetSeekDir (Long64_t)
 
virtual void SetWritable (Bool_t)
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
virtual Int_t Write (const char *=0, Int_t=0, Int_t=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *=0, Int_t=0, Int_t=0) const
 Write this object to the current directory. More...
 
virtual Int_t WriteTObject (const TObject *obj, const char *name=0, Option_t *="", Int_t=0)
 See TDirectoryFile::WriteTObject for details. More...
 
template<class T >
Int_t WriteObject (const T *obj, const char *name, Option_t *option="", Int_t bufsize=0)
 
virtual Int_t WriteObjectAny (const void *, const char *, const char *, Option_t *="", Int_t=0)
 
virtual Int_t WriteObjectAny (const void *, const TClass *, const char *, Option_t *="", Int_t=0)
 
virtual void WriteDirHeader ()
 
virtual void WriteKeys ()
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TString &name, const TString &title)
 
 TNamed (const TNamed &named)
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual ~TNamed ()
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects. More...
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t IsSortable () const
 
virtual void SetNameTitle (const char *name, const char *title)
 Change (i.e. set) all the TNamed parameters (name and title). More...
 
virtual void SetTitle (const char *title="")
 Change (i.e. set) the title of the TNamed. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Static Public Member Functions

static void RegisterModule (const char *modulename, const char **headers, const char **includePaths, const char *payLoadCode, const char *fwdDeclCode, void(*triggerFunc)(), const FwdDeclArgsToKeepCollection_t &fwdDeclsArgToSkip, const char **classesHeaders)
 Called by static dictionary initialization to register clang modules for headers. More...
 
static Int_t DecreaseDirLevel ()
 Decrease the indentation level for ls(). More...
 
static Int_t GetDirLevel ()
 return directory level More...
 
static const char * GetMacroPath ()
 Get macro search path. Static utility function. More...
 
static void SetMacroPath (const char *newpath)
 Set or extend the macro search path. More...
 
static Int_t IncreaseDirLevel ()
 Increase the indentation level for ls(). More...
 
static void IndentLevel ()
 Functions used by ls() to indent an object hierarchy. More...
 
static Bool_t Initialized ()
 Return kTRUE if the TROOT object has been initialized. More...
 
static Bool_t MemCheck ()
 Return kTRUE if the memory leak checker is on. More...
 
static void SetDirLevel (Int_t level=0)
 Return Indentation level for ls(). More...
 
static Int_t ConvertVersionCode2Int (Int_t code)
 Convert version code to an integer, i.e. 331527 -> 51507. More...
 
static Int_t ConvertVersionInt2Code (Int_t v)
 Convert version as an integer to version code as used in RVersion.h. More...
 
static Int_t RootVersionCode ()
 Return ROOT version code as defined in RVersion.h. More...
 
static const char **& GetExtraInterpreterArgs ()
 
static const char * GetTutorialsDir ()
 Get the tutorials directory in the installation. Static utility function. More...
 
- Static Public Member Functions inherited from TDirectory
static void AddDirectory (Bool_t add=kTRUE)
 Sets the flag controlling the automatic add objects like histograms, TGraph2D, etc in memory. More...
 
static Bool_t AddDirectoryStatus ()
 Static function: see TDirectory::AddDirectory for more comments. More...
 
static TDirectory *& CurrentDirectory ()
 Return the current directory for the current thread. More...
 
static Bool_t Cd (const char *path)
 Change current directory to "path". More...
 
static void DecodeNameCycle (const char *namecycle, char *name, Short_t &cycle, const size_t namesize=0)
 Decode a namecycle "aap;2" into name "aap" and cycle "2". More...
 
static void EncodeNameCycle (char *buffer, const char *name, Short_t cycle)
 Encode the name and cycle into buffer like: "aap;2". More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Protected Types

typedef std::atomic< TListOfEnums * > AListOfEnums_t
 

Protected Member Functions

 TROOT ()
 
void InitSystem ()
 Initialize operating system interface. More...
 
void InitThreads ()
 Load and initialize thread library. More...
 
void InitInterpreter ()
 Initialize the interpreter. More...
 
void ReadGitInfo ()
 Read Git commit information and branch name from the etc/gitinfo.txt file. More...
 
voidoperator new (size_t l)
 
voidoperator new (size_t l, void *ptr)
 
TListOfFunctionsGetGlobalFunctions ()
 Internal routine returning, and creating if necessary, the list of global function. More...
 
- Protected Member Functions inherited from TDirectory
Bool_t cd1 (const char *path)
 flag to add histograms, graphs,etc to the directory More...
 
virtual void CleanTargets ()
 Clean the pointers to this object (gDirectory, TContext, etc.). More...
 
void FillFullPath (TString &buf) const
 Recursive method to fill full path for directory. More...
 
void RegisterContext (TContext *ctxt)
 Register a TContext pointing to this TDirectory object. More...
 
void UnregisterContext (TContext *ctxt)
 UnRegister a TContext pointing to this TDirectory object. More...
 
 TDirectory (const TDirectory &directory)
 Copy constructor. More...
 
void operator= (const TDirectory &)
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Protected Attributes

TString fConfigOptions
 
TString fConfigFeatures
 
TString fVersion
 
Int_t fVersionInt
 
Int_t fVersionCode
 
Int_t fVersionDate
 
Int_t fVersionTime
 
Int_t fBuiltDate
 
Int_t fBuiltTime
 
TString fGitCommit
 
TString fGitBranch
 
TString fGitDate
 
Int_t fTimer
 
std::atomic< TApplication * > fApplication
 
TInterpreterfInterpreter
 
Bool_t fBatch
 
Bool_t fEditHistograms
 
Bool_t fFromPopUp
 
Bool_t fMustClean
 
Bool_t fReadingObject
 
Bool_t fForceStyle
 
Bool_t fInterrupt
 
Bool_t fEscape
 
Bool_t fExecutingMacro
 
Int_t fEditorMode
 
const TObjectfPrimitive
 
TVirtualPadfSelectPad
 
TCollectionfClasses
 
TCollectionfTypes
 
TListOfFunctionTemplatesfFuncTemplate
 
TListOfDataMembersfGlobals
 
TListOfFunctionsfGlobalFunctions
 
TSeqCollectionfClosedObjects
 
TSeqCollectionfFiles
 
TSeqCollectionfMappedFiles
 
TSeqCollectionfSockets
 
TSeqCollectionfCanvases
 
TSeqCollectionfStyles
 
TCollectionfFunctions
 
TSeqCollectionfTasks
 
TSeqCollectionfColors
 
TSeqCollectionfGeometries
 
TSeqCollectionfBrowsers
 
TSeqCollectionfSpecials
 
TSeqCollectionfCleanups
 
TSeqCollectionfMessageHandlers
 
TSeqCollectionfStreamerInfo
 
TCollectionfClassGenerators
 
TSeqCollectionfSecContexts
 
TSeqCollectionfProofs
 
TSeqCollectionfClipboard
 
TSeqCollectionfDataSets
 
AListOfEnums_t fEnums
 
TProcessUUIDfUUIDs
 
TFolderfRootFolder
 
TListfBrowsables
 
TPluginManagerfPluginManager
 
TString fCutClassName
 
TString fDefCanvasName
 
- Protected Attributes inherited from TDirectory
TObjectfMother
 
TListfList
 
TUUID fUUID
 
TString fPathBuffer
 
TContextfContext
 Buffer for GetPath() function. More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Private Member Functions

 TROOT (const TROOT &)
 
TROOToperator= (const TROOT &)
 

Private Attributes

Int_t fLineIsProcessing
 

Static Private Attributes

static Int_t fgDirLevel = 0
 
static Bool_t fgRootInit = kFALSE
 
static Bool_t fgMemCheck = kFALSE
 

Friends

class TCling
 
class ::ROOT::Internal::TROOTAllocator
 
TROOTROOT::Internal::GetROOT2 ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from TDirectory
static Bool_t Cd1 (const char *path)
 Change current directory to "path". More...
 
- Static Protected Attributes inherited from TDirectory
static Bool_t fgAddDirectory = kTRUE
 Pointer to a list of TContext object pointing to this TDirectory. More...
 

#include <TROOT.h>

+ Inheritance diagram for TROOT:
+ Collaboration diagram for TROOT:

Member Typedef Documentation

typedef std::atomic<TListOfEnums*> TROOT::AListOfEnums_t
protected

Definition at line 96 of file TROOT.h.

typedef std::vector<std::pair<std::string, int> > TROOT::FwdDeclArgsToKeepCollection_t

Definition at line 172 of file TROOT.h.

Constructor & Destructor Documentation

TROOT::TROOT ( const TROOT )
private
TROOT::TROOT ( )
protected
TROOT::TROOT ( const char *  name,
const char *  title,
VoidFuncPtr_t initfunc = 0 
)

Initialize the ROOT system.

The creation of the TROOT object initializes the ROOT system. It must be the first ROOT related action that is performed by a program. The TROOT object must be created on the stack (can not be called via new since "operator new" is protected). The TROOT object is either created as a global object (outside the main() program), or it is one of the first objects created in main(). Make sure that the TROOT object stays in scope for as long as ROOT related actions are performed. TROOT is a so called singleton so only one instance of it can be created. The single TROOT object can always be accessed via the global pointer gROOT. The name and title arguments can be used to identify the running application. The initfunc argument can contain an array of function pointers (last element must be 0). These functions are executed at the end of the constructor. This way one can easily extend the ROOT system without adding permanent dependencies (e.g. the graphics system is initialized via such a function).

Definition at line 454 of file TROOT.cxx.

TROOT::~TROOT ( )
virtual

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

Definition at line 661 of file TROOT.cxx.

Referenced by at_exit_of_TROOT().

Member Function Documentation

void TROOT::AddClass ( TClass cl)

Add a class to the list and map of classes.

This routine is deprecated, use TClass::AddClass directly.

Definition at line 786 of file TROOT.cxx.

void TROOT::AddClassGenerator ( TClassGenerator generator)

Add a class generator.

This generator will be called by TClass::GetClass in case its does not find a loaded rootcint dictionary to request the creation of a TClass object.

Definition at line 796 of file TROOT.cxx.

void TROOT::Browse ( TBrowser b)
virtual

Add browsable objects to TBrowser.

Reimplemented from TDirectory.

Definition at line 805 of file TROOT.cxx.

Bool_t TROOT::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.

Definition at line 824 of file TROOT.cxx.

void TROOT::CloseFiles ( )

Close any files and sockets that gROOT knows about.

This can be used to insures that the files and sockets are closed before any library is unloaded!

Definition at line 870 of file TROOT.cxx.

Referenced by EndOfProcessCleanups().

Int_t TROOT::ConvertVersionCode2Int ( Int_t  code)
static

Convert version code to an integer, i.e. 331527 -> 51507.

Definition at line 2493 of file TROOT.cxx.

Referenced by TSystem::Load().

Int_t TROOT::ConvertVersionInt2Code ( Int_t  v)
static

Convert version as an integer to version code as used in RVersion.h.

Definition at line 2501 of file TROOT.cxx.

Int_t TROOT::DecreaseDirLevel ( )
static
void TROOT::EndOfProcessCleanups ( )

Execute the cleanups necessary at the end of the process, in particular those that must be executed before the library start being unloaded.

Definition at line 948 of file TROOT.cxx.

TObject * TROOT::FindObject ( const char *  name) const
virtual

Returns address of a ROOT object if it exists.

If name contains at least one "/" the function calls FindObjectany else 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

Reimplemented from TDirectory.

Definition at line 996 of file TROOT.cxx.

Referenced by FindObjectClassName().

TObject * TROOT::FindObject ( const TObject obj) const
virtual

Find an object in one Root folder.

Reimplemented from TDirectory.

Definition at line 970 of file TROOT.cxx.

TObject * TROOT::FindObjectAny ( const char *  name) const
virtual

Return a pointer to the first object with name starting at //root.

This function scans the list of all folders. if no object found in folders, it scans the memory list of all files.

Reimplemented from TDirectory.

Definition at line 1106 of file TROOT.cxx.

Referenced by FindObject().

TObject * TROOT::FindObjectAnyFile ( const char *  name) const
virtual

Scan the memory lists of all files for an object with name.

Reimplemented from TDirectory.

Definition at line 1116 of file TROOT.cxx.

const char * TROOT::FindObjectClassName ( const char *  name) const

Returns class name of a ROOT object including CINT globals.

Definition at line 1133 of file TROOT.cxx.

const char * TROOT::FindObjectPathName ( const TObject obj) const

Return path name of obj somewhere in the //root/...

path. The function returns the first occurence of the object in the list of folders. The returned string points to a static char array in TROOT. If this function is called in a loop or recursively, it is the user's responsibility to copy this string in their area.

Definition at line 1153 of file TROOT.cxx.

TObject * TROOT::FindSpecialObject ( const char *  name,
void *&  where 
)

Returns address and folder 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

Definition at line 1047 of file TROOT.cxx.

TClass * TROOT::FindSTLClass ( const char *  name,
Bool_t  load,
Bool_t  silent = kFALSE 
) const

return a TClass object corresponding to 'name' assuming it is an STL container.

In particular we looking for possible alternative name (default template parameter, typedefs template arguments, typedefed name).

Definition at line 1164 of file TROOT.cxx.

void TROOT::ForceStyle ( Bool_t  force = kTRUE)
inline

Definition at line 190 of file TROOT.h.

Bool_t TROOT::FromPopUp ( ) const
inline

Definition at line 191 of file TROOT.h.

TApplication* TROOT::GetApplication ( ) const
inline

Definition at line 193 of file TROOT.h.

Int_t TROOT::GetBuiltDate ( ) const
inline

Definition at line 205 of file TROOT.h.

Int_t TROOT::GetBuiltTime ( ) const
inline

Definition at line 206 of file TROOT.h.

TClass * TROOT::GetClass ( const char *  name,
Bool_t  load = kTRUE,
Bool_t  silent = kFALSE 
) const

Return pointer to class with name. Obsolete, use TClass::GetClass directly.

Definition at line 1198 of file TROOT.cxx.

TClass * TROOT::GetClass ( const type_info &  typeinfo,
Bool_t  load = kTRUE,
Bool_t  silent = kFALSE 
) const

Return pointer to class from its name.

Obsolete, use TClass::GetClass directly See TClass::GetClass

Definition at line 1208 of file TROOT.cxx.

TSeqCollection* TROOT::GetClipboard ( ) const
inline

Definition at line 238 of file TROOT.h.

TColor * TROOT::GetColor ( Int_t  color) const

Return address of color with index color.

Definition at line 1216 of file TROOT.cxx.

const char* TROOT::GetConfigFeatures ( ) const
inline

Definition at line 199 of file TROOT.h.

const char* TROOT::GetConfigOptions ( ) const
inline

Definition at line 198 of file TROOT.h.

const char* TROOT::GetCutClassName ( ) const
inline

Definition at line 200 of file TROOT.h.

const char* TROOT::GetDefCanvasName ( ) const
inline

Definition at line 201 of file TROOT.h.

Int_t TROOT::GetDirLevel ( )
static

return directory level

Definition at line 2398 of file TROOT.cxx.

Referenced by TDataSet::PrintContents().

Bool_t TROOT::GetEditHistograms ( ) const
inline

Definition at line 202 of file TROOT.h.

Int_t TROOT::GetEditorMode ( ) const
inline

Definition at line 203 of file TROOT.h.

const char **& TROOT::GetExtraInterpreterArgs ( )
static

Definition at line 2519 of file TROOT.cxx.

Referenced by TCling::TCling().

TFile* TROOT::GetFile ( ) const
inlinevirtual

Reimplemented from TDirectory.

Definition at line 244 of file TROOT.h.

TFile * TROOT::GetFile ( const char *  name) const

Return pointer to file with name.

Definition at line 1250 of file TROOT.cxx.

Bool_t TROOT::GetForceStyle ( ) const
inline

Definition at line 204 of file TROOT.h.

TObject * TROOT::GetFunction ( const char *  name) const

Return pointer to function with name.

Definition at line 1267 of file TROOT.cxx.

TFunctionTemplate * TROOT::GetFunctionTemplate ( const char *  name)

Definition at line 1287 of file TROOT.cxx.

TObject * TROOT::GetGeometry ( const char *  name) const

Return pointer to Geometry with name.

Definition at line 1416 of file TROOT.cxx.

const char* TROOT::GetGitBranch ( ) const
inline

Definition at line 208 of file TROOT.h.

const char* TROOT::GetGitCommit ( ) const
inline

Definition at line 207 of file TROOT.h.

const char * TROOT::GetGitDate ( )

Return date/time make was run.

Definition at line 2142 of file TROOT.cxx.

TGlobal * TROOT::GetGlobal ( const char *  name,
Bool_t  load = kFALSE 
) const

Return pointer to global variable by name.

If load is true force reading of all currently defined globals from CINT (more expensive).

Definition at line 1300 of file TROOT.cxx.

Referenced by FindObjectClassName().

TGlobal * TROOT::GetGlobal ( const TObject obj,
Bool_t  load = kFALSE 
) const

Return pointer to global variable with address addr.

Definition at line 1308 of file TROOT.cxx.

TFunction * TROOT::GetGlobalFunction ( const char *  function,
const char *  params = 0,
Bool_t  load = kFALSE 
)

Return pointer to global function by name.

If params != 0 it will also resolve overloading other it returns the first name match. If params == 0 and load is true force reading of all currently defined global functions from Cling. The param string must be of the form: "3189,\"aap",1.3".

Definition at line 1354 of file TROOT.cxx.

TListOfFunctions * TROOT::GetGlobalFunctions ( )
protected

Internal routine returning, and creating if necessary, the list of global function.

Definition at line 1332 of file TROOT.cxx.

Referenced by GetGlobalFunction(), and GetGlobalFunctionWithPrototype().

TFunction * TROOT::GetGlobalFunctionWithPrototype ( const char *  function,
const char *  proto = 0,
Bool_t  load = kFALSE 
)

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".

Definition at line 1387 of file TROOT.cxx.

TInterpreter* TROOT::GetInterpreter ( ) const
inline

Definition at line 194 of file TROOT.h.

TList* TROOT::GetListOfBrowsables ( ) const
inline

Definition at line 242 of file TROOT.h.

TSeqCollection* TROOT::GetListOfBrowsers ( ) const
inline

Definition at line 229 of file TROOT.h.

Referenced by RefreshBrowsers().

TSeqCollection* TROOT::GetListOfCanvases ( ) const
inline

Definition at line 224 of file TROOT.h.

TCollection* TROOT::GetListOfClasses ( ) const
inline

Definition at line 215 of file TROOT.h.

Referenced by ROOT::TGenericClassInfo::~TGenericClassInfo().

TCollection* TROOT::GetListOfClassGenerators ( ) const
inline

Definition at line 235 of file TROOT.h.

TSeqCollection* TROOT::GetListOfCleanups ( ) const
inline

Definition at line 232 of file TROOT.h.

Referenced by TList::Clear(), TObjArray::Delete(), TList::Delete(), and TObject::~TObject().

TSeqCollection* TROOT::GetListOfClosedObjects ( ) const
inline

Definition at line 220 of file TROOT.h.

TSeqCollection* TROOT::GetListOfColors ( ) const
inline

Definition at line 216 of file TROOT.h.

Referenced by GetColor().

TSeqCollection* TROOT::GetListOfDataSets ( ) const
inline

Definition at line 239 of file TROOT.h.

TCollection * TROOT::GetListOfEnums ( Bool_t  load = kFALSE)

Definition at line 1423 of file TROOT.cxx.

TSeqCollection* TROOT::GetListOfFiles ( ) const
inline

Definition at line 221 of file TROOT.h.

Referenced by FindObjectAnyFile(), and GetFile().

TCollection * TROOT::GetListOfFunctionOverloads ( const char *  name) const

Return the collection of functions named "name".

Definition at line 1341 of file TROOT.cxx.

TCollection* TROOT::GetListOfFunctions ( ) const
inline

Definition at line 226 of file TROOT.h.

TCollection * TROOT::GetListOfFunctionTemplates ( )

Definition at line 1440 of file TROOT.cxx.

TSeqCollection* TROOT::GetListOfGeometries ( ) const
inline

Definition at line 228 of file TROOT.h.

Referenced by GetGeometry().

TCollection * TROOT::GetListOfGlobalFunctions ( Bool_t  load = kFALSE)

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).

Definition at line 1492 of file TROOT.cxx.

Referenced by GetGlobalFunction(), and GetGlobalFunctionWithPrototype().

TCollection * TROOT::GetListOfGlobals ( Bool_t  load = kFALSE)

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).

Definition at line 1457 of file TROOT.cxx.

TSeqCollection* TROOT::GetListOfMappedFiles ( ) const
inline

Definition at line 222 of file TROOT.h.

TSeqCollection* TROOT::GetListOfMessageHandlers ( ) const
inline

Definition at line 234 of file TROOT.h.

TSeqCollection* TROOT::GetListOfProofs ( ) const
inline

Definition at line 237 of file TROOT.h.

TSeqCollection* TROOT::GetListOfSecContexts ( ) const
inline

Definition at line 236 of file TROOT.h.

TSeqCollection* TROOT::GetListOfSockets ( ) const
inline

Definition at line 223 of file TROOT.h.

TSeqCollection* TROOT::GetListOfSpecials ( ) const
inline

Definition at line 230 of file TROOT.h.

TSeqCollection* TROOT::GetListOfStreamerInfo ( ) const
inline

Definition at line 233 of file TROOT.h.

TSeqCollection* TROOT::GetListOfStyles ( ) const
inline

Definition at line 225 of file TROOT.h.

Referenced by GetStyle().

TSeqCollection* TROOT::GetListOfTasks ( ) const
inline

Definition at line 231 of file TROOT.h.

TCollection * TROOT::GetListOfTypes ( Bool_t  load = kFALSE)

Return a dynamic list giving access to all TDataTypes (typedefs) currently defined.

The list is populated on demand. Calling

gROOT->GetListOfTypes()->FindObject(nameoftype);

will return the TDataType corresponding to 'nameoftype'. If the TDataType is not already in the list itself and the type does exist, a new TDataType will be created and added to the list.

Calling

gROOT->GetListOfTypes()->ls(); // or Print()

list only the typedefs that have been previously accessed through the list (plus the builtins types).

Definition at line 1531 of file TROOT.cxx.

const char * TROOT::GetMacroPath ( )
static
Int_t TROOT::GetNclasses ( ) const
inline

Definition at line 256 of file TROOT.h.

Int_t TROOT::GetNtypes ( ) const
inline

Definition at line 257 of file TROOT.h.

TPluginManager* TROOT::GetPluginManager ( ) const
inline

Definition at line 192 of file TROOT.h.

TFolder* TROOT::GetRootFolder ( ) const
inline

Definition at line 258 of file TROOT.h.

TVirtualPad* TROOT::GetSelectedPad ( ) const
inline

Definition at line 255 of file TROOT.h.

const TObject* TROOT::GetSelectedPrimitive ( ) const
inline

Definition at line 254 of file TROOT.h.

TStyle * TROOT::GetStyle ( const char *  name) const

Return pointer to style with name.

Definition at line 1259 of file TROOT.cxx.

Referenced by SetStyle().

const char * TROOT::GetTutorialsDir ( )
static

Get the tutorials directory in the installation. Static utility function.

Definition at line 2527 of file TROOT.cxx.

TDataType * TROOT::GetType ( const char *  name,
Bool_t  load = kFALSE 
) const

Return pointer to type with name.

Definition at line 1242 of file TROOT.cxx.

TProcessUUID* TROOT::GetUUIDs ( ) const
inline

Definition at line 259 of file TROOT.h.

const char* TROOT::GetVersion ( ) const
inline

Definition at line 214 of file TROOT.h.

Int_t TROOT::GetVersionCode ( ) const
inline

Definition at line 213 of file TROOT.h.

Int_t TROOT::GetVersionDate ( ) const
inline

Definition at line 210 of file TROOT.h.

Int_t TROOT::GetVersionInt ( ) const
inline

Definition at line 212 of file TROOT.h.

Int_t TROOT::GetVersionTime ( ) const
inline

Definition at line 211 of file TROOT.h.

void TROOT::Idle ( UInt_t  idleTimeInSec,
const char *  command = 0 
)

Execute command when system has been idle for idleTimeInSec seconds.

Definition at line 1543 of file TROOT.cxx.

Int_t TROOT::IgnoreInclude ( const char *  fname,
const char *  expandedfname 
)

Return 1 if the name of the given include file corresponds to a class that is known to ROOT, e.g.

"TLorentzVector.h" versus TLorentzVector.

Definition at line 1579 of file TROOT.cxx.

Int_t TROOT::IncreaseDirLevel ( )
static
TROOT::IndentLevel ( )
static
Bool_t TROOT::Initialized ( )
static
void TROOT::InitInterpreter ( )
protected

Initialize the interpreter.

Should be called only after main(), to make sure LLVM/Clang is fully initialized.

Definition at line 1705 of file TROOT.cxx.

Referenced by ROOT::Internal::GetROOT2().

void TROOT::InitSystem ( )
protected

Initialize operating system interface.

Definition at line 1629 of file TROOT.cxx.

Referenced by TROOT().

void TROOT::InitThreads ( )
protected

Load and initialize thread library.

Definition at line 1694 of file TROOT.cxx.

Referenced by ROOT::Internal::GetROOT2().

Bool_t TROOT::IsBatch ( ) const
inline

Definition at line 262 of file TROOT.h.

Bool_t TROOT::IsEscaped ( ) const
inline

Definition at line 266 of file TROOT.h.

Bool_t TROOT::IsExecutingMacro ( ) const
inline

Definition at line 263 of file TROOT.h.

Referenced by Reset().

Bool_t TROOT::IsFolder ( ) const
inlinevirtual

Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).

Reimplemented from TDirectory.

Definition at line 264 of file TROOT.h.

Bool_t TROOT::IsInterrupted ( ) const
inline

Definition at line 265 of file TROOT.h.

Bool_t TROOT::IsLineProcessing ( ) const
inline

Definition at line 267 of file TROOT.h.

Bool_t TROOT::IsProofServ ( ) const
inline

Definition at line 268 of file TROOT.h.

Bool_t TROOT::IsRootFile ( const char *  filename) const

Return true if the file is local and is (likely) to be a ROOT file.

Definition at line 1877 of file TROOT.cxx.

Int_t TROOT::LoadClass ( const char *  classname,
const char *  libname,
Bool_t  check = kFALSE 
)

Check if class "classname" is known to the interpreter (in fact, this check is not needed anymore, so classname is ignored).

If not it will load library "libname". If the library name does not start with "lib", "lib" will be prepended and a search will be made in the DynamicPath (see .rootrc). If not found a search will be made on libname (without "lib" prepended) and if not found a direct try of libname will be made (in case it contained an absolute path). If check is true it will only check if libname exists and is readable. Returns 0 on successful loading, -1 in case libname does not exist or in case of error and -2 in case of version mismatch.

Definition at line 1829 of file TROOT.cxx.

TClass * TROOT::LoadClass ( const char *  requestedname,
Bool_t  silent = kFALSE 
) const

Helper function used by TClass::GetClass().

This function attempts to load the dictionary for 'classname' either from the TClassTable or from the list of generator. If silent is 'true', do not warn about missing dictionary for the class. (typically used for class that are used only for transient members)

The 'requestedname' is expected to be already normalized.

Definition at line 1810 of file TROOT.cxx.

Int_t TROOT::LoadMacro ( const char *  filename,
Int_t error = 0,
Bool_t  check = kFALSE 
)

Load a macro in the interpreter's memory.

Equivalent to the command line command ".L filename". If the filename has "+" or "++" appended the macro will be compiled by ACLiC. The filename must have the format: [path/]macro.C[+|++[g|O]]. The possible error codes are defined by TInterpreter::EErrorCode. If check is true it will only check if filename exists and is readable. Returns 0 on successful loading and -1 in case filename does not exist or in case of error.

Definition at line 1915 of file TROOT.cxx.

void TROOT::ls ( Option_t option = "") const
virtual

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.

Reimplemented from TDirectory.

Definition at line 1897 of file TROOT.cxx.

Long_t TROOT::Macro ( const char *  filename,
Int_t error = 0,
Bool_t  padUpdate = kTRUE 
)

Execute a macro in the interpreter.

Equivalent to the command line command ".x filename". If the filename has "+" or "++" appended the macro will be compiled by ACLiC. The filename must have the format: [path/]macro.C[+|++[g|O]][(args)]. The possible error codes are defined by TInterpreter::EErrorCode. If padUpdate is true (default) update the current pad. Returns the macro return value.

Definition at line 1963 of file TROOT.cxx.

TCanvas * TROOT::MakeDefCanvas ( ) const

Return a default canvas.

Definition at line 1234 of file TROOT.cxx.

Bool_t TROOT::MemCheck ( )
static

Return kTRUE if the memory leak checker is on.

Definition at line 2477 of file TROOT.cxx.

Referenced by TStorage::ReAlloc().

void TROOT::Message ( Int_t  id,
const TObject obj 
)

Process message id called by obj.

Definition at line 1997 of file TROOT.cxx.

Bool_t TROOT::MustClean ( ) const
inline

Definition at line 277 of file TROOT.h.

Referenced by TObject::~TObject().

void* TROOT::operator new ( size_t  l)
inlineprotected

Definition at line 163 of file TROOT.h.

void* TROOT::operator new ( size_t  l,
void ptr 
)
inlineprotected

Definition at line 164 of file TROOT.h.

TROOT& TROOT::operator= ( const TROOT )
private
Long_t TROOT::ProcessLine ( const char *  line,
Int_t error = 0 
)

Process interpreter command via TApplication::ProcessLine().

On Win32 the line will be processed asynchronously by sending it to the CINT interpreter thread. For explicit synchronous processing use ProcessLineSync(). On non-Win32 platforms there is no difference between ProcessLine() and ProcessLineSync(). The possible error codes are defined by TInterpreter::EErrorCode. In particular, error will equal to TInterpreter::kProcessing until the CINT interpreted thread has finished executing the line. Returns the result of the command, cast to a Long_t.

Definition at line 2017 of file TROOT.cxx.

Long_t TROOT::ProcessLineFast ( const char *  line,
Int_t error = 0 
)

Process interpreter command directly via CINT interpreter.

Only executable statements are allowed (no variable declarations), In all other cases use TROOT::ProcessLine(). The possible error codes are defined by TInterpreter::EErrorCode.

Definition at line 2054 of file TROOT.cxx.

Long_t TROOT::ProcessLineSync ( const char *  line,
Int_t error = 0 
)

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 no difference between ProcessLine() and ProcessLineSync(). The possible error codes are defined by TInterpreter::EErrorCode. Returns the result of the command, cast to a Long_t.

Definition at line 2037 of file TROOT.cxx.

void TROOT::ReadGitInfo ( )
protected

Read Git commit information and branch name from the etc/gitinfo.txt file.

Definition at line 2076 of file TROOT.cxx.

Referenced by TROOT().

Bool_t TROOT::ReadingObject ( ) const

Deprecated (will be removed in next release).

Definition at line 2128 of file TROOT.cxx.

void TROOT::RefreshBrowsers ( )

Refresh all browsers.

Call this method when some command line command or script has changed the browser contents. Not needed for objects that have the kMustCleanup bit set. Most useful to update browsers that show the file system or other objects external to the running ROOT session.

Definition at line 2167 of file TROOT.cxx.

void TROOT::RegisterModule ( const char *  modulename,
const char **  headers,
const char **  includePaths,
const char *  payloadCode,
const char *  fwdDeclCode,
void(*)()  triggerFunc,
const FwdDeclArgsToKeepCollection_t fwdDeclsArgToSkip,
const char **  classesHeaders 
)
static

Called by static dictionary initialization to register clang modules for headers.

Calls TCling::RegisterModule() unless gCling is NULL, i.e. during startup, where the information is buffered in the static GetModuleHeaderInfoBuffer().

Definition at line 2190 of file TROOT.cxx.

void TROOT::RemoveClass ( TClass oldcl)

Remove a class from the list and map of classes.

This routine is deprecated, use TClass::RemoveClass directly.

Definition at line 2272 of file TROOT.cxx.

void TROOT::Reset ( Option_t option = "")

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 an unnamed macro to clean the environment.

IMPORTANT WARNING: Do not use this call from within any function (neither compiled nor interpreted. This should only be used from a unnamed macro (which starts with a { (curly braces) ). For example, using TROOT::Reset from within an interpreted function will lead to the unloading of the dictionary and source file, including the one defining the function being executed.

Definition at line 2295 of file TROOT.cxx.

Int_t TROOT::RootVersionCode ( )
static

Return ROOT version code as defined in RVersion.h.

Definition at line 2512 of file TROOT.cxx.

Referenced by TVersionCheck::TVersionCheck().

void TROOT::SaveContext ( )

Save the current interpreter context.

Definition at line 2315 of file TROOT.cxx.

Referenced by Reset().

void TROOT::SetApplication ( TApplication app)
inline

Definition at line 294 of file TROOT.h.

void TROOT::SetBatch ( Bool_t  batch = kTRUE)
inline

Definition at line 295 of file TROOT.h.

void TROOT::SetCutClassName ( const char *  name = "TCutG")

Set the default graphical cut class name for the graphics editor By default the graphics editor creates an instance of a class TCutG.

This function may be called to specify a different class that MUST derive from TCutG

Definition at line 2327 of file TROOT.cxx.

void TROOT::SetDefCanvasName ( const char *  name = "c1")
inline

Definition at line 297 of file TROOT.h.

void TROOT::SetDirLevel ( Int_t  level = 0)
static

Return Indentation level for ls().

Definition at line 2485 of file TROOT.cxx.

void TROOT::SetEditHistograms ( Bool_t  flag = kTRUE)
inline

Definition at line 298 of file TROOT.h.

void TROOT::SetEditorMode ( const char *  mode = "")

Set editor mode.

Definition at line 2348 of file TROOT.cxx.

void TROOT::SetEscape ( Bool_t  flag = kTRUE)
inline

Definition at line 303 of file TROOT.h.

void TROOT::SetExecutingMacro ( Bool_t  flag = kTRUE)
inline

Definition at line 300 of file TROOT.h.

void TROOT::SetFromPopUp ( Bool_t  flag = kTRUE)
inline

Definition at line 301 of file TROOT.h.

void TROOT::SetInterrupt ( Bool_t  flag = kTRUE)
inline

Definition at line 302 of file TROOT.h.

void TROOT::SetLineHasBeenProcessed ( )
inline

Definition at line 305 of file TROOT.h.

void TROOT::SetLineIsProcessing ( )
inline

Definition at line 304 of file TROOT.h.

void TROOT::SetMacroPath ( const char *  newpath)
static

Set or extend the macro search path.

Static utility function. If newpath=0 or "" reset to value specified in the rootrc file.

Definition at line 2440 of file TROOT.cxx.

Referenced by TProofLite::CopyMacroToCache(), TProof::Load(), and TProofPlayerRemote::SendSelector().

void TROOT::SetMustClean ( Bool_t  flag = kTRUE)
inline

Definition at line 307 of file TROOT.h.

void TROOT::SetReadingObject ( Bool_t  flag = kTRUE)

Definition at line 2133 of file TROOT.cxx.

void TROOT::SetSelectedPad ( TVirtualPad pad)
inline

Definition at line 309 of file TROOT.h.

void TROOT::SetSelectedPrimitive ( const TObject obj)
inline

Definition at line 308 of file TROOT.h.

void TROOT::SetStyle ( const char *  stylename = "Default")

Change current style to style with name stylename.

Definition at line 2374 of file TROOT.cxx.

Referenced by TROOT().

void TROOT::Time ( Int_t  casetime = 1)
inline

Definition at line 311 of file TROOT.h.

Int_t TROOT::Timer ( ) const
inline

Definition at line 312 of file TROOT.h.

Friends And Related Function Documentation

friend class ::ROOT::Internal::TROOTAllocator
friend

Definition at line 166 of file TROOT.h.

friend class TCling
friend

Definition at line 82 of file TROOT.h.

Member Data Documentation

std::atomic<TApplication*> TROOT::fApplication
protected

Definition at line 111 of file TROOT.h.

Referenced by GetApplication(), Idle(), ProcessLine(), ProcessLineFast(), ProcessLineSync(), and TROOT().

Bool_t TROOT::fBatch
protected

Definition at line 113 of file TROOT.h.

Referenced by IsBatch(), and TROOT().

TList* TROOT::fBrowsables
protected

Definition at line 153 of file TROOT.h.

Referenced by Browse(), GetListOfBrowsables(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fBrowsers
protected

Definition at line 140 of file TROOT.h.

Referenced by EndOfProcessCleanups(), GetListOfBrowsers(), TROOT(), and ~TROOT().

Int_t TROOT::fBuiltDate
protected

Definition at line 105 of file TROOT.h.

Referenced by GetBuiltDate(), and TROOT().

Int_t TROOT::fBuiltTime
protected

Definition at line 106 of file TROOT.h.

Referenced by GetBuiltTime(), and TROOT().

TSeqCollection* TROOT::fCanvases
protected
TCollection* TROOT::fClasses
protected

Definition at line 125 of file TROOT.h.

Referenced by GetListOfClasses(), TROOT(), and ~TROOT().

TCollection* TROOT::fClassGenerators
protected

Definition at line 145 of file TROOT.h.

Referenced by AddClassGenerator(), GetListOfClassGenerators(), and TROOT().

TSeqCollection* TROOT::fCleanups
protected

Definition at line 142 of file TROOT.h.

Referenced by CloseFiles(), GetListOfCleanups(), InitInterpreter(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fClipboard
protected

Definition at line 148 of file TROOT.h.

Referenced by GetClipboard(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fClosedObjects
protected

Definition at line 130 of file TROOT.h.

Referenced by CloseFiles(), GetListOfClosedObjects(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fColors
protected

Definition at line 138 of file TROOT.h.

Referenced by EndOfProcessCleanups(), GetListOfColors(), TROOT(), and ~TROOT().

TString TROOT::fConfigFeatures
protected

Definition at line 99 of file TROOT.h.

Referenced by GetConfigFeatures(), and TROOT().

TString TROOT::fConfigOptions
protected

Definition at line 98 of file TROOT.h.

Referenced by GetConfigOptions(), and TROOT().

TString TROOT::fCutClassName
protected

Definition at line 155 of file TROOT.h.

Referenced by GetCutClassName(), SetCutClassName(), and TROOT().

TSeqCollection* TROOT::fDataSets
protected

Definition at line 149 of file TROOT.h.

Referenced by GetListOfDataSets(), TROOT(), and ~TROOT().

TString TROOT::fDefCanvasName
protected

Definition at line 156 of file TROOT.h.

Referenced by GetDefCanvasName(), and TROOT().

Bool_t TROOT::fEditHistograms
protected

Definition at line 114 of file TROOT.h.

Referenced by GetEditHistograms(), and TROOT().

Int_t TROOT::fEditorMode
protected

Definition at line 122 of file TROOT.h.

Referenced by GetEditorMode(), SetEditorMode(), and TROOT().

AListOfEnums_t TROOT::fEnums
protected

Definition at line 150 of file TROOT.h.

Referenced by GetListOfEnums(), TROOT(), and ~TROOT().

Bool_t TROOT::fEscape
protected

Definition at line 120 of file TROOT.h.

Referenced by IsEscaped(), and TROOT().

Bool_t TROOT::fExecutingMacro
protected

Definition at line 121 of file TROOT.h.

Referenced by IsExecutingMacro(), and TROOT().

TSeqCollection* TROOT::fFiles
protected

Definition at line 131 of file TROOT.h.

Referenced by CloseFiles(), FindObject(), FindSpecialObject(), GetListOfFiles(), TROOT(), and ~TROOT().

Bool_t TROOT::fForceStyle
protected

Definition at line 118 of file TROOT.h.

Referenced by GetForceStyle(), and TROOT().

Bool_t TROOT::fFromPopUp
protected

Definition at line 115 of file TROOT.h.

Referenced by FromPopUp(), and TROOT().

TListOfFunctionTemplates* TROOT::fFuncTemplate
protected

Definition at line 127 of file TROOT.h.

Referenced by GetFunctionTemplate(), and GetListOfFunctionTemplates().

TCollection* TROOT::fFunctions
protected
Int_t TROOT::fgDirLevel = 0
staticprivate

Definition at line 88 of file TROOT.h.

Referenced by DecreaseDirLevel(), GetDirLevel(), IncreaseDirLevel(), IndentLevel(), and SetDirLevel().

TSeqCollection* TROOT::fGeometries
protected
TString TROOT::fGitBranch
protected

Definition at line 108 of file TROOT.h.

Referenced by GetGitBranch(), and ReadGitInfo().

TString TROOT::fGitCommit
protected

Definition at line 107 of file TROOT.h.

Referenced by GetGitCommit(), and ReadGitInfo().

TString TROOT::fGitDate
protected

Definition at line 109 of file TROOT.h.

Referenced by GetGitDate(), and ReadGitInfo().

TListOfFunctions* TROOT::fGlobalFunctions
protected

Definition at line 129 of file TROOT.h.

Referenced by GetGlobalFunctions(), GetListOfGlobalFunctions(), Reset(), TROOT(), and ~TROOT().

TListOfDataMembers* TROOT::fGlobals
protected

Definition at line 128 of file TROOT.h.

Referenced by GetListOfGlobals(), Reset(), TROOT(), and ~TROOT().

Bool_t TROOT::fgMemCheck = kFALSE
staticprivate

Definition at line 90 of file TROOT.h.

Referenced by InitSystem(), and MemCheck().

Bool_t TROOT::fgRootInit = kFALSE
staticprivate

Definition at line 89 of file TROOT.h.

Referenced by Initialized(), InitInterpreter(), TROOT(), and ~TROOT().

TInterpreter* TROOT::fInterpreter
protected
Bool_t TROOT::fInterrupt
protected

Definition at line 119 of file TROOT.h.

Referenced by IsInterrupted(), and TROOT().

Int_t TROOT::fLineIsProcessing
private

Definition at line 86 of file TROOT.h.

Referenced by TROOT().

TSeqCollection* TROOT::fMappedFiles
protected

Definition at line 132 of file TROOT.h.

Referenced by CloseFiles(), FindObject(), FindSpecialObject(), GetListOfMappedFiles(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fMessageHandlers
protected

Definition at line 143 of file TROOT.h.

Referenced by GetListOfMessageHandlers(), Message(), TROOT(), and ~TROOT().

Bool_t TROOT::fMustClean
protected

Definition at line 116 of file TROOT.h.

Referenced by MustClean(), and TROOT().

TPluginManager* TROOT::fPluginManager
protected

Definition at line 154 of file TROOT.h.

Referenced by GetPluginManager(), TROOT(), and ~TROOT().

const TObject* TROOT::fPrimitive
protected

Definition at line 123 of file TROOT.h.

Referenced by GetSelectedPrimitive(), and TROOT().

TSeqCollection* TROOT::fProofs
protected

Definition at line 147 of file TROOT.h.

Referenced by GetListOfProofs(), TROOT(), and ~TROOT().

Bool_t TROOT::fReadingObject
protected

Definition at line 117 of file TROOT.h.

Referenced by TROOT().

TFolder* TROOT::fRootFolder
protected

Definition at line 152 of file TROOT.h.

Referenced by FindObjectAny(), GetRootFolder(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fSecContexts
protected

Definition at line 146 of file TROOT.h.

Referenced by GetListOfSecContexts(), TROOT(), and ~TROOT().

TVirtualPad* TROOT::fSelectPad
protected

Definition at line 124 of file TROOT.h.

Referenced by GetSelectedPad(), and TROOT().

TSeqCollection* TROOT::fSockets
protected

Definition at line 133 of file TROOT.h.

Referenced by CloseFiles(), GetListOfSockets(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fSpecials
protected

Definition at line 141 of file TROOT.h.

Referenced by FindObject(), FindSpecialObject(), GetListOfSpecials(), TROOT(), and ~TROOT().

TSeqCollection* TROOT::fStreamerInfo
protected

Definition at line 144 of file TROOT.h.

Referenced by GetListOfStreamerInfo(), and TROOT().

TSeqCollection* TROOT::fStyles
protected
TSeqCollection* TROOT::fTasks
protected

Definition at line 137 of file TROOT.h.

Referenced by GetListOfTasks(), TROOT(), and ~TROOT().

Int_t TROOT::fTimer
protected

Definition at line 110 of file TROOT.h.

Referenced by Timer(), and TROOT().

TCollection* TROOT::fTypes
protected

Definition at line 126 of file TROOT.h.

Referenced by GetListOfTypes(), TROOT(), and ~TROOT().

TProcessUUID* TROOT::fUUIDs
protected

Definition at line 151 of file TROOT.h.

Referenced by GetUUIDs(), TROOT(), and ~TROOT().

TString TROOT::fVersion
protected

Definition at line 100 of file TROOT.h.

Referenced by GetVersion(), and TROOT().

Int_t TROOT::fVersionCode
protected

Definition at line 102 of file TROOT.h.

Referenced by GetVersionCode(), and TROOT().

Int_t TROOT::fVersionDate
protected

Definition at line 103 of file TROOT.h.

Referenced by GetVersionDate(), and TROOT().

Int_t TROOT::fVersionInt
protected

Definition at line 101 of file TROOT.h.

Referenced by GetVersionInt(), TROOT(), and ~TROOT().

Int_t TROOT::fVersionTime
protected

Definition at line 104 of file TROOT.h.

Referenced by GetVersionTime(), and TROOT().


The documentation for this class was generated from the following files: