71#include "RConfigure.h"
72#include "RConfigOptions.h"
84#define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
86#define dlopen(library_name, flags) ::LoadLibrary(library_name)
87#define dlclose(library) ::FreeLibrary((HMODULE)library)
89 static char Msg[1000];
90 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(),
91 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), Msg,
95FARPROC dlsym(
void *library,
const char *function_name)
99 FARPROC address = NULL;
101 if (library == RTLD_DEFAULT) {
102 if (EnumProcessModules(::GetCurrentProcess(), hMods,
sizeof(hMods), &cbNeeded)) {
103 for (i = 0; i < (cbNeeded /
sizeof(HMODULE)); i++) {
104 address = ::GetProcAddress((HMODULE)hMods[i], function_name);
111 return ::GetProcAddress((HMODULE)library, function_name);
114#elif defined(__APPLE__)
116#include <mach-o/dyld.h>
164#if defined(R__HAS_COCOA)
170#elif defined(R__WIN32)
184void **(*gThreadTsd)(
void*,
Int_t) =
nullptr;
192 Int_t maj, min, cycle;
194 return 10000*maj + 100*min + cycle;
203 Error(
"TSystem::IDATQQ",
"nullptr date string, expected e.g. 'Dec 21 2022'");
207 static const char *months[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
208 "Jun",
"Jul",
"Aug",
"Sep",
"Oct",
212 if (sscanf(date,
"%s %d %d", sm, &dd, &yy) != 3) {
213 Error(
"TSystem::IDATQQ",
"Cannot parse date string '%s', expected e.g. 'Dec 21 2022'", date);
216 for (
int i = 0; i < 12; i++)
217 if (!strncmp(sm, months[i], 3)) {
221 return 10000*yy + 100*mm + dd;
231 sscanf(time,
"%d:%d:%d", &hh, &mm, &ss);
243 if (
gROOT->GetListOfFiles())
244 gROOT->GetListOfFiles()->Delete(
"slow");
245 if (
gROOT->GetListOfSockets())
246 gROOT->GetListOfSockets()->Delete();
247 if (
gROOT->GetListOfMappedFiles())
248 gROOT->GetListOfMappedFiles()->Delete(
"slow");
249 if (
gROOT->GetListOfClosedObjects())
250 gROOT->GetListOfClosedObjects()->Delete(
"slow");
261 struct ModuleHeaderInfo_t {
262 ModuleHeaderInfo_t(
const char* moduleName,
263 const char** headers,
264 const char** includePaths,
265 const char* payloadCode,
266 const char* fwdDeclCode,
267 void (*triggerFunc)(),
269 const char **classesHeaders,
271 fModuleName(moduleName),
273 fPayloadCode(payloadCode),
274 fFwdDeclCode(fwdDeclCode),
275 fIncludePaths(includePaths),
276 fTriggerFunc(triggerFunc),
277 fClassesHeaders(classesHeaders),
278 fFwdNargsToKeepColl(fwdDeclsArgToSkip),
279 fHasCxxModule(hasCxxModule) {}
281 const char* fModuleName;
282 const char** fHeaders;
283 const char* fPayloadCode;
284 const char* fFwdDeclCode;
285 const char** fIncludePaths;
286 void (*fTriggerFunc)();
287 const char** fClassesHeaders;
293 std::vector<ModuleHeaderInfo_t>& GetModuleHeaderInfoBuffer() {
294 static std::vector<ModuleHeaderInfo_t> moduleHeaderInfoBuffer;
295 return moduleHeaderInfoBuffer;
298 enum class AutoReg :
unsigned char {
309 AutoReg &ObjectAutoRegistrationEnabledImpl()
311 static constexpr auto rcName =
"Root.ObjectAutoRegistration";
312 static constexpr auto envName =
"ROOT_OBJECT_AUTO_REGISTRATION";
313 thread_local static AutoReg tlsState = AutoReg::kNotInitialised;
315 static const AutoReg defaultState = []() {
316 AutoReg autoReg = AutoReg::kOn;
317 std::stringstream infoMessage;
320 const auto desiredValue =
gEnv->GetValue(rcName, -1);
321 if (desiredValue == 0) {
322 autoReg = AutoReg::kOff;
323 infoMessage <<
"disabled in " <<
gEnv->GetRcName();
324 }
else if (desiredValue == 1) {
325 autoReg = AutoReg::kOn;
326 infoMessage <<
"enabled in " <<
gEnv->GetRcName();
327 }
else if (desiredValue != -1) {
328 Error(
"TROOT",
"%s should be 0 or 1", rcName);
332 if (
const auto env =
gSystem->Getenv(envName); env) {
333 int desiredValue = -1;
335 desiredValue = std::stoi(env);
336 }
catch (std::invalid_argument &
e) {
337 Error(
"TROOT",
"%s should be 0 or 1, exception message: '%s'", envName,
e.what());
339 if (desiredValue == 0) {
340 autoReg = AutoReg::kOff;
341 infoMessage << (infoMessage.str().empty() ?
"" :
" and ") <<
"disabled using the environment variable "
343 }
else if (desiredValue == 1) {
344 autoReg = AutoReg::kOn;
345 infoMessage << (infoMessage.str().empty() ?
"" :
" and ") <<
"enabled using the environment variable "
348 Error(
"TROOT",
"%s should be 0 or 1", envName);
352 if (!infoMessage.str().empty()) {
353 Info(
"TROOT",
"Object auto registration %s\n", infoMessage.str().c_str());
359 if (tlsState == AutoReg::kNotInitialised) {
360 assert(defaultState != AutoReg::kNotInitialised);
361 tlsState = defaultState;
464 if (!initInterpreter) {
465 initInterpreter =
kTRUE;
478 const static bool loadSuccess = dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")? false : 0 <=
gSystem->Load(
"libImt");
480 if (
auto sym =
gSystem->DynFindSymbol(
nullptr, funcname)) {
483 Error(
"GetSymInLibImt",
"Cannot get symbol %s.", funcname);
502 ::Warning(
"EnableParBranchProcessing",
"Cannot enable parallel branch processing, please build ROOT with -Dimt=ON");
516 ::Warning(
"DisableParBranchProcessing",
"Cannot disable parallel branch processing, please build ROOT with -Dimt=ON");
541 return isImplicitMTEnabled;
624 ::Warning(
"EnableImplicitMT",
"Cannot enable implicit multi-threading with %d threads, please build ROOT with -Dimt=ON", numthreads);
648 "Cannot enable implicit multi-threading with config %d, please build ROOT with -Dimt=ON",
649 static_cast<int>(config));
663 ::Warning(
"DisableImplicitMT",
"Cannot disable implicit multi-threading, please build ROOT with -Dimt=ON");
691 namespace Experimental {
748 ObjectAutoRegistrationEnabledImpl() = AutoReg::kOn;
756 ObjectAutoRegistrationEnabledImpl() = AutoReg::kOff;
764 const auto state = ObjectAutoRegistrationEnabledImpl();
765 assert(state != AutoReg::kNotInitialised);
766 return state == AutoReg::kOn;
870 if (!dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")) {
877 auto setNameLocked = [](
TSeqCollection *
l,
const char *collection_name) {
878 l->SetName(collection_name);
931 fRootFolder->AddFolder(
"ROOT Memory",
"List of Objects in the gROOT Directory",
fList);
977 if (
gSystem->Getenv(
"ROOT_BATCH"))
980#if defined(R__WIN32) || defined(R__HAS_COCOA)
983 if (
gSystem->Getenv(
"DISPLAY"))
990 const char *webdisplay =
gSystem->Getenv(
"ROOT_WEBDISPLAY");
991 if (!webdisplay || !*webdisplay)
992 webdisplay =
gEnv->GetValue(
"WebGui.Display",
"");
993 if (webdisplay && *webdisplay)
997 while (initfunc && initfunc[i]) {
1056#ifdef R__COMPLETE_MEM_TERMINATION
1079#ifdef R__COMPLETE_MEM_TERMINATION
1091#ifdef R__COMPLETE_MEM_TERMINATION
1114 gSystem->CleanCompiledMacros();
1124#ifdef R__COMPLETE_MEM_TERMINATION
1151 if (dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")) {
1184 if (!generator)
return;
1208 while ((obj = (
TObject *) next())) {
1210 if (opt && strlen(opt))
1218 std::set<TClass *> &GetClassSavedSet()
1220 static thread_local std::set<TClass*> gClassSaved;
1235 auto result = GetClassSavedSet().insert(cl);
1238 return !result.second;
1245 GetClassSavedSet().clear();
1249 template <
typename Content>
1250 static void R__ListSlowClose(
TList *files)
1258 Content *dir =
static_cast<Content*
>( cursor->
GetObject() );
1270 dir->Close(
"nodelete");
1274 cursor = cursor->
Next();
1280 files->
Clear(
"nodelete");
1283 static void R__ListSlowDeleteContent(
TList *files)
1306 cursor = cursor->
Next();
1320 R__ListSlowClose<TDirectory>(
static_cast<TList*
>(
fFiles));
1330 CallFunc_t *socketCloser =
gInterpreter->CallFunc_Factory();
1350 if (
socket->IsA()->InheritsFrom(socketClass)) {
1358 CallFunc_t *otherCloser =
gInterpreter->CallFunc_Factory();
1359 gInterpreter->CallFunc_SetFuncProto(otherCloser,
socket->IsA()->GetClassInfo(),
"Close",
"", &other_offset);
1372 cursor = cursor->
Next();
1380 cursor = cursor->
Next();
1412 fList->Delete(
"slow");
1436 Error(
"FindObject",
"Not yet implemented");
1481 while ((obj=next())) {
1563 if (!
temp)
return nullptr;
1576 if (obj)
return obj;
1592 if (obj)
return obj;
1608 if (
g)
return g->GetTypeName();
1622 Error(
"FindObjectPathName",
"Not yet implemented");
1648 std::string normalized;
1654 if (load && cl==
nullptr) {
1687 if (!lcolors)
return nullptr;
1688 if (color < 0 || color >= lcolors->
GetSize())
return nullptr;
1690 if (col && col->
GetNumber() == color)
return col;
1691 TIter next(lcolors);
1692 while ((col = (
TColor *) next()))
1693 if (col->
GetNumber() == color)
return col;
1703 return (
TCanvas*)
gROOT->ProcessLine(
"TCanvas::MakeDefCanvas();");
1739 static std::atomic<bool> isInited =
false;
1743 bool wasInited = isInited.load();
1746 if (
f1 || wasInited)
1755 [[maybe_unused]]
static const auto _res = []() {
1756 gROOT->ProcessLine(
"TF1::InitStandardFunctions(); TF2::InitStandardFunctions(); TF3::InitStandardFunctions();");
1788 if (addr ==
nullptr || ((
Longptr_t)addr) == -1)
return nullptr;
1840 Fatal(
"GetGlobalFunction",
"fInterpreter not initialized");
1847 if (!decl)
return nullptr;
1852 Error(
"GetGlobalFunction",
1853 "\nDid not find matching TFunction <%s> with \"%s\".",
1873 Fatal(
"GetGlobalFunctionWithPrototype",
"fInterpreter not initialized");
1879 if (!decl)
return nullptr;
1884 Error(
"GetGlobalFunctionWithPrototype",
1885 "\nDid not find matching TFunction <%s> with \"%s\".",
1958 Fatal(
"GetListOfGlobals",
"fInterpreter not initialized");
1982 Fatal(
"GetListOfGlobalFunctions",
"fInterpreter not initialized");
2015 Fatal(
"GetListOfTypes",
"fInterpreter not initialized");
2033 return fTypes->GetSize();
2044 if (idleTimeInSec <= 0)
2045 (*fApplication).RemoveIdleTimer();
2047 (*fApplication).SetIdleTimer(idleTimeInSec, command);
2057 const char* libsToLoad =
gInterpreter->GetClassSharedLibs(className);
2062 }
else if (
gROOT->GetListOfClasses()
2063 && (cla = (
TClass*)
gROOT->GetListOfClasses()->FindObject(className))) {
2077 if (fname ==
nullptr)
return 0;
2082 if (where !=
kNPOS) {
2116 if (decfile !=
gSystem->BaseName(fname)) {
2129#if defined(R__HAS_COCOA)
2134#elif defined(R__WIN32)
2141 fprintf(stderr,
"Fatal in <TROOT::InitSystem>: can't init operating system layer\n");
2145 if (!
gSystem->HomeDirectory()) {
2146 fprintf(stderr,
"Fatal in <TROOT::InitSystem>: HOME directory not set\n");
2147 fprintf(stderr,
"Fix this by defining the HOME shell variable\n");
2158 if (!
gEnv->GetValue(
"Root.ErrorHandlers", 1))
2166 Int_t oldzipmode =
gEnv->GetValue(
"Root.ZipMode", -1);
2167 if (oldzipmode == 0) {
2168 fprintf(stderr,
"Warning in <TROOT::InitSystem>: ignoring old rootrc entry \"Root.ZipMode = 0\"!\n");
2170 if (oldzipmode == -1 || oldzipmode == 1) {
2178 Int_t zipmode =
gEnv->GetValue(
"Root.CompressionAlgorithm", oldzipmode);
2182 if ((sdeb =
gSystem->Getenv(
"ROOTDEBUG")))
2185 if (
gDebug > 0 && isatty(2))
2186 fprintf(stderr,
"Info in <TROOT::InitSystem>: running with gDebug = %d\n",
gDebug);
2188#if defined(R__HAS_COCOA)
2193 {
TUrl dummy(
"/dummy"); }
2204 if (
gEnv->GetValue(
"Root.UseThreads", 0) ||
gEnv->GetValue(
"Root.EnableThreadSafety", 0)) {
2218 if (!dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")
2219 && !dlsym(RTLD_DEFAULT,
"usedToIdentifyStaticRoot")) {
2220 char *libRIO =
gSystem->DynamicPathName(
"libRIO");
2221 void *libRIOHandle = dlopen(libRIO, RTLD_NOW|RTLD_GLOBAL);
2223 if (!libRIOHandle) {
2225 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load library %s\n",
err.Data());
2229 char *libcling =
gSystem->DynamicPathName(
"libCling");
2235 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load library %s\n",
err.Data());
2245 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load symbol %s\n",
err.Data());
2254 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load symbol %s\n",
err.Data());
2258 const char *interpArgs[] = {
2288 for (std::vector<ModuleHeaderInfo_t>::const_iterator
2289 li = GetModuleHeaderInfoBuffer().begin(),
2290 le = GetModuleHeaderInfoBuffer().end(); li != le; ++li) {
2298 li->fFwdNargsToKeepColl,
2299 li->fClassesHeaders,
2303 GetModuleHeaderInfoBuffer().clear();
2339 if (
char *path =
gSystem->DynamicPathName(lib,
kTRUE)) {
2356 gCling->RegisterAutoLoadedLibrary(libname);
2386 FILE *mayberootfile = fopen(filename,
"rb");
2387 if (mayberootfile) {
2389 if (fgets(header,5,mayberootfile)) {
2390 result = strncmp(header,
"root",4)==0;
2392 fclose(mayberootfile);
2434 TString fname =
gSystem->SplitAclicMode(filename, aclicMode, arguments, io);
2436 if (arguments.
Length()) {
2477 TString fname =
gSystem->SplitAclicMode(filename, aclicMode, arguments, io);
2493 if (padUpdate &&
gPad)
2531 return (*fApplication).ProcessLine(sline,
kFALSE, error);
2551 return (*fApplication).ProcessLine(sline,
kTRUE, error);
2584 TString filename =
"gitinfo.txt";
2587 FILE *fp = fopen(filename,
"r");
2601 Error(
"ReadGitInfo()",
"Cannot determine git info: etc/gitinfo.txt not found!");
2606 TTHREAD_TLS(
Bool_t) fgReadingObject =
false;
2607 return fgReadingObject;
2630 Int_t iday,imonth,iyear, ihour, imin;
2631 static const char *months[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
2632 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec" };
2636 imonth = (idate/100)%100;
2637 iyear = idate/10000;
2640 fGitDate.Form(
"%s %02d %4d, %02d:%02d:00", months[imonth-1], iday, iyear, ihour, imin);
2670 b->SetRefreshFlag(
kTRUE);
2678 gROOT->CloseFiles();
2691 const char** headers,
2692 const char** includePaths,
2693 const char* payloadCode,
2694 const char* fwdDeclCode,
2695 void (*triggerFunc)(),
2697 const char** classesHeaders,
2760 gCling->RegisterModule(modulename, headers, includePaths, payloadCode, fwdDeclCode, triggerFunc,
2761 fwdDeclsArgToSkip, classesHeaders,
false, hasCxxModule);
2763 GetModuleHeaderInfoBuffer().push_back(ModuleHeaderInfo_t(modulename, headers, includePaths, payloadCode,
2764 fwdDeclCode, triggerFunc, fwdDeclsArgToSkip,
2765 classesHeaders, hasCxxModule));
2810 if (!strncmp(
option,
"a", 1)) {
2841 Error(
"SetCutClassName",
"Invalid class name");
2846 Error(
"SetCutClassName",
"Unknown class:%s",
name);
2850 Error(
"SetCutClassName",
"Class:%s does not derive from TCutG",
name);
2862 if (!mode[0])
return;
2887 TString style_name = stylename;
2891 else Error(
"SetStyle",
"Unknown style:%s",style_name.
Data());
2921 if (macroPath.
Length() == 0) {
2922 macroPath =
gEnv->GetValue(
"Root.MacroPath", (
char*)
nullptr);
2923#if defined(R__WIN32)
2928 if (macroPath.
Length() == 0)
2929#if !defined(R__WIN32)
2947 if (!newpath || !*newpath)
2950 macroPath = newpath;
2990 const char *wd = webdisplay ? webdisplay :
"";
2993 static TString canName =
gEnv->GetValue(
"Canvas.Name",
"");
2994 static TString brName =
gEnv->GetValue(
"Browser.Name",
"");
2995 static TString trName =
gEnv->GetValue(
"TreeViewer.Name",
"");
2996 static TString geomName =
gEnv->GetValue(
"GeomPainter.Name",
"");
3000 if (!strcmp(wd,
"off")) {
3007 if (!strncmp(wd,
"server", 6)) {
3011 if ((wd[7] >=
'0') && (wd[7] <=
'9')) {
3014 gEnv->SetValue(
"WebGui.HttpPort", port);
3016 Error(
"SetWebDisplay",
"Wrong port parameter %s for server", wd+7);
3018 gEnv->SetValue(
"WebGui.UnixSocket", wd+7);
3029 gEnv->SetValue(
"Canvas.Name", canName);
3030 gEnv->SetValue(
"Browser.Name", brName);
3031 gEnv->SetValue(
"TreeViewer.Name", trName);
3032 gEnv->SetValue(
"GeomPainter.Name", geomName);
3034 gEnv->SetValue(
"Canvas.Name",
"TRootCanvas");
3035 gEnv->SetValue(
"Browser.Name",
"TRootBrowser");
3036 gEnv->SetValue(
"TreeViewer.Name",
"TTreeViewer");
3037 gEnv->SetValue(
"GeomPainter.Name",
"root");
3054 for (
int i = 0; i <
fgDirLevel; i++) std::cout.put(
' ');
3085 return 10000*(code>>16) + 100*((code&65280)>>8) + (code&255);
3094 int b = (
v -
a*10000)/100;
3095 int c =
v -
a*10000 -
b*100;
3096 return (
a << 16) + (
b << 8) +
c;
3114 static std::vector<std::string> sArgs = {};
3115 sArgs.insert(sArgs.begin(), args.begin(), args.end());
3124 static const char** extraInterpArgs =
nullptr;
3125 return extraInterpArgs;
3131static Bool_t IgnorePrefix() {
3132 static Bool_t ignorePrefix =
gSystem->Getenv(
"ROOTIGNOREPREFIX");
3133 return ignorePrefix;
3152 if (IgnorePrefix()) {
3155 if (rootbindir.
IsNull()) {
3162 const static TString rootbindir = ROOTBINDIR;
3180#if defined(R__WIN32)
3181 static bool initialized =
false;
3210 static bool haveLooked =
false;
3217 namespace fs = std::filesystem;
3219#if defined(__APPLE__)
3221 uint32_t count = _dyld_image_count();
3222 for (uint32_t i = 0; i < count; i++) {
3223 const char *path = _dyld_get_image_name(i);
3229 rootlibdir = p.parent_path().c_str();
3234#elif defined(_WIN32)
3236 HMODULE modulesStack[1024];
3237 std::vector<HMODULE> modulesHeap;
3238 HMODULE *modules = modulesStack;
3241 HANDLE process = GetCurrentProcess();
3243 bool success = EnumProcessModules(process, modulesStack,
sizeof(modulesStack), &needed);
3250 if (needed >
sizeof(modulesStack)) {
3251 modulesHeap.resize(needed /
sizeof(HMODULE));
3252 success = EnumProcessModules(process, modulesHeap.data(), needed, &needed);
3253 modules = modulesHeap.data();
3257 const unsigned int count = needed /
sizeof(HMODULE);
3259 for (
unsigned int i = 0; i < count; ++i) {
3260 wchar_t wpath[MAX_PATH];
3261 DWORD len = GetModuleFileNameW(modules[i], wpath, MAX_PATH);
3269 if (len == MAX_PATH) {
3271 int utf8len = WideCharToMultiByte(CP_UTF8, 0, wpath, -1,
nullptr, 0,
nullptr,
nullptr);
3273 std::string utf8path(utf8len - 1,
'\0');
3274 WideCharToMultiByte(CP_UTF8, 0, wpath, -1, utf8path.data(), utf8len,
nullptr,
nullptr);
3276 utf8path +=
"... [TRUNCATED]";
3278 ::Error(
"TROOT::GetSharedLibDir",
3279 "Module path \"%s\" exceeded maximum path length of %u characters! "
3280 "ROOT might not be able to resolve its resource directories.",
3281 utf8path.c_str(), MAX_PATH);
3290 const std::wstring wdir = p.parent_path().wstring();
3292 int utf8len = WideCharToMultiByte(CP_UTF8, 0, wdir.c_str(), -1,
nullptr, 0,
nullptr,
nullptr);
3294 std::string utf8dir(utf8len - 1,
'\0');
3295 WideCharToMultiByte(CP_UTF8, 0, wdir.c_str(), -1, utf8dir.data(), utf8len,
nullptr,
nullptr);
3297 rootlibdir = utf8dir.c_str();
3305 auto callback = +[](
struct dl_phdr_info *info,
size_t ,
void *data) ->
int {
3307 if (!info->dlpi_name)
3310 fs::path p = info->dlpi_name;
3317 fs::path resolved = fs::canonical(p, ec);
3320 "Failed to canonicalize detected ROOT shared library path:\n"
3322 "Error code: %d (%s)\n"
3323 "Error category: %s\n"
3324 "This is an unexpected internal error and ROOT might not work.\n"
3325 "Please report this issue on GitHub: https://github.com/root-project/root/issues",
3326 p.string().c_str(), ec.value(), ec.message().c_str(), ec.category().name());
3331 libdir = resolved.parent_path().c_str();
3337 dl_iterate_phdr(callback, &rootlibdir);
3351 if (!rootincdir.
IsNull())
3354 namespace fs = std::filesystem;
3363 const bool isBuildTree = fs::exists(libPath /
"root-build-tree-marker");
3365 fs::path includePath = isBuildTree ?
"../include" : INSTALL_LIB_TO_INCLUDE;
3368 if (!includePath.is_absolute()) {
3369 includePath = libPath / includePath;
3373 rootincdir = includePath.lexically_normal().string();
3393 if (IgnorePrefix()) {
3398 const static TString rootdatadir = ROOTDATADIR;
3409 if (IgnorePrefix()) {
3414 const static TString rootdocdir = ROOTDOCDIR;
3425 if (IgnorePrefix()) {
3428 if (rootmacrodir.
IsNull()) {
3429 rootmacrodir =
"macros";
3432 return rootmacrodir;
3435 const static TString rootmacrodir = ROOTMACRODIR;
3436 return rootmacrodir;
3446 if (IgnorePrefix()) {
3449 if (roottutdir.
IsNull()) {
3450 roottutdir =
"tutorials";
3456 const static TString roottutdir = ROOTTUTDIR;
3465void TROOT::ShutDown()
3468 gROOT->EndOfProcessCleanups();
3478const TString& TROOT::GetSourceDir() {
3486const TString& TROOT::GetIconPath() {
3488 if (IgnorePrefix()) {
3490 static TString rooticonpath;
3491 if (rooticonpath.
IsNull()) {
3492 rooticonpath =
"icons";
3495 return rooticonpath;
3498 const static TString rooticonpath = ROOTICONPATH;
3499 return rooticonpath;
3507const TString& TROOT::GetTTFFontDir() {
3509 if (IgnorePrefix()) {
3511 static TString ttffontdir;
3512 if (ttffontdir.
IsNull()) {
3513 ttffontdir =
"fonts";
3519 const static TString ttffontdir = TTFFONTDIR;
3529const char *TROOT::GetTutorialsDir() {
The file contains utilities which are foundational and could be used across the core component of ROO...
#define _R_QUOTEVAL_(string)
#define ROOT_RELEASE_TIME
#define ROOT_VERSION_CODE
#define ROOT_RELEASE_DATE
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
const char Option_t
Option string (const char).
externTClassTable * gClassTable
TInterpreter * CreateInterpreter(void *interpLibHandle, const char *argv[])
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, const char *msg)
The default error handler function.
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
externTGuiFactory * gGuiFactory
externTGuiFactory * gBatchGuiFactory
TInterpreter * CreateInterpreter_t(void *shlibHandle, const char *argv[])
externTInterpreter * gCling
externTVirtualMutex * gInterpreterMutex
void * DestroyInterpreter_t(TInterpreter *)
externTPluginManager * gPluginMgr
Bool_t & GetReadingObject()
static Int_t IVERSQ()
Return version id as an integer, i.e. "2.22/04" -> 22204.
static Int_t IDATQQ(const char *date)
Return built date as integer, i.e. "Apr 28 2000" -> 20000428.
static TClass * R__GetClassIfKnown(const char *className)
Check whether className is a known class, and only autoload if we can.
static DestroyInterpreter_t * gDestroyInterpreter
static void * gInterpreterLib
static Int_t ITIMQQ(const char *time)
Return built time as integer (with min precision), i.e.
static void at_exit_of_TROOT()
static void CleanUpROOTAtExit()
Clean up at program termination before global objects go out of scope.
static void CallCloseFiles()
Insure that the files, canvases and sockets are closed.
externTVirtualMutex * gROOTMutex
externconst char * gRootDir
Bool_t R_ISREG(Int_t mode)
externTVirtualMutex * gGlobalMutex
#define R__LOCKGUARD(mutex)
#define R__READ_LOCKGUARD(mutex)
externTVirtualX * gGXBatch
char fHolder[sizeof(TROOT)]
static void CreateApplication()
Static function used to create a default application environment.
Using a TBrowser one can browse all ROOT objects.
Objects following this interface can be passed onto the TROOT object to implement a user customized w...
This class registers for all classes their name, id and dictionary function in a hash table.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static void AddClass(TClass *cl)
static: Add a class to the list and map of classes.
static TClass * LoadClass(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
Short_t GetDeclFileLine() const
static void RemoveClass(TClass *cl)
static: Remove a class from the list and map of classes
ClassInfo_t * GetClassInfo() const
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
const char * GetDeclFileName() const
Return name of the file containing the declaration of this class.
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.
Collection abstract base class.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static void InitializeColors()
Basic data type descriptor (datatype information is obtained from CINT).
Describe directory structure in memory.
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
virtual TList * GetList() const
TDirectory(const TDirectory &directory)=delete
void ls(Option_t *option="") const override
List Directory contents.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
void SetName(const char *newname) override
Set the name for directory If the directory name is changed after the directory was written once,...
void BuildDirectory(TFile *motherFile, TDirectory *motherDir)
Initialise directory to defaults.
static std::atomic< TDirectory * > & CurrentDirectory()
Return the current directory for the current thread.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
TList * fList
List of objects in memory.
The TEnv class reads config files, by default named .rootrc.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
<div class="legacybox"><h2>Legacy Code</h2> TFolder is a legacy interface: there will be no bug fixes...
Dictionary for function template This class describes one single function template.
Global functions class (global functions are obtained from CINT).
static void MakeFunctor(const char *name, const char *type, GlobFunc &func)
static TList & GetEarlyRegisteredGlobals()
Returns list collected globals Used to storeTGlobalMappedFunctions from other libs,...
Global variables class (global variables are obtained from CINT).
This ABC is a factory for GUI components.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
THashTable implements a hash table to store TObject's.
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
TDictionary::DeclId_t DeclId_t
Option_t * GetOption() const
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
TDictionary * Get(DeclId_t id)
Return (after creating it if necessary) the TDataMember describing the data member corresponding to t...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
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...
TFunction * Get(DeclId_t id)
Return (after creating it if necessary) the TMethod or TFunction describing the function correspondin...
A collection of TDataType designed to hold the typedef information and numerical type information.
void Clear(Option_t *option="") override
Remove all objects from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
virtual TObjLink * FirstLink() const
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
Handle messages that might be generated by the system.
virtual void HandleMessage(Long_t id, const TObject *obj)
Store message origin, keep statistics and call Notify().
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
TObject * At(Int_t idx) const override
Wrapper around a TObject so it can be stored in a TList.
void SetObject(TObject *obj)
TObject * GetObject() const
Mother of all ROOT objects.
static void SetObjectStat(Bool_t stat)
Turn on/off tracking of objects in the TObjectTable.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
TObject()
TObject constructor.
@ kInvalidObject
if object ctor succeeded but object should not be used
@ kMustCleanup
if object destructor must call RecursiveRemove()
This class implements a plugin library manager.
static void Cleanup()
static function (called by TROOT destructor) to delete all TProcessIDs
static TProcessID * AddProcessID()
Static function to add a new TProcessID to the list of PIDs.
This class is a specialized TProcessID managing the list of UUIDs.
static Bool_t BlockAllSignals(Bool_t b)
Block or unblock all signals. Returns the previous block status.
ROOT top level object description.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
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,...
Int_t fVersionCode
ROOT version code as used in RVersion.h.
void Message(Int_t id, const TObject *obj)
Process message id called by obj.
void RemoveClass(TClass *)
Remove a class from the list and map of classes.
TCollection * fClassGenerators
List of user defined class generators;.
TROOT()
Only used by Dictionary.
void SetCutClassName(const char *name="TCutG")
Set the default graphical cut class name for the graphics editor By default the graphics editor creat...
TSeqCollection * fCanvases
List of canvases.
TObject * FindObjectAnyFile(const char *name) const override
Scan the memory lists of all files for an object with name.
const TObject * fPrimitive
Currently selected primitive.
void SetWebDisplay(const char *webdisplay="")
Specify where web graphics shall be rendered.
Bool_t fIsWebDisplay
True if session uses web widgets.
TFolder * fRootFolder
top level folder //root
void AddClassGenerator(TClassGenerator *gen)
Add a class generator.
TSeqCollection * fGeometries
List of geometries.
TString fCutClassName
Name of default CutG class in graphics editor.
TInterpreter * fInterpreter
Command interpreter.
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
Int_t fVersionTime
Time of ROOT version (ex 1152).
void EndOfProcessCleanups()
Execute the cleanups necessary at the end of the process, in particular those that must be executed b...
Bool_t fBatch
True if session without graphics.
TSeqCollection * GetListOfFiles() const
Bool_t fEscape
True if ESC has been pressed.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Int_t fVersionInt
ROOT version in integer format (501).
static const TString & GetIncludeDir()
Get the include directory in the installation. Static utility function.
Bool_t fFromPopUp
True if command executed from a popup menu.
void Idle(UInt_t idleTimeInSec, const char *command=nullptr)
Execute command when system has been idle for idleTimeInSec seconds.
TSeqCollection * fSockets
List of network sockets.
void ls(Option_t *option="") const override
To list all objects of the application.
static const char * GetMacroPath()
Get macro search path. Static utility function.
TCollection * fFunctions
List of analytic functions.
void SaveContext()
Save the current interpreter context.
Bool_t IsExecutingMacro() const
TDataType * GetType(const char *name, Bool_t load=kFALSE) const
Return pointer to type with name.
static void Initialize()
Initialize ROOT explicitly.
TObject * GetFunction(const char *name) const
Return pointer to function with name.
static Int_t ConvertVersionCode2Int(Int_t code)
Convert version code to an integer, i.e. 331527 -> 51507.
TSeqCollection * fMessageHandlers
List of message handlers.
void SetStyle(const char *stylename="Default")
Change current style to style with name stylename.
AListOfEnums_t fEnums
List of enum types.
void ReadGitInfo()
Read Git commit SHA1 and branch name.
static Bool_t fgRootInit
Singleton initialization flag.
void RefreshBrowsers()
Refresh all browsers.
void CloseFiles()
Close any files and sockets that gROOT knows about.
std::atomic< TApplication * > fApplication
Pointer to current application.
const char * FindObjectPathName(const TObject *obj) const
Return path name of obj somewhere in the //root/... path.
static Int_t ConvertVersionInt2Code(Int_t v)
Convert version as an integer to version code as used in RVersion.h.
void ResetClassSaved()
Reset the ClassSaved status of all classes.
Bool_t fForceStyle
Force setting of current style when reading objects.
TCanvas * MakeDefCanvas() const
Return a default canvas.
TCollection * fTypes
List of data types definition.
TColor * GetColor(Int_t color) const
Return address of color with index color.
TGlobal * GetGlobal(const char *name, Bool_t load=kFALSE) const
Return pointer to global variable by name.
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.
TSeqCollection * fStreamerInfo
List of active StreamerInfo classes.
void Append(TObject *obj, Bool_t replace=kFALSE) override
Append object to this directory.
TCollection * GetListOfGlobalFunctions(Bool_t load=kFALSE)
Return list containing the TFunctions currently defined.
TString fGitDate
Date and time when make was run.
TSeqCollection * fSpecials
List of special objects.
TCollection * GetListOfFunctionTemplates()
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.
TObject * FindObject(const char *name) const override
Returns address of a ROOT object if it exists.
TCollection * fClasses
List of classes definition.
Bool_t fEditHistograms
True if histograms can be edited with the mouse.
TListOfDataMembers * fGlobals
List of global variables.
TListOfFunctionTemplates * fFuncTemplate
List of global function templates.
TSeqCollection * fDataSets
List of data sets (TDSet or TChain).
TString fConfigOptions
ROOT ./configure set build options.
TStyle * GetStyle(const char *name) const
Return pointer to style with name.
TCollection * GetListOfEnums(Bool_t load=kFALSE)
Longptr_t ProcessLineSync(const char *line, Int_t *error=nullptr)
Process interpreter command via TApplication::ProcessLine().
void InitInterpreter()
Initialize interpreter (cling).
TCollection * GetListOfGlobals(Bool_t load=kFALSE)
Return list containing the TGlobals currently defined.
static void SetDirLevel(Int_t level=0)
Return Indentation level for ls().
TString fWebDisplay
If not empty it defines where web graphics should be rendered (cef, qt6, browser.....
TCollection * GetListOfFunctionOverloads(const char *name) const
Return the collection of functions named "name".
TSeqCollection * fCleanups
List of recursiveRemove collections.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
void SetBatch(Bool_t batch=kTRUE)
Set batch mode for ROOT If the argument evaluates to true, the session does not use interactive graph...
Int_t fLineIsProcessing
To synchronize multi-threads.
static const TString & GetMacroDir()
Get the macro directory in the installation. Static utility function.
TString fGitCommit
Git commit SHA1 of built.
Longptr_t ProcessLine(const char *line, Int_t *error=nullptr)
Process interpreter command via TApplication::ProcessLine().
TSeqCollection * fClosedObjects
List of closed objects from the list of files and sockets, so we can delete them if neededCl.
TSeqCollection * fTasks
List of tasks.
TSeqCollection * fClipboard
List of clipboard objects.
const char * GetGitDate()
Return date/time make was run.
void SetEditorMode(const char *mode="")
Set editor mode.
static const TString & GetTutorialDir()
Get the tutorials directory in the installation. Static utility function.
virtual ~TROOT()
Clean up and free resources used by ROOT (files, network sockets, shared memory segments,...
TSeqCollection * fColors
List of colors.
TFunction * GetGlobalFunctionWithPrototype(const char *name, const char *proto=nullptr, Bool_t load=kFALSE)
Return pointer to global function by name.
TSeqCollection * GetListOfBrowsers() const
Bool_t ReadingObject() const
Deprecated (will be removed in next release).
TSeqCollection * fStyles
List of styles.
Int_t fVersionDate
Date of ROOT version (ex 951226).
TSeqCollection * GetListOfColors() const
Longptr_t Macro(const char *filename, Int_t *error=nullptr, Bool_t padUpdate=kTRUE)
Execute a macro in the interpreter.
Int_t fBuiltTime
Time of ROOT built.
static const std::vector< std::string > & AddExtraInterpreterArgs(const std::vector< std::string > &args)
Provide command line arguments to the interpreter construction.
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.
TVirtualPad * fSelectPad
Currently selected pad.
TSeqCollection * fFiles
List of files.
void Browse(TBrowser *b) override
Add browsable objects to TBrowser.
static const TString & GetRootSys()
Get the rootsys directory in the installation. Static utility function.
TListOfFunctions * GetGlobalFunctions()
Internal routine returning, and creating if necessary, the list of global function.
Bool_t fInterrupt
True if macro should be interrupted.
Bool_t fMustClean
True if object destructor scans canvases.
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 * GetGlobalFunction(const char *name, const char *params=nullptr, Bool_t load=kFALSE)
Return pointer to global function by name.
void AddClass(TClass *cl)
Add a class to the list and map of classes.
static Int_t RootVersionCode()
Return ROOT version code as defined in RVersion.h.
TObject * FindSpecialObject(const char *name, void *&where)
Returns address and folder of a ROOT object if it exists.
TObject * Remove(TObject *) override
Remove an object from the in-memory list.
void InitSystem()
Operating System interface.
Longptr_t ProcessLineFast(const char *line, Int_t *error=nullptr)
Process interpreter command directly via CINT interpreter.
Bool_t ClassSaved(TClass *cl)
return class status 'ClassSaved' for class cl This function is called by the SavePrimitive functions ...
TString fGitBranch
Git branch.
TCollection * GetListOfTypes(Bool_t load=kFALSE)
Return a dynamic list giving access to all TDataTypes (typedefs) currently defined.
static Int_t fgDirLevel
Indentation level for ls().
Bool_t IsRootFile(const char *filename) const
Return true if the file is local and is (likely) to be a ROOT file.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
static const TString & GetDocDir()
Get the documentation directory in the installation. Static utility function.
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
Int_t GetNclasses() const
Get number of classes.
static const char **& GetExtraInterpreterArgs()
INTERNAL function!
static void SetMacroPath(const char *newpath)
Set or extend the macro search path.
void InitThreads()
Initialize threads library.
TProcessUUID * fUUIDs
Pointer to TProcessID managing TUUIDs.
TString fConfigFeatures
ROOT ./configure detected build features.
TFunctionTemplate * GetFunctionTemplate(const char *name)
TPluginManager * fPluginManager
Keeps track of plugin library handlers.
TObject * GetGeometry(const char *name) const
Return pointer to Geometry with name.
void RecursiveRemove(TObject *obj) override
Recursively remove this object from the list of Cleanups.
Bool_t fExecutingMacro
True while executing a TMacro.
Int_t fBuiltDate
Date of ROOT built.
Bool_t fIsWebDisplayBatch
True if web widgets are not displayed.
static const TString & GetSharedLibDir()
Get the shared libraries directory in the installation.
TSeqCollection * fMappedFiles
List of memory mapped files.
Int_t GetNtypes() const
Get number of types.
Int_t LoadMacro(const char *filename, Int_t *error=nullptr, Bool_t check=kFALSE)
Load a macro in the interpreter's memory.
TFile * GetFile() const override
static const TString & GetLibDir()
Get the library directory in the installation.
TSeqCollection * fBrowsers
List of browsers.
TString fDefCanvasName
Name of default canvas.
TListOfFunctions * fGlobalFunctions
List of global functions.
TList * fBrowsables
List of browsables.
TObject * FindObjectAny(const char *name) const override
Return a pointer to the first object with name starting at //root.
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
void Reset(Option_t *option="")
Delete all global interpreter objects created since the last call to Reset.
Int_t fEditorMode
Current Editor mode.
const char * FindObjectClassName(const char *name) const
Returns class name of a ROOT object including CINT globals.
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
TSeqCollection * GetListOfGeometries() const
TSeqCollection * GetListOfStyles() const
TString fVersion
ROOT version as TString, example: 0.05.01.
static Int_t GetDirLevel()
return directory level
void SetReadingObject(Bool_t flag=kTRUE)
Sequenceable collection abstract base class.
static void PrintStatistics()
Print memory usage statistics.
Int_t Atoi() const
Return integer value of string.
Bool_t Gets(FILE *fp, Bool_t chop=kTRUE)
Read one line from the stream, including the \n, or until EOF.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TStyle objects may be created to define special styles.
static void BuildStyles()
Create some standard styles.
Describes an Operating System directory for the browser.
Abstract base class defining a generic interface to the underlying Operating System.
This class represents a WWW compatible URL.
This class implements a mutex interface.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
static TVirtualPad *& Pad()
Return the current pad for the current thread.
Semi-Abstract base class defining a generic interface to the underlying, low level,...
static TVirtualX *& Instance()
Returns gVirtualX global.
Class providing an interface to the Windows NT Operating System.
bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
void EnableObjectAutoRegistration()
Enable automatic registration of objects for the current thread (ROOT 6 default).
void DisableObjectAutoRegistration()
Disable automatic registration of objects for the current thread (ROOT 7 default).
bool ObjectAutoRegistrationEnabled()
Test whether objects in this thread auto-register themselves, e.g.
const std::string & GetRootSys()
const std::string & GetEtcDir()
void(off) SmallVectorTemplateBase< T
static Func_t GetSymInLibImt(const char *funcname)
static GetROOTFun_t gGetROOT
void DisableParBranchProcessing()
Globally disables the IMT use case of parallel branch processing, deactivating the corresponding lock...
std::function< const char *()> ErrorSystemMsgHandlerFunc_t
Retrieves the error string associated with the last system error.
static Bool_t & IsImplicitMTEnabledImpl()
Keeps track of the status of ImplicitMT w/o resorting to the load of libImt.
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.
TROOT *(* GetROOTFun_t)()
ErrorSystemMsgHandlerFunc_t SetErrorSystemMsgHandler(ErrorSystemMsgHandlerFunc_t h)
Returns the previous system error message handler.
void EnableParBranchProcessing()
Globally enables the parallel branch processing, which is a case of implicit multi-threading (IMT) in...
Bool_t IsParBranchProcessingEnabled()
Returns true if parallel branch processing is enabled.
void ReleaseDefaultErrorHandler()
Destructs resources that are taken by using the default error handler.
The namespace of The Lean Mean C++ Option Parser.
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
UInt_t GetThreadPoolSize()
Returns the size of ROOT's thread pool.
externTVirtualRWMutex * gCoreMutex
void EnableThreadSafety()
Enable support for multi-threading within the ROOT code in particular, enables the global mutex to ma...
void DisableImplicitMT()
Disables the implicit multi-threading in ROOT (see EnableImplicitMT).
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.