|
ROOT
Reference Guide |
|
Go to the documentation of this file.
71 #include "RConfigure.h"
72 #include "RConfigOptions.h"
74 #include "RGitCommit.h"
82 #define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
84 #define dlopen(library_name, flags) ::LoadLibrary(library_name)
85 #define dlclose(library) ::FreeLibrary((HMODULE)library)
87 static char Msg[1000];
88 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(),
89 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), Msg,
93 FARPROC dlsym(
void *library,
const char *function_name)
97 FARPROC address = NULL;
99 if (library == RTLD_DEFAULT) {
100 if (EnumProcessModules(::GetCurrentProcess(), hMods,
sizeof(hMods), &cbNeeded)) {
101 for (i = 0; i < (cbNeeded /
sizeof(HMODULE)); i++) {
102 address = ::GetProcAddress((HMODULE)hMods[i], function_name);
109 return ::GetProcAddress((HMODULE)library, function_name);
157 #if defined(R__HAS_COCOA)
163 #elif defined(R__WIN32)
177 void **(*gThreadTsd)(
void*,
Int_t) = 0;
185 Int_t maj, min, cycle;
187 return 10000*maj + 100*min + cycle;
195 static const char *months[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
196 "Jun",
"Jul",
"Aug",
"Sep",
"Oct",
201 sscanf(date,
"%s %d %d", sm, &dd, &yy);
202 for (
int i = 0; i < 12; i++)
203 if (!strncmp(sm, months[i], 3)) {
207 return 10000*yy + 100*
mm + dd;
217 sscanf(time,
"%d:%d:%d", &hh, &
mm, &ss);
229 if (
gROOT->GetListOfFiles())
230 gROOT->GetListOfFiles()->Delete(
"slow");
231 if (
gROOT->GetListOfSockets())
232 gROOT->GetListOfSockets()->Delete();
233 if (
gROOT->GetListOfMappedFiles())
234 gROOT->GetListOfMappedFiles()->Delete(
"slow");
235 if (
gROOT->GetListOfClosedObjects())
236 gROOT->GetListOfClosedObjects()->Delete(
"slow");
247 struct ModuleHeaderInfo_t {
248 ModuleHeaderInfo_t(
const char* moduleName,
249 const char** headers,
250 const char** includePaths,
251 const char* payloadCode,
252 const char* fwdDeclCode,
253 void (*triggerFunc)(),
255 const char **classesHeaders,
257 fModuleName(moduleName),
259 fPayloadCode(payloadCode),
260 fFwdDeclCode(fwdDeclCode),
261 fIncludePaths(includePaths),
262 fTriggerFunc(triggerFunc),
263 fClassesHeaders(classesHeaders),
264 fFwdNargsToKeepColl(fwdDeclsArgToSkip),
265 fHasCxxModule(hasCxxModule) {}
267 const char* fModuleName;
268 const char** fHeaders;
269 const char* fPayloadCode;
270 const char* fFwdDeclCode;
271 const char** fIncludePaths;
272 void (*fTriggerFunc)();
273 const char** fClassesHeaders;
279 std::vector<ModuleHeaderInfo_t>& GetModuleHeaderInfoBuffer() {
280 static std::vector<ModuleHeaderInfo_t> moduleHeaderInfoBuffer;
281 return moduleHeaderInfoBuffer;
297 class TROOTAllocator {
331 char fHolder[
sizeof(
TROOT)];
334 TROOTAllocator(): fObj(
"root",
"The ROOT of EVERYTHING")
376 static TROOTAllocator alloc;
382 if (!initInterpreter) {
383 initInterpreter =
kTRUE;
396 const static bool loadSuccess = dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")? false : 0 <=
gSystem->
Load(
"libImt");
401 Error(
"GetSymInLibImt",
"Cannot get symbol %s.", funcname);
420 ::Warning(
"EnableParBranchProcessing",
"Cannot enable parallel branch processing, please build ROOT with -Dimt=ON");
434 ::Warning(
"DisableParBranchProcessing",
"Cannot disable parallel branch processing, please build ROOT with -Dimt=ON");
459 return isImplicitMTEnabled;
536 ::Warning(
"EnableImplicitMT",
"Cannot enable implicit multi-threading with %d threads, please build ROOT with -Dimt=ON", numthreads);
550 ::Warning(
"DisableImplicitMT",
"Cannot disable implicit multi-threading, please build ROOT with -Dimt=ON");
599 fLineIsProcessing(0), fVersion(0), fVersionInt(0), fVersionCode(0),
600 fVersionDate(0), fVersionTime(0), fBuiltDate(0), fBuiltTime(0),
601 fTimer(0), fApplication(0), fInterpreter(0), fBatch(
kTRUE),
605 fPrimitive(0),fSelectPad(0),fClasses(0),fTypes(0),fGlobals(0),fGlobalFunctions(0),
606 fClosedObjects(0),fFiles(0),fMappedFiles(0),fSockets(0),fCanvases(0),fStyles(0),fFunctions(0),
607 fTasks(0),fColors(0),fGeometries(0),fBrowsers(0),fSpecials(0),fCleanups(0),
608 fMessageHandlers(0),fStreamerInfo(0),fClassGenerators(0),fSecContexts(0),
609 fProofs(0),fClipboard(0),fDataSets(0),fUUIDs(0),fRootFolder(0),fBrowsables(0),
633 :
TDirectory(), fLineIsProcessing(0), fVersion(0), fVersionInt(0), fVersionCode(0),
634 fVersionDate(0), fVersionTime(0), fBuiltDate(0), fBuiltTime(0),
635 fTimer(0), fApplication(0), fInterpreter(0), fBatch(
kTRUE),
639 fPrimitive(0),fSelectPad(0),fClasses(0),fTypes(0),fGlobals(0),fGlobalFunctions(0),
640 fClosedObjects(0),fFiles(0),fMappedFiles(0),fSockets(0),fCanvases(0),fStyles(0),fFunctions(0),
641 fTasks(0),fColors(0),fGeometries(0),fBrowsers(0),fSpecials(0),fCleanups(0),
642 fMessageHandlers(0),fStreamerInfo(0),fClassGenerators(0),fSecContexts(0),
643 fProofs(0),fClipboard(0),fDataSets(0),fUUIDs(0),fRootFolder(0),fBrowsables(0),
711 if (!dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")) {
718 auto setNameLocked = [](
TSeqCollection *
l,
const char *collection_name) {
719 l->SetName(collection_name);
821 #if defined(R__WIN32)
823 #elif defined(R__HAS_COCOA)
833 while (initfunc && initfunc[i]) {
882 #ifdef R__COMPLETE_MEM_TERMINATION
906 #ifdef R__COMPLETE_MEM_TERMINATION
918 #ifdef R__COMPLETE_MEM_TERMINATION
953 #ifdef R__COMPLETE_MEM_TERMINATION
980 if (dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")) {
1013 if (!generator)
return;
1037 while ((obj = (
TObject *) next())) {
1039 if (opt && strlen(opt))
1053 if (cl == 0)
return kFALSE;
1060 static void R__ListSlowClose(
TList *files)
1080 dir->
Close(
"nodelete");
1084 cursor = cursor->
Next();
1090 files->
Clear(
"nodelete");
1093 static void R__ListSlowDeleteContent(
TList *files)
1116 cursor = cursor->
Next();
1138 CallFunc_t *socketCloser =
gInterpreter->CallFunc_Factory();
1159 gInterpreter->CallFunc_Exec(socketCloser, ((
char*)socket)+offset);
1166 CallFunc_t *otherCloser =
gInterpreter->CallFunc_Factory();
1167 gInterpreter->CallFunc_SetFuncProto(otherCloser, socket->IsA()->GetClassInfo(),
"Close",
"", &other_offset);
1169 gInterpreter->CallFunc_Exec(otherCloser, ((
char*)socket)+other_offset);
1180 cursor = cursor->
Next();
1188 cursor = cursor->
Next();
1241 Error(
"FindObject",
"Not yet implemented");
1286 while ((obj=next())) {
1290 if (temp)
return temp;
1295 if (!temp && canvas !=
gPad) temp =
gPad->FindObject(
name);
1357 if (!temp &&
gPad) {
1362 if (!temp && canvas !=
gPad) {
1368 if (!temp)
return 0;
1381 if (obj)
return obj;
1397 if (obj)
return obj;
1413 if (
g)
return g->GetTypeName();
1427 Error(
"FindObjectPathName",
"Not yet implemented");
1453 std::string normalized;
1459 if (load && cl==0) {
1492 if (!lcolors)
return 0;
1493 if (color < 0 || color >= lcolors->
GetSize())
return 0;
1495 if (col && col->
GetNumber() == color)
return col;
1496 TIter next(lcolors);
1497 while ((col = (
TColor *) next()))
1498 if (col->
GetNumber() == color)
return col;
1508 return (
TCanvas*)
gROOT->ProcessLine(
"TCanvas::MakeDefCanvas();");
1551 gROOT->ProcessLine(
"TF1::InitStandardFunctions();");
1582 if (addr == 0 || ((
Long_t)addr) == -1)
return 0;
1634 Fatal(
"GetGlobalFunction",
"fInterpreter not initialized");
1641 if (!decl)
return 0;
1646 Error(
"GetGlobalFunction",
1647 "\nDid not find matching TFunction <%s> with \"%s\".",
1667 Fatal(
"GetGlobalFunctionWithPrototype",
"fInterpreter not initialized");
1673 if (!decl)
return 0;
1678 Error(
"GetGlobalFunctionWithPrototype",
1679 "\nDid not find matching TFunction <%s> with \"%s\".",
1752 Fatal(
"GetListOfGlobals",
"fInterpreter not initialized");
1776 Fatal(
"GetListOfGlobalFunctions",
"fInterpreter not initialized");
1809 Fatal(
"GetListOfTypes",
"fInterpreter not initialized");
1838 if (idleTimeInSec <= 0)
1839 (*fApplication).RemoveIdleTimer();
1841 (*fApplication).SetIdleTimer(idleTimeInSec, command);
1851 const char* libsToLoad =
gInterpreter->GetClassSharedLibs(className);
1856 }
else if (
gROOT->GetListOfClasses()
1857 && (cla = (
TClass*)
gROOT->GetListOfClasses()->FindObject(className))) {
1871 if (fname == 0)
return 0;
1876 if (where !=
kNPOS) {
1922 #if defined(R__UNIX)
1923 #if defined(R__HAS_COCOA)
1928 #elif defined(R__WIN32)
1935 fprintf(stderr,
"Fatal in <TROOT::InitSystem>: can't init operating system layer\n");
1938 fprintf(stderr,
"Fatal in <TROOT::InitSystem>: HOME directory not set\n");
1939 fprintf(stderr,
"Fix this by defining the HOME shell variable\n");
1959 if (oldzipmode == 0) {
1960 fprintf(stderr,
"Warning in <TROOT::InitSystem>: ignoring old rootrc entry \"Root.ZipMode = 0\"!\n");
1962 if (oldzipmode == -1 || oldzipmode == 1) {
1977 if (
gDebug > 0 && isatty(2))
1978 fprintf(stderr,
"Info in <TROOT::InitSystem>: running with gDebug = %d\n",
gDebug);
1984 if (msize != -1 || mcnt != -1)
1989 #if defined(R__HAS_COCOA)
1994 {
TUrl dummy(
"/dummy"); }
2018 if (!dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")
2019 && !dlsym(RTLD_DEFAULT,
"usedToIdentifyStaticRoot")) {
2021 void *libRIOHandle = dlopen(libRIO, RTLD_NOW|RTLD_GLOBAL);
2023 if (!libRIOHandle) {
2025 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load library %s\n", err.
Data());
2035 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load library %s\n", err.
Data());
2045 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load symbol %s\n", err.
Data());
2054 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load symbol %s\n", err.
Data());
2058 const char *interpArgs[] = {
2088 for (std::vector<ModuleHeaderInfo_t>::const_iterator
2089 li = GetModuleHeaderInfoBuffer().begin(),
2090 le = GetModuleHeaderInfoBuffer().end(); li != le; ++li) {
2098 li->fFwdNargsToKeepColl,
2099 li->fClassesHeaders,
2103 GetModuleHeaderInfoBuffer().clear();
2183 FILE *mayberootfile = fopen(filename,
"rb");
2184 if (mayberootfile) {
2186 if (fgets(header,5,mayberootfile)) {
2187 result = strncmp(header,
"root",4)==0;
2189 fclose(mayberootfile);
2233 if (arguments.
Length()) {
2290 if (padUpdate &&
gPad)
2328 return (*fApplication).ProcessLine(sline,
kFALSE, error);
2348 return (*fApplication).ProcessLine(sline,
kTRUE, error);
2381 #ifdef ROOT_GIT_COMMIT
2384 #ifdef ROOT_GIT_BRANCH
2388 TString gitinfo =
"gitinfo.txt";
2391 FILE *fp = fopen(filename,
"r");
2409 TTHREAD_TLS(
Bool_t) fgReadingObject =
false;
2410 return fgReadingObject;
2433 Int_t iday,imonth,iyear, ihour, imin;
2434 static const char *months[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
2435 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec" };
2439 imonth = (idate/100)%100;
2440 iyear = idate/10000;
2443 fGitDate.
Form(
"%s %02d %4d, %02d:%02d:00", months[imonth-1], iday, iyear, ihour, imin);
2473 b->SetRefreshFlag(
kTRUE);
2481 gROOT->CloseFiles();
2492 const char** headers,
2493 const char** includePaths,
2494 const char* payloadCode,
2495 const char* fwdDeclCode,
2496 void (*triggerFunc)(),
2498 const char** classesHeaders,
2561 gCling->
RegisterModule(modulename, headers, includePaths, payloadCode, fwdDeclCode, triggerFunc,
2562 fwdDeclsArgToSkip, classesHeaders,
false, hasCxxModule);
2564 GetModuleHeaderInfoBuffer().push_back(ModuleHeaderInfo_t(modulename, headers, includePaths, payloadCode,
2565 fwdDeclCode, triggerFunc, fwdDeclsArgToSkip,
2566 classesHeaders, hasCxxModule));
2611 if (!strncmp(option,
"a", 1)) {
2642 Error(
"SetCutClassName",
"Invalid class name");
2647 Error(
"SetCutClassName",
"Unknown class:%s",
name);
2651 Error(
"SetCutClassName",
"Class:%s does not derive from TCutG",
name);
2663 if (!mode[0])
return;
2688 TString style_name = stylename;
2692 else Error(
"SetStyle",
"Unknown style:%s",style_name.
Data());
2722 if (macroPath.
Length() == 0) {
2723 macroPath =
gEnv->
GetValue(
"Root.MacroPath", (
char*)0);
2724 #if defined(R__WIN32)
2729 if (macroPath.
Length() == 0)
2730 #if !defined(R__WIN32)
2748 if (!newpath || !*newpath)
2751 macroPath = newpath;
2772 const char *wd = webdisplay;
2776 if (!strcmp(wd,
"off")) {
2782 if (!strncmp(wd,
"batch", 5)) {
2785 }
else if (!strncmp(wd,
"nobatch", 7)) {
2808 for (
int i = 0; i <
fgDirLevel; i++) std::cout.put(
' ');
2847 return 10000*(code>>16) + 100*((code&65280)>>8) + (code&255);
2856 int b = (
v -
a*10000)/100;
2857 int c =
v -
a*10000 -
b*100;
2858 return (
a << 16) + (
b << 8) +
c;
2876 static std::vector<std::string> sArgs = {};
2877 sArgs.insert(sArgs.begin(), args.begin(), args.end());
2886 static const char** extraInterpArgs = 0;
2887 return extraInterpArgs;
2893 static Bool_t IgnorePrefix() {
2895 return ignorePrefix;
2914 if (IgnorePrefix()) {
2917 if (rootbindir.
IsNull()) {
2924 const static TString rootbindir = ROOTBINDIR;
2935 if (IgnorePrefix()) {
2938 if (rootlibdir.
IsNull()) {
2945 const static TString rootlibdir = ROOTLIBDIR;
2976 if (IgnorePrefix()) {
2981 const static TString rootdatadir = ROOTDATADIR;
2992 if (IgnorePrefix()) {
2997 const static TString rootdocdir = ROOTDOCDIR;
3008 if (IgnorePrefix()) {
3011 if (rootmacrodir.
IsNull()) {
3012 rootmacrodir =
"macros";
3015 return rootmacrodir;
3018 const static TString rootmacrodir = ROOTMACRODIR;
3019 return rootmacrodir;
3029 if (IgnorePrefix()) {
3032 if (roottutdir.
IsNull()) {
3033 roottutdir =
"tutorials";
3039 const static TString roottutdir = ROOTTUTDIR;
3051 gROOT->EndOfProcessCleanups();
3061 if (IgnorePrefix()) {
3064 if (rootsrcdir.
IsNull()) {
3071 const static TString rootsrcdir = ROOTSRCDIR;
3082 if (IgnorePrefix()) {
3085 if (rooticonpath.
IsNull()) {
3086 rooticonpath =
"icons";
3089 return rooticonpath;
3092 const static TString rooticonpath = ROOTICONPATH;
3093 return rooticonpath;
3103 if (IgnorePrefix()) {
3106 if (ttffontdir.
IsNull()) {
3107 ttffontdir =
"fonts";
3113 const static TString ttffontdir = TTFFONTDIR;
TVirtualMutex * gROOTMutex
@ kMustCleanup
if object destructor must call RecursiveRemove()
R__EXTERN TClassTable * gClassTable
static TClass * R__GetClassIfKnown(const char *className)
Check whether className is a known class, and only autoload if we can.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
TSeqCollection * fBrowsers
static void ShutDown()
Shut down ROOT.
static void Initialize()
Initialize ROOT explicitly.
This class is a specialized TProcessID managing the list of UUIDs.
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
Handle messages that might be generated by the system.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
Using a TBrowser one can browse all ROOT objects.
void RefreshBrowsers()
Refresh all browsers.
const char * FindObjectPathName(const TObject *obj) const
Return path name of obj somewhere in the //root/...
virtual TList * GetList() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
This class implements a plugin library manager.
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.
Int_t GetNtypes() const
Get number of types.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
void * DestroyInterpreter_t(TInterpreter *)
TCanvas * MakeDefCanvas() const
Return a default canvas.
virtual void Clear(Option_t *option="")=0
Bool_t ReadingObject() const
Deprecated (will be removed in next release).
#define R__READ_LOCKGUARD(mutex)
#define sym(otri1, otri2)
virtual void SetName(const char *name)
Set the name of the TNamed.
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
static Int_t RootVersionCode()
Return ROOT version code as defined in RVersion.h.
static void RemoveClass(TClass *cl)
static: Remove a class from the list and map of classes
std::atomic< TApplication * > fApplication
TDataType * GetType(const char *name, Bool_t load=kFALSE) const
Return pointer to type with name.
TCollection * GetListOfGlobals(Bool_t load=kFALSE)
Return list containing the TGlobals currently defined.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
TStyle * GetStyle(const char *name) const
Return pointer to style with name.
TFolder * AddFolder(const char *name, const char *title, TCollection *collection=0)
Create a new folder and add it to the list of folders of this folder, return a pointer to the created...
virtual void Add(TObject *obj)
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
static const TString & GetIncludeDir()
Get the include directory in the installation. Static utility function.
TCollection * GetListOfGlobalFunctions(Bool_t load=kFALSE)
Return list containing the TFunctions currently defined.
void InitInterpreter()
Initialize the interpreter.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TObject * Remove(TObject *)
Remove an object from the in-memory list.
Int_t LoadMacro(const char *filename, Int_t *error=0, Bool_t check=kFALSE)
Load a macro in the interpreter's memory.
const char * Data() const
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.
void DisableImplicitMT()
Disables the implicit multi-threading in ROOT (see EnableImplicitMT).
std::function< const char *()> ErrorSystemMsgHandlerFunc_t
Retrieves the error string associated with the last system error.
static const char * GetMacroPath()
Get macro search path. Static utility function.
A TFolder object is a collection of objects and folders.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void AddLast(TObject *obj)=0
TObject * GetFunction(const char *name) const
Return pointer to function with name.
TSeqCollection * fMappedFiles
Bool_t IsParBranchProcessingEnabled()
Returns true if parallel branch processing is enabled.
virtual void Delete(Option_t *option="")=0
Delete this object.
TListOfFunctionTemplates * fFuncTemplate
static void * gInterpreterLib
static const TString & GetIconPath()
Get the icon path in the installation. Static utility function.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Semi-Abstract base class defining a generic interface to the underlying, low level,...
void Unload()
Mark 'all func' as being unloaded.
static Bool_t & IsImplicitMTEnabledImpl()
Keeps track of the status of ImplicitMT w/o resorting to the load of libImt.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
const std::string & GetRootSys()
static TClass * LoadClass(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
Describes an Operating System directory for the browser.
static const TString & GetMacroDir()
Get the macro directory in the installation. Static utility function.
static void AddClass(TClass *cl)
static: Add a class to the list and map of classes.
void ls(Option_t *option="") const
To list all objects of the application.
static const TString & GetTutorialDir()
Get the tutorials directory in the installation. Static utility function.
static constexpr double s
void RemoveClass(TClass *)
Remove a class from the list and map of classes.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
void ReleaseDefaultErrorHandler()
Destructs resources that are taken by using the default error handler.
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.
Abstract base class defining a generic interface to the underlying Operating System.
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
static const char * GetTutorialsDir()
Get the tutorials directory in the installation.
This class implements a mutex interface.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * GetGitDate()
Return date/time make was run.
virtual const char * GetError()
Return system error string.
TDictionary::DeclId_t DeclId_t
Int_t GetNclasses() const
Get number of classes.
virtual void Delete(Option_t *option="")
Delete all TDataMember object files.
TSeqCollection * fClipboard
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
static std::atomic< TDirectory * > & CurrentDirectory()
Return the current directory for the current thread.
Short_t GetDeclFileLine() const
R__EXTERN TVirtualRWMutex * gCoreMutex
void Reset(Option_t *option="")
Delete all global interpreter objects created since the last call to Reset.
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
void SetEditorMode(const char *mode="")
Set editor mode.
void SetStyle(const char *stylename="Default")
Change current style to style with name stylename.
TObject * At(Int_t idx) const
static Bool_t MemCheck()
Return kTRUE if the memory leak checker is on.
TSeqCollection * fCleanups
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Global variables class (global variables are obtained from CINT).
void EndOfProcessCleanups()
Execute the cleanups necessary at the end of the process, in particular those that must be executed b...
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
R__EXTERN TVirtualMutex * gGlobalMutex
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
#define ROOT_RELEASE_DATE
void EnableParBranchProcessing()
Globally enables the parallel branch processing, which is a case of implicit multi-threading (IMT) in...
Long_t ProcessLineSync(const char *line, Int_t *error=0)
Process interpreter command via TApplication::ProcessLine().
TROOT *(* GetROOTFun_t)()
Option_t * GetOption() const
Bool_t R_ISREG(Int_t mode)
TCollection * GetListOfFunctionTemplates()
static Bool_t BlockAllSignals(Bool_t b)
Block or unblock all signals. Returns the previous block status.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
TListOfFunctions * GetGlobalFunctions()
Internal routine returning, and creating if necessary, the list of global function.
static Int_t IDATQQ(const char *date)
Return built date as integer, i.e. "Apr 28 2000" -> 20000428.
void SaveContext()
Save the current interpreter context.
TInterpreter * fInterpreter
static void CallCloseFiles()
Insure that the files, canvases and sockets are closed.
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.
virtual const char * WorkingDirectory()
Return working directory.
R__EXTERN TVirtualX * gGXBatch
TString & ReplaceAll(const TString &s1, const TString &s2)
ROOT top level object description.
virtual TObject * First() const =0
static const TString & GetRootSys()
Get the rootsys directory in the installation. Static utility function.
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form:
static void Cleanup()
static function (called by TROOT destructor) to delete all TProcessIDs
void SetCutClassName(const char *name="TCutG")
Set the default graphical cut class name for the graphics editor By default the graphics editor creat...
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
Ssiz_t Last(char c) const
Find last occurrence of a character c.
static TList & GetEarlyRegisteredGlobals()
Returns list collected globals Used to storeTGlobalMappedFunctions from other libs,...
#define ROOT_VERSION_CODE
void SetObject(TObject *obj)
virtual void SaveContext()=0
A collection of TDataType designed to hold the typedef information and numerical type information.
virtual const char * GetName() const
Returns name of object.
TInterpreter * CreateInterpreter_t(void *shlibHandle, const char *argv[])
Long_t Macro(const char *filename, Int_t *error=0, Bool_t padUpdate=kTRUE)
Execute a macro in the interpreter.
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
static TVirtualX *& Instance()
Returns gVirtualX global.
static Int_t ConvertVersionCode2Int(Int_t code)
Convert version code to an integer, i.e. 331527 -> 51507.
void Unload()
Mark 'all func' as being unloaded.
virtual TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at //root.
virtual Bool_t Init()
Initialize the OS interface.
TObject * GetGeometry(const char *name) const
Return pointer to Geometry with name.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
static const TString & GetSourceDir()
Get the source directory in the installation. Static utility function.
static void at_exit_of_TROOT()
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual bool UseRWLock()
Set this collection to use a RW lock upon access, making it thread safe.
R__EXTERN TGuiFactory * gBatchGuiFactory
TCollection * GetListOfFunctionOverloads(const char *name) const
Return the collection of functions named "name".
virtual TObjLink * FirstLink() const
Bool_t IsRootFile(const char *filename) const
Return true if the file is local and is (likely) to be a ROOT file.
This ABC is a factory for GUI components.
R__EXTERN TStyle * gStyle
static const std::vector< std::string > & AddExtraInterpreterArgs(const std::vector< std::string > &args)
Provide command line arguments to the interpreter construction.
THashTable implements a hash table to store TObject's.
R__EXTERN TVirtualMutex * gInterpreterMutex
Basic data type descriptor (datatype information is obtained from CINT).
static TVirtualPad *& Pad()
Return the current pad for the current thread.
virtual TObject * FindObject(const char *name) const
Specialize FindObject to do search for the a function just by name or create it if its not already in...
static void MakeFunctor(const char *name, const char *type, GlobFunc &func)
The color creation and management class.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TSeqCollection * GetListOfGeometries() const
TSeqCollection * fSecContexts
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
static void SetDirLevel(Int_t level=0)
Return Indentation level for ls().
void BuildDirectory(TFile *motherFile, TDirectory *motherDir)
Initialise directory to defaults.
TString & Remove(Ssiz_t pos)
virtual TObject * FindObject(const char *name) const
Returns address of a ROOT object if it exists.
virtual void Delete(Option_t *option="")
Delete all TFunction object files.
static void BuildStyles()
Create some standard styles.
void Message(Int_t id, const TObject *obj)
Process message id called by obj.
static const TString & GetDocDir()
Get the documentation directory in the installation. Static utility function.
void SetReadingObject(Bool_t flag=kTRUE)
Bool_t ClassSaved(TClass *cl)
return class status bit kClassSaved for class cl This function is called by the SavePrimitive functio...
Objects following this interface can be passed onto the TROOT object to implement a user customized w...
#define ROOT_RELEASE_TIME
UInt_t GetThreadPoolSize()
Returns the size of ROOT's thread pool.
void InitThreads()
Load and initialize thread library.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
TSeqCollection * fDataSets
const char * GetDeclFileName() const
Return name of the file containing the declaration of this class.
TSeqCollection * fMessageHandlers
R__EXTERN TGuiFactory * gGuiFactory
static void SetObjectStat(Bool_t stat)
Turn on/off tracking of objects in the TObjectTable.
UInt_t GetImplicitMTPoolSize()
Returns the size of the pool used for implicit multi-threading.
TGlobal * GetGlobal(const char *name, Bool_t load=kFALSE) const
Return pointer to global variable by name.
void InitSystem()
Initialize operating system interface.
void Browse(TBrowser *b)
Add browsable objects to TBrowser.
void AddClassGenerator(TClassGenerator *gen)
Add a class generator.
#define R__LOCKGUARD(mutex)
TStyle objects may be created to define special styles.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TPluginManager * fPluginManager
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
ClassInfo_t * GetClassInfo() const
virtual void RegisterModule(const char *, const char **, const char **, const char *, const char *, void(*)(), const FwdDeclArgsToKeepCollection_t &fwdDeclArgsToKeep, const char **classesHeaders, Bool_t lateRegistration=false, Bool_t hasCxxModule=false)=0
R__EXTERN TROOT * gROOTLocal
TSeqCollection * GetListOfColors() const
TListOfFunctions * fGlobalFunctions
void ReadGitInfo()
Read Git commit information and branch name from the etc/gitinfo.txt file.
void SetWebDisplay(const char *webdisplay)
Specify where web graphics shall be rendered.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
static Int_t ConvertVersionInt2Code(Int_t v)
Convert version as an integer to version code as used in RVersion.h.
virtual void CleanCompiledMacros()
Remove the shared libs produced by the CompileMacro() function.
virtual void Initialize()=0
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
This class represents a WWW compatible URL.
void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, const char *msg)
The default error handler function.
static constexpr double mm
TCollection * GetListOfTypes(Bool_t load=kFALSE)
Return a dynamic list giving access to all TDataTypes (typedefs) currently defined.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
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,...
TFunction * GetGlobalFunctionWithPrototype(const char *name, const char *proto=0, Bool_t load=kFALSE)
Return pointer to global function by name.
typedef void((*Func_t)())
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
@ kInvalidObject
if object ctor succeeded but object should not be used
Bool_t & GetReadingObject()
TColor * GetColor(Int_t color) const
Return address of color with index color.
const char * FindObjectClassName(const char *name) const
Returns class name of a ROOT object including CINT globals.
static GetROOTFun_t gGetROOT
TSeqCollection * GetListOfStyles() const
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
void Load()
Load all the functions known to the interpreter for the scope 'fClass' into this collection.
R__EXTERN TSystem * gSystem
void ls(Option_t *option="") const override
List Directory contents.
TFunction * Get(DeclId_t id)
Return (after creating it if necessary) the TMethod or TFunction describing the function correspondin...
TSeqCollection * fClosedObjects
Long_t ProcessLineFast(const char *line, Int_t *error=0)
Process interpreter command directly via CINT interpreter.
Sequenceable collection abstract base class.
const std::string & GetEtcDir()
void CloseFiles()
Close any files and sockets that gROOT knows about.
virtual const char * Getenv(const char *env)
Get environment variable.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
void Load()
Load all the DataMembers known to the interpreter for the scope 'fClass' into this collection.
Bool_t IsExecutingMacro() const
static Int_t GetDirLevel()
return directory level
This class registers for all classes their name, id and dictionary function in a hash table.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
The file contains utilities which are foundational and could be used across the core component of ROO...
@ kNotDeleted
object has not been deleted
TSeqCollection * fCanvases
TDictionary * Get(DeclId_t id)
Return (after creating it if necessary) the TDataMember describing the data member corresponding to t...
TObject * FindSpecialObject(const char *name, void *&where)
Returns address and folder of a ROOT object if it exists.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
TFunctionTemplate * GetFunctionTemplate(const char *name)
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t fIsWebDisplayBatch
The TEnv class reads config files, by default named .rootrc.
void RecursiveRemove(TObject *obj)
Recursively remove this object from the list of Cleanups.
static void SetMacroPath(const char *newpath)
Set or extend the macro search path.
TListOfDataMembers * fGlobals
static const TString & GetLibDir()
Get the library directory in the installation. Static utility function.
static DestroyInterpreter_t * gDestroyInterpreter
virtual void Add(TObject *obj)
TObject * GetObject() const
R__EXTERN const char * gRootDir
static Func_t GetSymInLibImt(const char *funcname)
Mother of all ROOT objects.
R__EXTERN TInterpreter * gCling
virtual ~TROOT()
Clean up and free resources used by ROOT (files, network sockets, shared memory segments,...
TSeqCollection * fSpecials
virtual void Add(TObject *obj)=0
virtual void Clear(Option_t *option="")
Remove all objects from the list.
const TObject * fPrimitive
TCollection * fClassGenerators
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,...
Describe directory structure in memory.
static void CreateApplication()
static void PrintStatistics()
Print memory usage statistics.
static void CleanUpROOTAtExit()
Clean up at program termination before global objects go out of scope.
virtual TObject * FindObjectAnyFile(const char *name) const
Scan the memory lists of all files for an object with name.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Long_t ProcessLine(const char *line, Int_t *error=0)
Process interpreter command via TApplication::ProcessLine().
TSeqCollection * fStreamerInfo
TFunction * GetGlobalFunction(const char *name, const char *params=0, Bool_t load=kFALSE)
Return pointer to global function by name.
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
ErrorSystemMsgHandlerFunc_t SetErrorSystemMsgHandler(ErrorSystemMsgHandlerFunc_t h)
Returns the previous system error message handler.
static void EnableStatistics(int size=-1, int ix=-1)
Enable memory usage statistics gathering.
TSeqCollection * fSockets
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
void AddClass(TClass *cl)
Add a class to the list and map of classes.
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
Collection abstract base class.
void Idle(UInt_t idleTimeInSec, const char *command=0)
Execute command when system has been idle for idleTimeInSec seconds.
Wrapper around a TObject so it can be stored in a TList.
static Int_t IVERSQ()
Return version id as an integer, i.e. "2.22/04" -> 22204.
R__EXTERN TPluginManager * gPluginMgr
TSeqCollection * GetListOfFiles() const
void SetName(const char *newname) override
Set the name for directory If the directory name is changed after the directory was written once,...
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.
TCollection * GetListOfEnums(Bool_t load=kFALSE)
void DisableParBranchProcessing()
Globally disables the IMT use case of parallel branch processing, deactivating the corresponding lock...
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
virtual TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at this folder.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual TObject * Last() const =0
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
static const char **& GetExtraInterpreterArgs()
INTERNAL function! Used by rootcling to inject interpreter arguments through a C-interface layer.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
TSeqCollection * fGeometries
Global functions class (global functions are obtained from CINT).
const std::string & GetIncludeDir()
\ returns the include directory in the installation.
void MinimalErrorHandler(int level, Bool_t abort, const char *location, const char *msg)
A very simple error handler that is usually replaced by the TROOT default error handler.
static Int_t ITIMQQ(const char *time)
Return built time as integer (with min precision), i.e.
static TProcessID * AddProcessID()
Static function to add a new TProcessID to the list of PIDs.
virtual void ResetSignals()
Reset signals handlers to previous behaviour.
virtual void HandleMessage(Long_t id, const TObject *obj)
Store message origin, keep statistics and call Notify().
Dictionary for function template This class describes one single function template.
TSeqCollection * GetListOfBrowsers() const
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
R__DLLEXPORT TInterpreter * CreateInterpreter(void *interpLibHandle, const char *argv[])
void LoadHandlersFromEnv(TEnv *env)
Load plugin handlers specified in config file, like: