Logo ROOT  
Reference Guide
TROOT.h
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Rene Brun 08/12/94
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TROOT
13#define ROOT_TROOT
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TROOT //
19// //
20// The TROOT object is the entry point to the system. //
21// The single instance of TROOT is accessible via the global gROOT. //
22// Using the gROOT pointer one has access to basically every object //
23// created in a ROOT based program. The TROOT object is essentially a //
24// "dispatcher" with several lists pointing to the ROOT main objects. //
25// //
26//////////////////////////////////////////////////////////////////////////
27
28#include "TDirectory.h"
29#include "TList.h"
30#include "RConfigure.h"
31
32#include <atomic>
33#include <string>
34#include <vector>
35
36class TClass;
37class TCanvas;
38class TColor;
39class TDataType;
40class TFile;
41class TStyle;
42class TVirtualPad;
43class TApplication;
44class TInterpreter;
45class TBrowser;
46class TGlobal;
47class TFunction;
48class TFolder;
49class TPluginManager;
50class TProcessUUID;
51class TClassGenerator;
52class TVirtualMutex;
53class TROOT;
55class TListOfEnums;
60
62
63namespace ROOT {
64namespace Internal {
65 class TROOTAllocator;
66
67 TROOT *GetROOT2();
68
69 // Manage parallel branch processing
74 public:
77 };
78
79 // Manage parallel tree processing
84 public:
87 };
88} } // End ROOT::Internal
89
90namespace ROOT {
91 // Enable support for multi-threading within the ROOT code,
92 // in particular, enables the global mutex to make ROOT thread safe/aware.
93 void EnableThreadSafety();
94 /// \brief Enable ROOT's implicit multi-threading for all objects and methods that provide an internal
95 /// parallelisation mechanism.
96 void EnableImplicitMT(UInt_t numthreads = 0);
97 void DisableImplicitMT();
100}
101
102class TROOT : public TDirectory {
103
104friend class TCling;
106
107private:
108 Int_t fLineIsProcessing; //To synchronize multi-threads
109
110 static Int_t fgDirLevel; //Indentation level for ls()
111 static Bool_t fgRootInit; //Singleton initialization flag
112 static Bool_t fgMemCheck; //Turn on memory leak checker
113
114 TROOT(const TROOT&); //Not implemented
115 TROOT& operator=(const TROOT&); //Not implemented
116
117protected:
118 typedef std::atomic<TListOfEnums*> AListOfEnums_t;
119
120 TString fConfigOptions; //ROOT ./configure set build options
121 TString fConfigFeatures; //ROOT ./configure detected build features
122 TString fVersion; //ROOT version (from CMZ VERSQQ) ex 0.05/01
123 Int_t fVersionInt; //ROOT version in integer format (501)
124 Int_t fVersionCode; //ROOT version code as used in RVersion.h
125 Int_t fVersionDate; //Date of ROOT version (ex 951226)
126 Int_t fVersionTime; //Time of ROOT version (ex 1152)
127 Int_t fBuiltDate; //Date of ROOT built
128 Int_t fBuiltTime; //Time of ROOT built
129 TString fGitCommit; //Git commit SHA1 of built
130 TString fGitBranch; //Git branch
131 TString fGitDate; //Date and time when make was run
132 Int_t fTimer; //Timer flag
133 std::atomic<TApplication*> fApplication; //Pointer to current application
134 TInterpreter *fInterpreter; //Command interpreter
135 Bool_t fBatch; //True if session without graphics
136 TString fWebDisplay; //If not empty it defines where web graphics should be rendered (cef, qt5, browser...)
137 Bool_t fIsWebDisplay; //True if session with graphics on web
138 Bool_t fIsWebDisplayBatch; //True if session with graphics on web and batch mode
139 Bool_t fEditHistograms; //True if histograms can be edited with the mouse
140 Bool_t fFromPopUp; //True if command executed from a popup menu
141 Bool_t fMustClean; //True if object destructor scans canvases
142 Bool_t fReadingObject; //True while reading an object [Deprecated (will be removed in next release)
143 Bool_t fForceStyle; //Force setting of current style when reading objects
144 Bool_t fInterrupt; //True if macro should be interrupted
145 Bool_t fEscape; //True if ESC has been pressed
146 Bool_t fExecutingMacro; //True while executing a TMacro
147 Int_t fEditorMode; //Current Editor mode
148 const TObject *fPrimitive; //Currently selected primitive
149 TVirtualPad *fSelectPad; //Currently selected pad
150 TCollection *fClasses; //List of classes definition
151 TCollection *fTypes; //List of data types definition
152 TListOfFunctionTemplates *fFuncTemplate; //List of global function templates
153 TListOfDataMembers*fGlobals; //List of global variables
154 TListOfFunctions*fGlobalFunctions; //List of global functions
155 TSeqCollection *fClosedObjects; //List of closed objects from the list of files and sockets, so we can delete them if neededCl.
156 TSeqCollection *fFiles; //List of files
157 TSeqCollection *fMappedFiles; //List of memory mapped files
158 TSeqCollection *fSockets; //List of network sockets
159 TSeqCollection *fCanvases; //List of canvases
160 TSeqCollection *fStyles; //List of styles
161 TCollection *fFunctions; //List of analytic functions
162 TSeqCollection *fTasks; //List of tasks
163 TSeqCollection *fColors; //List of colors
164 TSeqCollection *fGeometries; //List of geometries
165 TSeqCollection *fBrowsers; //List of browsers
166 TSeqCollection *fSpecials; //List of special objects
167 TSeqCollection *fCleanups; //List of recursiveRemove collections
168 TSeqCollection *fMessageHandlers; //List of message handlers
169 TSeqCollection *fStreamerInfo; //List of active StreamerInfo classes
170 TCollection *fClassGenerators; //List of user defined class generators;
171 TSeqCollection *fSecContexts; //List of security contexts (TSecContext)
172 TSeqCollection *fProofs; //List of proof sessions
173 TSeqCollection *fClipboard; //List of clipboard objects
174 TSeqCollection *fDataSets; //List of data sets (TDSet or TChain)
175 AListOfEnums_t fEnums; //List of enum types
176 TProcessUUID *fUUIDs; //Pointer to TProcessID managing TUUIDs
177 TFolder *fRootFolder; //top level folder //root
178 TList *fBrowsables; //List of browsables
179 TPluginManager *fPluginManager; //Keeps track of plugin library handlers
180 TString fCutClassName; //Name of default CutG class in graphics editor
181 TString fDefCanvasName; //Name of default canvas
182
183 TROOT(); //Only used by Dictionary
184 void InitSystem(); //Operating System interface
185 void InitThreads(); //Initialize threads library
186 void InitInterpreter(); //Initialize interpreter (cling)
187 void ReadGitInfo(); //Read Git commit SHA1 and branch name
188 void *operator new(size_t l) { return TObject::operator new(l); }
189 void *operator new(size_t l, void *ptr) { return TObject::operator new(l,ptr); }
190
191 friend class ::ROOT::Internal::TROOTAllocator;
192
194
195public:
196
197 typedef std::vector<std::pair<std::string, int> > FwdDeclArgsToKeepCollection_t;
198
199 TROOT(const char *name, const char *title, VoidFuncPtr_t *initfunc = 0);
200 virtual ~TROOT();
201 void AddClass(TClass *cl);
203 virtual void Append(TObject *obj, Bool_t replace = kFALSE);
204 void Browse(TBrowser *b);
206 void CloseFiles();
208 virtual TObject *FindObject(const char *name) const;
209 virtual TObject *FindObject(const TObject *obj) const;
210 virtual TObject *FindObjectAny(const char *name) const;
211 virtual TObject *FindObjectAnyFile(const char *name) const;
212 TObject *FindSpecialObject(const char *name, void *&where);
213 const char *FindObjectClassName(const char *name) const;
214 const char *FindObjectPathName(const TObject *obj) const;
215 TClass *FindSTLClass(const char *name, Bool_t load, Bool_t silent = kFALSE) const;
216 void ForceStyle(Bool_t force = kTRUE) { fForceStyle = force; }
217 Bool_t FromPopUp() const { return fFromPopUp; }
221 TClass *GetClass(const char *name, Bool_t load = kTRUE, Bool_t silent = kFALSE) const;
222 TClass *GetClass(const std::type_info &typeinfo, Bool_t load = kTRUE, Bool_t silent = kFALSE) const;
223 TColor *GetColor(Int_t color) const;
224 const char *GetConfigOptions() const { return fConfigOptions; }
225 const char *GetConfigFeatures() const { return fConfigFeatures; }
226 const char *GetCutClassName() const { return fCutClassName; }
227 const char *GetDefCanvasName() const { return fDefCanvasName; }
229 Int_t GetEditorMode() const { return fEditorMode; }
230 Bool_t GetForceStyle() const { return fForceStyle; }
231 Int_t GetBuiltDate() const { return fBuiltDate; }
232 Int_t GetBuiltTime() const { return fBuiltTime; }
233 const char *GetGitCommit() const { return fGitCommit; }
234 const char *GetGitBranch() const { return fGitBranch; }
235 const char *GetGitDate();
238 Int_t GetVersionInt() const { return fVersionInt; }
240 const char *GetVersion() const { return fVersion; }
253 TCollection *GetListOfFunctionOverloads(const char* name) const;
269 TDataType *GetType(const char *name, Bool_t load = kFALSE) const;
270 TFile *GetFile() const { if (gDirectory != this) return gDirectory->GetFile(); else return 0;}
271 TFile *GetFile(const char *name) const;
273 TStyle *GetStyle(const char *name) const;
274 TObject *GetFunction(const char *name) const;
275 TGlobal *GetGlobal(const char *name, Bool_t load = kFALSE) const;
276 TGlobal *GetGlobal(const TObject *obj, Bool_t load = kFALSE) const;
277 TFunction *GetGlobalFunction(const char *name, const char *params = 0, Bool_t load = kFALSE);
278 TFunction *GetGlobalFunctionWithPrototype(const char *name, const char *proto = 0, Bool_t load = kFALSE);
279 TObject *GetGeometry(const char *name) const;
280 const TObject *GetSelectedPrimitive() const { return fPrimitive; }
282 Int_t GetNclasses() const { return fClasses->GetSize(); }
283 Int_t GetNtypes() const { return fTypes->GetSize(); }
284 TFolder *GetRootFolder() const { return fRootFolder; }
285 TProcessUUID *GetUUIDs() const { return fUUIDs; }
286 const TString &GetWebDisplay() const { return fWebDisplay; }
287 void Idle(UInt_t idleTimeInSec, const char *command = 0);
288 Int_t IgnoreInclude(const char *fname, const char *expandedfname);
289 Bool_t IsBatch() const { return fBatch; }
291 Bool_t IsFolder() const { return kTRUE; }
292 Bool_t IsInterrupted() const { return fInterrupt; }
293 Bool_t IsEscaped() const { return fEscape; }
295 Bool_t IsProofServ() const { return fName == "proofserv" ? kTRUE : kFALSE; }
296 Bool_t IsRootFile(const char *filename) const;
299 void ls(Option_t *option = "") const;
300 Int_t LoadClass(const char *classname, const char *libname, Bool_t check = kFALSE);
301 TClass *LoadClass(const char *name, Bool_t silent = kFALSE) const;
302 Int_t LoadMacro(const char *filename, Int_t *error = 0, Bool_t check = kFALSE);
303 Long_t Macro(const char *filename, Int_t *error = 0, Bool_t padUpdate = kTRUE);
304 TCanvas *MakeDefCanvas() const;
305 void Message(Int_t id, const TObject *obj);
306 Bool_t MustClean() const { return fMustClean; }
307 Long_t ProcessLine(const char *line, Int_t *error = 0);
308 Long_t ProcessLineSync(const char *line, Int_t *error = 0);
309 Long_t ProcessLineFast(const char *line, Int_t *error = 0);
310 Bool_t ReadingObject() const;
311 void RecursiveRemove(TObject *obj);
312 void RefreshBrowsers();
313 static void RegisterModule(const char* modulename,
314 const char** headers,
315 const char** includePaths,
316 const char* payLoadCode,
317 const char* fwdDeclCode,
318 void (*triggerFunc)(),
319 const FwdDeclArgsToKeepCollection_t& fwdDeclsArgToSkip,
320 const char** classesHeaders,
321 bool hasCxxModule = false);
323 void RemoveClass(TClass *);
324 void Reset(Option_t *option="");
325 void SaveContext();
327 void SetBatch(Bool_t batch = kTRUE) { fBatch = batch; }
328 void SetWebDisplay(const char *webdisplay);
329 void SetCutClassName(const char *name = "TCutG");
330 void SetDefCanvasName(const char *name = "c1") { fDefCanvasName = name; }
332 void SetEditorMode(const char *mode = "");
334 void SetFromPopUp(Bool_t flag = kTRUE) { fFromPopUp = flag; }
335 void SetInterrupt(Bool_t flag = kTRUE) { fInterrupt = flag; }
336 void SetEscape(Bool_t flag = kTRUE) { fEscape = flag; }
339 void SetReadingObject(Bool_t flag = kTRUE);
340 void SetMustClean(Bool_t flag = kTRUE) { fMustClean=flag; }
341 void SetSelectedPrimitive(const TObject *obj) { fPrimitive = obj; }
343 void SetStyle(const char *stylename = "Default");
344 void Time(Int_t casetime=1) { fTimer = casetime; }
345 Int_t Timer() const { return fTimer; }
346
347 //---- static functions
348 static Int_t DecreaseDirLevel();
349 static Int_t GetDirLevel();
350 static const char *GetMacroPath();
351 static void SetMacroPath(const char *newpath);
352 static Int_t IncreaseDirLevel();
353 static void IndentLevel();
354 static void Initialize();
355 static Bool_t Initialized();
356 static Bool_t MemCheck();
357 static void SetDirLevel(Int_t level = 0);
360 static Int_t RootVersionCode();
361 static const std::vector<std::string> &AddExtraInterpreterArgs(const std::vector<std::string> &args);
362 static const char**&GetExtraInterpreterArgs();
363
364 static const TString& GetRootSys();
365 static const TString& GetBinDir();
366 static const TString& GetLibDir();
367 static const TString& GetIncludeDir();
368 static const TString& GetEtcDir();
369 static const TString& GetDataDir();
370 static const TString& GetDocDir();
371 static const TString& GetMacroDir();
372 static const TString& GetTutorialDir();
373 static const TString& GetSourceDir();
374 static const TString& GetIconPath();
375 static const TString& GetTTFFontDir();
376
377 // Backward compatibility function - do not use for new code
378 static const char *GetTutorialsDir();
379 static void ShutDown();
380
381 ClassDef(TROOT,0) //Top level (or root) structure for all classes
382};
383
384
385namespace ROOT {
386 TROOT *GetROOT();
387 namespace Internal {
389
390 inline void SetRequireCleanup(TObject &obj) {
392 obj.SetUniqueID(0);
393 }
394
396 return obj.TestBit(kIsReferenced) && obj.GetUniqueID() == 0;
397 }
398 }
399
400 /// \brief call RecursiveRemove for obj if gROOT is valid
401 /// and obj.TestBit(kMustCleanup) is true.
402 /// Note: this reset the kMustCleanup bit to allow
403 /// harmless multiple call to this function.
405 {
406 if (obj.TestBit(kMustCleanup)) {
408 if (root && root != &obj && (root->MustClean() || Internal::RequiresCleanup(obj))) {
409 root->RecursiveRemove(&obj);
411 }
412 }
413 }
414}
415#define gROOT (ROOT::GetROOT())
416
417#endif
#define R__EXTERN
Definition: DllImport.h:27
#define b(i)
Definition: RSha256.hxx:100
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
void(* VoidFuncPtr_t)()
Definition: Rtypes.h:77
#define gDirectory
Definition: TDirectory.h:223
char name[80]
Definition: TGX11.cxx:109
@ kIsReferenced
Definition: TObject.h:342
@ kMustCleanup
Definition: TObject.h:340
R__EXTERN TVirtualMutex * gROOTMutex
Definition: TROOT.h:59
const char * proto
Definition: civetweb.c:16604
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
Definition: TApplication.h:39
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
The Canvas class.
Definition: TCanvas.h:31
Objects following this interface can be passed onto the TROOT object to implement a user customized w...
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
This class defines an interface to the cling C++ interpreter.
Definition: TCling.h:99
Collection abstract base class.
Definition: TCollection.h:63
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
The color creation and management class.
Definition: TColor.h:19
Basic data type descriptor (datatype information is obtained from CINT).
Definition: TDataType.h:44
Describe directory structure in memory.
Definition: TDirectory.h:34
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:48
A TFolder object is a collection of objects and folders.
Definition: TFolder.h:30
Dictionary for function template This class describes one single function template.
Global functions class (global functions are obtained from CINT).
Definition: TFunction.h:28
Global variables class (global variables are obtained from CINT).
Definition: TGlobal.h:28
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:60
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:33
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
A doubly linked list.
Definition: TList.h:44
TString fName
Definition: TNamed.h:32
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
virtual UInt_t GetUniqueID() const
Return the unique object id.
Definition: TObject.cxx:375
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:694
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
Definition: TObject.cxx:705
void ResetBit(UInt_t f)
Definition: TObject.h:171
This class implements a plugin library manager.
This class is a specialized TProcessID managing the list of UUIDs.
Definition: TProcessUUID.h:32
ROOT top level object description.
Definition: TROOT.h:102
void SetApplication(TApplication *app)
Definition: TROOT.h:326
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
Definition: TROOT.cxx:2821
Int_t GetVersionInt() const
Definition: TROOT.h:238
const char * GetConfigFeatures() const
Definition: TROOT.h:225
TSeqCollection * GetListOfCleanups() const
Definition: TROOT.h:258
void Time(Int_t casetime=1)
Definition: TROOT.h:344
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,...
Definition: TROOT.cxx:1895
Int_t fVersionCode
Definition: TROOT.h:124
const char * GetDefCanvasName() const
Definition: TROOT.h:227
Bool_t IsInterrupted() const
Definition: TROOT.h:292
const TString & GetWebDisplay() const
Definition: TROOT.h:286
TCollection * GetListOfClasses() const
Definition: TROOT.h:241
void Message(Int_t id, const TObject *obj)
Process message id called by obj.
Definition: TROOT.cxx:2323
void RemoveClass(TClass *)
Remove a class from the list and map of classes.
Definition: TROOT.cxx:2607
TSeqCollection * fProofs
Definition: TROOT.h:172
TCollection * fClassGenerators
Definition: TROOT.h:170
TROOT()
Default ctor.
Definition: TROOT.cxx:647
void SetCutClassName(const char *name="TCutG")
Set the default graphical cut class name for the graphics editor By default the graphics editor creat...
Definition: TROOT.cxx:2662
TSeqCollection * fCanvases
Definition: TROOT.h:159
const TObject * fPrimitive
Definition: TROOT.h:148
Bool_t fIsWebDisplay
Definition: TROOT.h:137
TFolder * fRootFolder
Definition: TROOT.h:177
void AddClassGenerator(TClassGenerator *gen)
Add a class generator.
Definition: TROOT.cxx:1052
const char * GetCutClassName() const
Definition: TROOT.h:226
Int_t GetBuiltTime() const
Definition: TROOT.h:232
void SetFromPopUp(Bool_t flag=kTRUE)
Definition: TROOT.h:334
TSeqCollection * fGeometries
Definition: TROOT.h:164
TString fCutClassName
Definition: TROOT.h:180
TInterpreter * fInterpreter
Definition: TROOT.h:134
Bool_t IsProofServ() const
Definition: TROOT.h:295
TSeqCollection * GetListOfMessageHandlers() const
Definition: TROOT.h:260
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
Definition: TROOT.h:197
Int_t fVersionTime
Definition: TROOT.h:126
void SetLineIsProcessing()
Definition: TROOT.h:337
void SetMustClean(Bool_t flag=kTRUE)
Definition: TROOT.h:340
void EndOfProcessCleanups()
Execute the cleanups necessary at the end of the process, in particular those that must be executed b...
Definition: TROOT.cxx:1244
Bool_t fBatch
Definition: TROOT.h:135
Bool_t IsWebDisplayBatch() const
Definition: TROOT.h:298
TSeqCollection * GetListOfFiles() const
Definition: TROOT.h:247
Bool_t fEscape
Definition: TROOT.h:145
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Definition: TROOT.cxx:2935
TSeqCollection * GetListOfSockets() const
Definition: TROOT.h:249
Int_t fVersionInt
Definition: TROOT.h:123
static const TString & GetIncludeDir()
Get the include directory in the installation. Static utility function.
Definition: TROOT.cxx:2977
Bool_t fFromPopUp
Definition: TROOT.h:140
TSeqCollection * fSockets
Definition: TROOT.h:158
Long_t ProcessLine(const char *line, Int_t *error=0)
Process interpreter command via TApplication::ProcessLine().
Definition: TROOT.cxx:2343
Bool_t IsEscaped() const
Definition: TROOT.h:293
static const char * GetMacroPath()
Get macro search path. Static utility function.
Definition: TROOT.cxx:2741
TCollection * fFunctions
Definition: TROOT.h:161
Int_t GetVersionDate() const
Definition: TROOT.h:236
void SaveContext()
Save the current interpreter context.
Definition: TROOT.cxx:2650
TCollection * GetListOfClassGenerators() const
Definition: TROOT.h:261
Bool_t IsExecutingMacro() const
Definition: TROOT.h:290
TDataType * GetType(const char *name, Bool_t load=kFALSE) const
Return pointer to type with name.
Definition: TROOT.cxx:1555
static void Initialize()
Initialize ROOT explicitly.
Definition: TROOT.cxx:2837
TFunction * GetGlobalFunctionWithPrototype(const char *name, const char *proto=0, Bool_t load=kFALSE)
Return pointer to global function by name.
Definition: TROOT.cxx:1700
static void ShutDown()
Shut down ROOT.
Definition: TROOT.cxx:3071
TObject * GetFunction(const char *name) const
Return pointer to function with name.
Definition: TROOT.cxx:1580
static Int_t ConvertVersionCode2Int(Int_t code)
Convert version code to an integer, i.e. 331527 -> 51507.
Definition: TROOT.cxx:2868
TSeqCollection * fMessageHandlers
Definition: TROOT.h:168
void SetStyle(const char *stylename="Default")
Change current style to style with name stylename.
Definition: TROOT.cxx:2709
TSeqCollection * GetListOfMappedFiles() const
Definition: TROOT.h:248
void SetEditHistograms(Bool_t flag=kTRUE)
Definition: TROOT.h:331
AListOfEnums_t fEnums
Definition: TROOT.h:175
void ReadGitInfo()
Read Git commit information and branch name from the etc/gitinfo.txt file.
Definition: TROOT.cxx:2402
void ForceStyle(Bool_t force=kTRUE)
Definition: TROOT.h:216
static Bool_t fgRootInit
Definition: TROOT.h:111
void RefreshBrowsers()
Refresh all browsers.
Definition: TROOT.cxx:2491
void CloseFiles()
Close any files and sockets that gROOT knows about.
Definition: TROOT.cxx:1166
const char * GetVersion() const
Definition: TROOT.h:240
std::atomic< TApplication * > fApplication
Definition: TROOT.h:133
const char * FindObjectPathName(const TObject *obj) const
Return path name of obj somewhere in the //root/... path.
Definition: TROOT.cxx:1466
static Int_t ConvertVersionInt2Code(Int_t v)
Convert version as an integer to version code as used in RVersion.h.
Definition: TROOT.cxx:2876
TFile * GetFile() const
Definition: TROOT.h:270
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
Definition: TROOT.cxx:3124
const char * GetGitBranch() const
Definition: TROOT.h:234
Bool_t fForceStyle
Definition: TROOT.h:143
Bool_t FromPopUp() const
Definition: TROOT.h:217
const TObject * GetSelectedPrimitive() const
Definition: TROOT.h:280
TCanvas * MakeDefCanvas() const
Return a default canvas.
Definition: TROOT.cxx:1547
TCollection * fTypes
Definition: TROOT.h:151
TColor * GetColor(Int_t color) const
Return address of color with index color.
Definition: TROOT.cxx:1529
Bool_t IsLineProcessing() const
Definition: TROOT.h:294
TGlobal * GetGlobal(const char *name, Bool_t load=kFALSE) const
Return pointer to global variable by name.
Definition: TROOT.cxx:1613
TClass * 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.
Definition: TROOT.cxx:1477
TSeqCollection * fStreamerInfo
Definition: TROOT.h:169
TROOT & operator=(const TROOT &)
static const TString & GetIconPath()
Get the icon path in the installation. Static utility function.
Definition: TROOT.cxx:3103
TSeqCollection * GetListOfCanvases() const
Definition: TROOT.h:250
Long_t Macro(const char *filename, Int_t *error=0, Bool_t padUpdate=kTRUE)
Execute a macro in the interpreter.
Definition: TROOT.cxx:2289
std::atomic< TListOfEnums * > AListOfEnums_t
Definition: TROOT.h:118
TCollection * GetListOfGlobalFunctions(Bool_t load=kFALSE)
Return list containing the TFunctions currently defined.
Definition: TROOT.cxx:1808
TString fGitDate
Definition: TROOT.h:131
TSeqCollection * fSpecials
Definition: TROOT.h:166
TCollection * GetListOfFunctionTemplates()
Definition: TROOT.cxx:1753
void SetExecutingMacro(Bool_t flag=kTRUE)
Definition: TROOT.h:333
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, bool hasCxxModule=false)
Called by static dictionary initialization to register clang modules for headers.
Definition: TROOT.cxx:2514
TCollection * fClasses
Definition: TROOT.h:150
Bool_t fReadingObject
Definition: TROOT.h:142
void SetInterrupt(Bool_t flag=kTRUE)
Definition: TROOT.h:335
Bool_t fEditHistograms
Definition: TROOT.h:139
TListOfDataMembers * fGlobals
Definition: TROOT.h:153
TListOfFunctionTemplates * fFuncTemplate
Definition: TROOT.h:152
TSeqCollection * GetClipboard() const
Definition: TROOT.h:264
Int_t fTimer
Definition: TROOT.h:132
TSeqCollection * fDataSets
Definition: TROOT.h:174
TString fConfigOptions
Definition: TROOT.h:120
TStyle * GetStyle(const char *name) const
Return pointer to style with name.
Definition: TROOT.cxx:1572
TCollection * GetListOfEnums(Bool_t load=kFALSE)
Definition: TROOT.cxx:1736
Long_t ProcessLineFast(const char *line, Int_t *error=0)
Process interpreter command directly via CINT interpreter.
Definition: TROOT.cxx:2380
void InitInterpreter()
Initialize the interpreter.
Definition: TROOT.cxx:2037
TCollection * GetListOfGlobals(Bool_t load=kFALSE)
Return list containing the TGlobals currently defined.
Definition: TROOT.cxx:1770
virtual TObject * FindObjectAnyFile(const char *name) const
Scan the memory lists of all files for an object with name.
Definition: TROOT.cxx:1429
TVirtualPad * GetSelectedPad() const
Definition: TROOT.h:281
static void SetDirLevel(Int_t level=0)
Return Indentation level for ls().
Definition: TROOT.cxx:2860
TSeqCollection * fSecContexts
Definition: TROOT.h:171
TString fWebDisplay
Definition: TROOT.h:136
static const char * GetTutorialsDir()
Get the tutorials directory in the installation.
Definition: TROOT.cxx:3146
static Bool_t fgMemCheck
Definition: TROOT.h:112
TCollection * GetListOfFunctionOverloads(const char *name) const
Return the collection of functions named "name".
Definition: TROOT.cxx:1654
TSeqCollection * fCleanups
Definition: TROOT.h:167
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
Definition: TROOT.cxx:2844
void RecursiveRemove(TObject *obj)
Recursively remove this object from the list of Cleanups.
Definition: TROOT.cxx:2477
TApplication * GetApplication() const
Definition: TROOT.h:219
void SetBatch(Bool_t batch=kTRUE)
Definition: TROOT.h:327
Int_t fLineIsProcessing
Definition: TROOT.h:108
Int_t Timer() const
Definition: TROOT.h:345
static const TString & GetSourceDir()
Get the source directory in the installation. Static utility function.
Definition: TROOT.cxx:3082
static const TString & GetMacroDir()
Get the macro directory in the installation. Static utility function.
Definition: TROOT.cxx:3029
TString fGitCommit
Definition: TROOT.h:129
TSeqCollection * fClosedObjects
Definition: TROOT.h:155
TSeqCollection * fTasks
Definition: TROOT.h:162
void Browse(TBrowser *b)
Add browsable objects to TBrowser.
Definition: TROOT.cxx:1073
TFunction * GetGlobalFunction(const char *name, const char *params=0, Bool_t load=kFALSE)
Return pointer to global function by name.
Definition: TROOT.cxx:1667
TSeqCollection * fClipboard
Definition: TROOT.h:173
const char * GetGitDate()
Return date/time make was run.
Definition: TROOT.cxx:2453
TProcessUUID * GetUUIDs() const
Definition: TROOT.h:285
void SetEditorMode(const char *mode="")
Set editor mode.
Definition: TROOT.cxx:2683
TSeqCollection * GetListOfStreamerInfo() const
Definition: TROOT.h:259
static const TString & GetTutorialDir()
Get the tutorials directory in the installation. Static utility function.
Definition: TROOT.cxx:3050
virtual ~TROOT()
Clean up and free resources used by ROOT (files, network sockets, shared memory segments,...
Definition: TROOT.cxx:904
TSeqCollection * fColors
Definition: TROOT.h:163
static Bool_t MemCheck()
Return kTRUE if the memory leak checker is on.
Definition: TROOT.cxx:2852
Int_t GetBuiltDate() const
Definition: TROOT.h:231
TCollection * GetListOfFunctions() const
Definition: TROOT.h:252
void Idle(UInt_t idleTimeInSec, const char *command=0)
Execute command when system has been idle for idleTimeInSec seconds.
Definition: TROOT.cxx:1859
Bool_t GetForceStyle() const
Definition: TROOT.h:230
TFolder * GetRootFolder() const
Definition: TROOT.h:284
TSeqCollection * GetListOfBrowsers() const
Definition: TROOT.h:255
Bool_t ReadingObject() const
Deprecated (will be removed in next release).
Definition: TROOT.cxx:2439
TSeqCollection * fStyles
Definition: TROOT.h:160
TSeqCollection * GetListOfProofs() const
Definition: TROOT.h:263
Bool_t GetEditHistograms() const
Definition: TROOT.h:228
Int_t fVersionDate
Definition: TROOT.h:125
TSeqCollection * GetListOfColors() const
Definition: TROOT.h:242
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
Definition: TROOT.cxx:1064
Int_t fBuiltTime
Definition: TROOT.h:128
static const std::vector< std::string > & AddExtraInterpreterArgs(const std::vector< std::string > &args)
Provide command line arguments to the interpreter construction.
Definition: TROOT.cxx:2898
void SetLineHasBeenProcessed()
Definition: TROOT.h:338
TClass * 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: TROOT.cxx:1511
TVirtualPad * fSelectPad
Definition: TROOT.h:149
TSeqCollection * fFiles
Definition: TROOT.h:156
virtual TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at //root.
Definition: TROOT.cxx:1419
static const TString & GetRootSys()
Get the rootsys directory in the installation. Static utility function.
Definition: TROOT.cxx:2925
TListOfFunctions * GetGlobalFunctions()
Internal routine returning, and creating if necessary, the list of global function.
Definition: TROOT.cxx:1645
Bool_t fInterrupt
Definition: TROOT.h:144
Bool_t fMustClean
Definition: TROOT.h:141
TObject * Remove(TObject *)
Remove an object from the in-memory list.
Definition: TROOT.cxx:2597
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,...
Definition: TROOT.cxx:2156
void AddClass(TClass *cl)
Add a class to the list and map of classes.
Definition: TROOT.cxx:1042
static Int_t RootVersionCode()
Return ROOT version code as defined in RVersion.h.
Definition: TROOT.cxx:2887
TObject * FindSpecialObject(const char *name, void *&where)
Returns address and folder of a ROOT object if it exists.
Definition: TROOT.cxx:1360
void InitSystem()
Initialize operating system interface.
Definition: TROOT.cxx:1945
Int_t GetEditorMode() const
Definition: TROOT.h:229
Bool_t ClassSaved(TClass *cl)
return class status bit kClassSaved for class cl This function is called by the SavePrimitive functio...
Definition: TROOT.cxx:1092
const char * GetGitCommit() const
Definition: TROOT.h:233
TString fGitBranch
Definition: TROOT.h:130
TCollection * GetListOfTypes(Bool_t load=kFALSE)
Return a dynamic list giving access to all TDataTypes (typedefs) currently defined.
Definition: TROOT.cxx:1847
virtual TObject * FindObject(const char *name) const
Returns address of a ROOT object if it exists.
Definition: TROOT.cxx:1306
static Int_t fgDirLevel
Definition: TROOT.h:110
TSeqCollection * GetListOfTasks() const
Definition: TROOT.h:257
Bool_t IsBatch() const
Definition: TROOT.h:289
Bool_t IsRootFile(const char *filename) const
Return true if the file is local and is (likely) to be a ROOT file.
Definition: TROOT.cxx:2203
Bool_t IsWebDisplay() const
Definition: TROOT.h:297
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition: TROOT.cxx:2829
Int_t GetVersionTime() const
Definition: TROOT.h:237
static const TString & GetDocDir()
Get the documentation directory in the installation. Static utility function.
Definition: TROOT.cxx:3013
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
Definition: TROOT.cxx:2987
Int_t GetNclasses() const
Definition: TROOT.h:282
static const char **& GetExtraInterpreterArgs()
INTERNAL function! Used by rootcling to inject interpreter arguments through a C-interface layer.
Definition: TROOT.cxx:2908
static void SetMacroPath(const char *newpath)
Set or extend the macro search path.
Definition: TROOT.cxx:2767
void SetSelectedPad(TVirtualPad *pad)
Definition: TROOT.h:342
void InitThreads()
Load and initialize thread library.
Definition: TROOT.cxx:2026
TProcessUUID * fUUIDs
Definition: TROOT.h:176
TString fConfigFeatures
Definition: TROOT.h:121
TFunctionTemplate * GetFunctionTemplate(const char *name)
Definition: TROOT.cxx:1600
TPluginManager * fPluginManager
Definition: TROOT.h:179
TObject * GetGeometry(const char *name) const
Return pointer to Geometry with name.
Definition: TROOT.cxx:1729
Bool_t fExecutingMacro
Definition: TROOT.h:146
TList * GetListOfBrowsables() const
Definition: TROOT.h:268
Int_t fBuiltDate
Definition: TROOT.h:127
Bool_t fIsWebDisplayBatch
Definition: TROOT.h:138
void SetEscape(Bool_t flag=kTRUE)
Definition: TROOT.h:336
Int_t GetVersionCode() const
Definition: TROOT.h:239
TSeqCollection * fMappedFiles
Definition: TROOT.h:157
Int_t GetNtypes() const
Definition: TROOT.h:283
TSeqCollection * GetListOfSpecials() const
Definition: TROOT.h:256
static const TString & GetLibDir()
Get the library directory in the installation. Static utility function.
Definition: TROOT.cxx:2956
void ls(Option_t *option="") const
To list all objects of the application.
Definition: TROOT.cxx:2223
void SetDefCanvasName(const char *name="c1")
Definition: TROOT.h:330
TSeqCollection * fBrowsers
Definition: TROOT.h:165
TString fDefCanvasName
Definition: TROOT.h:181
TListOfFunctions * fGlobalFunctions
Definition: TROOT.h:154
TList * fBrowsables
Definition: TROOT.h:178
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
Definition: TROOT.cxx:2725
Long_t ProcessLineSync(const char *line, Int_t *error=0)
Process interpreter command via TApplication::ProcessLine().
Definition: TROOT.cxx:2363
void SetSelectedPrimitive(const TObject *obj)
Definition: TROOT.h:341
void Reset(Option_t *option="")
Delete all global interpreter objects created since the last call to Reset.
Definition: TROOT.cxx:2630
Int_t fEditorMode
Definition: TROOT.h:147
const char * FindObjectClassName(const char *name) const
Returns class name of a ROOT object including CINT globals.
Definition: TROOT.cxx:1446
TSeqCollection * GetListOfDataSets() const
Definition: TROOT.h:265
Bool_t MustClean() const
Definition: TROOT.h:306
TSeqCollection * GetListOfClosedObjects() const
Definition: TROOT.h:246
const char * GetConfigOptions() const
Definition: TROOT.h:224
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
Definition: TROOT.cxx:2997
void SetWebDisplay(const char *webdisplay)
Specify where web graphics shall be rendered.
Definition: TROOT.cxx:2793
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TROOT.h:291
TSeqCollection * GetListOfSecContexts() const
Definition: TROOT.h:262
Int_t LoadMacro(const char *filename, Int_t *error=0, Bool_t check=kFALSE)
Load a macro in the interpreter's memory.
Definition: TROOT.cxx:2241
TSeqCollection * GetListOfGeometries() const
Definition: TROOT.h:254
TROOT(const TROOT &)
TSeqCollection * GetListOfStyles() const
Definition: TROOT.h:251
TString fVersion
Definition: TROOT.h:122
static Int_t GetDirLevel()
return directory level
Definition: TROOT.cxx:2733
void SetReadingObject(Bool_t flag=kTRUE)
Definition: TROOT.cxx:2444
TInterpreter * GetInterpreter() const
Definition: TROOT.h:220
TPluginManager * GetPluginManager() const
Definition: TROOT.h:218
Sequenceable collection abstract base class.
Basic string class.
Definition: TString.h:131
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
This class implements a mutex interface.
Definition: TVirtualMutex.h:34
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:50
TLine * line
void SetRequireCleanup(TObject &obj)
Definition: TROOT.h:390
R__EXTERN TROOT * gROOTLocal
Definition: TROOT.h:388
void DisableParBranchProcessing()
Globally disables the IMT use case of parallel branch processing, deactivating the corresponding lock...
Definition: TROOT.cxx:433
void DisableParTreeProcessing()
Globally disables the IMT use case of parallel branch processing, deactivating the corresponding lock...
Definition: TROOT.cxx:482
void EnableParBranchProcessing()
Globally enables the parallel branch processing, which is a case of implicit multi-threading (IMT) in...
Definition: TROOT.cxx:417
Bool_t IsParBranchProcessingEnabled()
Returns true if parallel branch processing is enabled.
Definition: TROOT.cxx:446
Bool_t IsParTreeProcessingEnabled()
Returns true if parallel tree processing is enabled.
Definition: TROOT.cxx:495
TROOT * GetROOT2()
Definition: TROOT.cxx:384
void EnableParTreeProcessing()
Globally enables the parallel tree processing, which is a case of implicit multi-threading in ROOT,...
Definition: TROOT.cxx:466
Bool_t RequiresCleanup(TObject &obj)
Definition: TROOT.h:395
VSD Structures.
Definition: StringConv.hxx:21
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
Definition: TROOT.cxx:580
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
Definition: TROOT.cxx:611
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.
Definition: TROOT.cxx:549
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
Definition: TROOT.h:404
UInt_t GetImplicitMTPoolSize()
Returns the size of the pool used for implicit multi-threading.
Definition: TROOT.cxx:618
TROOT * GetROOT()
Definition: TROOT.cxx:520
void DisableImplicitMT()
Disables the implicit multi-threading in ROOT (see EnableImplicitMT).
Definition: TROOT.cxx:597
auto * l
Definition: textangle.C:4