70#include "RConfigure.h"
71#include "RConfigOptions.h"
73#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,
93FARPROC 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);
159namespace std {}
using namespace std;
162#if defined(R__HAS_COCOA)
168#elif defined(R__WIN32)
182void **(*gThreadTsd)(
void*,
Int_t) = 0;
190 Int_t maj, min, cycle;
192 return 10000*maj + 100*min + cycle;
200 static const char *months[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
201 "Jun",
"Jul",
"Aug",
"Sep",
"Oct",
206 sscanf(date,
"%s %d %d", sm, &dd, &yy);
207 for (
int i = 0; i < 12; i++)
208 if (!strncmp(sm, months[i], 3)) {
212 return 10000*yy + 100*
mm + dd;
222 sscanf(time,
"%d:%d:%d", &hh, &
mm, &ss);
234 if (
gROOT->GetListOfFiles())
235 gROOT->GetListOfFiles()->Delete(
"slow");
236 if (
gROOT->GetListOfSockets())
237 gROOT->GetListOfSockets()->Delete();
238 if (
gROOT->GetListOfMappedFiles())
239 gROOT->GetListOfMappedFiles()->Delete(
"slow");
240 if (
gROOT->GetListOfClosedObjects())
241 gROOT->GetListOfClosedObjects()->Delete(
"slow");
252 struct ModuleHeaderInfo_t {
253 ModuleHeaderInfo_t(
const char* moduleName,
254 const char** headers,
255 const char** includePaths,
256 const char* payloadCode,
257 const char* fwdDeclCode,
258 void (*triggerFunc)(),
260 const char **classesHeaders,
262 fModuleName(moduleName),
264 fPayloadCode(payloadCode),
265 fFwdDeclCode(fwdDeclCode),
266 fIncludePaths(includePaths),
267 fTriggerFunc(triggerFunc),
268 fClassesHeaders(classesHeaders),
269 fFwdNargsToKeepColl(fwdDeclsArgToSkip),
270 fHasCxxModule(hasCxxModule) {}
272 const char* fModuleName;
273 const char** fHeaders;
274 const char* fPayloadCode;
275 const char* fFwdDeclCode;
276 const char** fIncludePaths;
277 void (*fTriggerFunc)();
278 const char** fClassesHeaders;
284 std::vector<ModuleHeaderInfo_t>& GetModuleHeaderInfoBuffer() {
285 static std::vector<ModuleHeaderInfo_t> moduleHeaderInfoBuffer;
286 return moduleHeaderInfoBuffer;
302 class TROOTAllocator {
334 char fHolder[
sizeof(
TROOT)];
337 new(&(fHolder[0]))
TROOT(
"root",
"The ROOT of EVERYTHING");
379 static TROOTAllocator alloc;
385 if (!initInterpreter) {
386 initInterpreter =
kTRUE;
399 const static bool loadSuccess = dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")? false : 0 <=
gSystem->
Load(
"libImt");
404 Error(
"GetSymInLibImt",
"Cannot get symbol %s.", funcname);
425 ::Warning(
"EnableParBranchProcessing",
"Cannot enable parallel branch processing, please build ROOT with -Dimt=ON");
439 ::Warning(
"DisableParBranchProcessing",
"Cannot disable parallel branch processing, please build ROOT with -Dimt=ON");
474 ::Warning(
"EnableParTreeProcessing",
"Cannot enable parallel tree processing, please build ROOT with -Dimt=ON");
488 ::Warning(
"DisableParTreeProcessing",
"Cannot disable parallel tree processing, please build ROOT with -Dimt=ON");
513 return isImplicitMTEnabled;
524 static TString macroPath;
587 ::Warning(
"EnableImplicitMT",
"Cannot enable implicit multi-threading with %d threads, please build ROOT with -Dimt=ON", numthreads);
601 ::Warning(
"DisableImplicitMT",
"Cannot disable implicit multi-threading, please build ROOT with -Dimt=ON");
644 fLineIsProcessing(0), fVersion(0), fVersionInt(0), fVersionCode(0),
645 fVersionDate(0), fVersionTime(0), fBuiltDate(0), fBuiltTime(0),
646 fTimer(0), fApplication(0), fInterpreter(0), fBatch(
kTRUE),
650 fPrimitive(0),fSelectPad(0),fClasses(0),fTypes(0),fGlobals(0),fGlobalFunctions(0),
651 fClosedObjects(0),fFiles(0),fMappedFiles(0),fSockets(0),fCanvases(0),fStyles(0),fFunctions(0),
652 fTasks(0),fColors(0),fGeometries(0),fBrowsers(0),fSpecials(0),fCleanups(0),
653 fMessageHandlers(0),fStreamerInfo(0),fClassGenerators(0),fSecContexts(0),
654 fProofs(0),fClipboard(0),fDataSets(0),fUUIDs(0),fRootFolder(0),fBrowsables(0),
678 :
TDirectory(), fLineIsProcessing(0), fVersion(0), fVersionInt(0), fVersionCode(0),
679 fVersionDate(0), fVersionTime(0), fBuiltDate(0), fBuiltTime(0),
680 fTimer(0), fApplication(0), fInterpreter(0), fBatch(
kTRUE),
684 fPrimitive(0),fSelectPad(0),fClasses(0),fTypes(0),fGlobals(0),fGlobalFunctions(0),
685 fClosedObjects(0),fFiles(0),fMappedFiles(0),fSockets(0),fCanvases(0),fStyles(0),fFunctions(0),
686 fTasks(0),fColors(0),fGeometries(0),fBrowsers(0),fSpecials(0),fCleanups(0),
687 fMessageHandlers(0),fStreamerInfo(0),fClassGenerators(0),fSecContexts(0),
688 fProofs(0),fClipboard(0),fDataSets(0),fUUIDs(0),fRootFolder(0),fBrowsables(0),
756 if (!dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")) {
759#if defined(R__MACOSX) && (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
760 if (TARGET_OS_IPHONE | TARGET_IPHONE_SIMULATOR) {
761 TEnv plugins(
".plugins-ios");
769 auto setNameLocked = [](
TSeqCollection *
l,
const char *collection_name) {
770 l->SetName(collection_name);
875#elif defined(R__HAS_COCOA)
885 while (initfunc && initfunc[i]) {
929#ifdef R__COMPLETE_MEM_TERMINATION
953#ifdef R__COMPLETE_MEM_TERMINATION
959#ifdef R__COMPLETE_MEM_TERMINATION
971#ifdef R__COMPLETE_MEM_TERMINATION
1003#ifdef R__COMPLETE_MEM_TERMINATION
1031 if (::getenv(
"ROOT_CLING_TIMING"))
1059 if (!generator)
return;
1083 while ((obj = (
TObject *) next())) {
1085 if (opt && strlen(opt))
1099 if (cl == 0)
return kFALSE;
1106 static void R__ListSlowClose(
TList *files)
1126 dir->
Close(
"nodelete");
1130 cursor = cursor->
Next();
1136 files->
Clear(
"nodelete");
1139 static void R__ListSlowDeleteContent(
TList *files)
1162 cursor = cursor->
Next();
1184 CallFunc_t *socketCloser =
gInterpreter->CallFunc_Factory();
1205 gInterpreter->CallFunc_Exec(socketCloser, ((
char*)socket)+offset);
1212 CallFunc_t *otherCloser =
gInterpreter->CallFunc_Factory();
1213 gInterpreter->CallFunc_SetFuncProto(otherCloser, socket->IsA()->GetClassInfo(),
"Close",
"", &other_offset);
1215 gInterpreter->CallFunc_Exec(otherCloser, ((
char*)socket)+other_offset);
1226 cursor = cursor->
Next();
1234 cursor = cursor->
Next();
1281 Error(
"FindObject",
"Not yet implemented");
1326 while ((obj=next())) {
1330 if (temp)
return temp;
1335 if (!temp && canvas !=
gPad) temp =
gPad->FindObject(
name);
1397 if (!temp &&
gPad) {
1402 if (!temp && canvas !=
gPad) {
1408 if (!temp)
return 0;
1421 if (obj)
return obj;
1437 if (obj)
return obj;
1453 if (
g)
return g->GetTypeName();
1467 Error(
"FindObjectPathName",
"Not yet implemented");
1493 std::string normalized;
1499 if (load && cl==0) {
1532 if (!lcolors)
return 0;
1533 if (color < 0 || color >= lcolors->
GetSize())
return 0;
1535 if (col && col->
GetNumber() == color)
return col;
1536 TIter next(lcolors);
1537 while ((col = (
TColor *) next()))
1538 if (col->
GetNumber() == color)
return col;
1548 return (
TCanvas*)
gROOT->ProcessLine(
"TCanvas::MakeDefCanvas();");
1591 gROOT->ProcessLine(
"TF1::InitStandardFunctions();");
1622 if (addr == 0 || ((
Long_t)addr) == -1)
return 0;
1674 Fatal(
"GetGlobalFunction",
"fInterpreter not initialized");
1681 if (!decl)
return 0;
1686 Error(
"GetGlobalFunction",
1687 "\nDid not find matching TFunction <%s> with \"%s\".",
1707 Fatal(
"GetGlobalFunctionWithPrototype",
"fInterpreter not initialized");
1713 if (!decl)
return 0;
1718 Error(
"GetGlobalFunctionWithPrototype",
1719 "\nDid not find matching TFunction <%s> with \"%s\".",
1792 Fatal(
"GetListOfGlobals",
"fInterpreter not initialized");
1816 Fatal(
"GetListOfGlobalFunctions",
"fInterpreter not initialized");
1849 Fatal(
"GetListOfTypes",
"fInterpreter not initialized");
1863 if (idleTimeInSec <= 0)
1864 (*fApplication).RemoveIdleTimer();
1866 (*fApplication).SetIdleTimer(idleTimeInSec, command);
1876 const char* libsToLoad =
gInterpreter->GetClassSharedLibs(className);
1881 }
else if (
gROOT->GetListOfClasses()
1882 && (cla = (
TClass*)
gROOT->GetListOfClasses()->FindObject(className))) {
1896 if (fname == 0)
return 0;
1898 TString stem(fname);
1900 Int_t where = stem.Last(
'.');
1901 if (where !=
kNPOS) {
1902 if (stem.EndsWith(
".so") || stem.EndsWith(
".sl") ||
1903 stem.EndsWith(
".dl") || stem.EndsWith(
".a") ||
1914 className.ReplaceAll(
"/",
"::");
1915 className.ReplaceAll(
"\\",
"::");
1916 if (className.Contains(
":::")) {
1948#if defined(R__HAS_COCOA)
1953#elif defined(R__WIN32)
1960 fprintf(stderr,
"Fatal in <TROOT::InitSystem>: can't init operating system layer\n");
1963 fprintf(stderr,
"Fatal in <TROOT::InitSystem>: HOME directory not set\n");
1964 fprintf(stderr,
"Fix this by defining the HOME shell variable\n");
1981 if (oldzipmode == 0) {
1982 fprintf(stderr,
"Warning in <TROOT::InitSystem>: ignoring old rootrc entry \"Root.ZipMode = 0\"!\n");
1984 if (oldzipmode == -1 || oldzipmode == 1) {
1999 if (
gDebug > 0 && isatty(2))
2000 fprintf(stderr,
"Info in <TROOT::InitSystem>: running with gDebug = %d\n",
gDebug);
2006 if (msize != -1 || mcnt != -1)
2011#if defined(R__HAS_COCOA)
2040 if (!dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym")
2041 && !dlsym(RTLD_DEFAULT,
"usedToIdentifyStaticRoot")) {
2047 void *LLVMEnablePrettyStackTraceAddr = 0;
2050 LLVMEnablePrettyStackTraceAddr = dlsym(RTLD_DEFAULT,
"LLVMEnablePrettyStackTrace");
2052 if (LLVMEnablePrettyStackTraceAddr) {
2053 Error(
"InitInterpreter()",
"LLVM SYMBOLS ARE EXPOSED TO CLING! "
2054 "This will cause problems; please hide them or dlopen() them "
2055 "after the call to TROOT::InitInterpreter()!");
2059 void *libRIOHandle = dlopen(libRIO, RTLD_NOW|RTLD_GLOBAL);
2061 if (!libRIOHandle) {
2062 TString err = dlerror();
2063 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load library %s\n", err.Data());
2072 TString err = dlerror();
2073 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load library %s\n", err.Data());
2081 if (!CreateInterpreter) {
2082 TString err = dlerror();
2083 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load symbol %s\n", err.Data());
2091 TString err = dlerror();
2092 fprintf(stderr,
"Fatal in <TROOT::InitInterpreter>: cannot load symbol %s\n", err.Data());
2096 const char *interpArgs[] = {
2126 for (std::vector<ModuleHeaderInfo_t>::const_iterator
2127 li = GetModuleHeaderInfoBuffer().begin(),
2128 le = GetModuleHeaderInfoBuffer().end(); li != le; ++li) {
2136 li->fFwdNargsToKeepColl,
2137 li->fClassesHeaders,
2141 GetModuleHeaderInfoBuffer().clear();
2182 TString lib(libname);
2212 if (!lib.BeginsWith(
"lib")) {
2214 return LoadClass(
"", lib.Data(), check);
2229 FILE *mayberootfile = fopen(filename,
"rb");
2230 if (mayberootfile) {
2232 if (fgets(header,5,mayberootfile)) {
2233 result = strncmp(header,
"root",4)==0;
2235 fclose(mayberootfile);
2279 if (arguments.Length()) {
2285 Error(
"LoadMacro",
"macro %s not found in path %s", fname.Data(),
GetMacroPath());
2336 if (padUpdate &&
gPad)
2368 TString sline =
line;
2374 return (*fApplication).ProcessLine(sline,
kFALSE, error);
2388 TString sline =
line;
2394 return (*fApplication).ProcessLine(sline,
kTRUE, error);
2405 TString sline =
line;
2427#ifdef ROOT_GIT_COMMIT
2430#ifdef ROOT_GIT_BRANCH
2434 TString gitinfo =
"gitinfo.txt";
2437 FILE *fp = fopen(filename,
"r");
2455 TTHREAD_TLS(
Bool_t) fgReadingObject =
false;
2456 return fgReadingObject;
2479 Int_t iday,imonth,iyear, ihour, imin;
2480 static const char *months[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
2481 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec" };
2485 imonth = (idate/100)%100;
2486 iyear = idate/10000;
2489 fGitDate.Form(
"%s %02d %4d, %02d:%02d:00", months[imonth-1], iday, iyear, ihour, imin);
2519 b->SetRefreshFlag(
kTRUE);
2527 gROOT->CloseFiles();
2538 const char** headers,
2539 const char** includePaths,
2540 const char* payloadCode,
2541 const char* fwdDeclCode,
2542 void (*triggerFunc)(),
2544 const char** classesHeaders,
2607 gCling->
RegisterModule(modulename, headers, includePaths, payloadCode, fwdDeclCode, triggerFunc,
2608 fwdDeclsArgToSkip, classesHeaders,
false, hasCxxModule);
2610 GetModuleHeaderInfoBuffer().push_back(ModuleHeaderInfo_t(modulename, headers, includePaths, payloadCode,
2611 fwdDeclCode, triggerFunc, fwdDeclsArgToSkip,
2612 classesHeaders, hasCxxModule));
2657 if (!strncmp(option,
"a", 1)) {
2688 Error(
"SetCutClassName",
"Invalid class name");
2693 Error(
"SetCutClassName",
"Unknown class:%s",
name);
2697 Error(
"SetCutClassName",
"Class:%s does not derive from TCutG",
name);
2709 if (!mode[0])
return;
2734 TString style_name = stylename;
2738 else Error(
"SetStyle",
"Unknown style:%s",style_name.Data());
2768 if (macroPath.Length() == 0) {
2769 macroPath =
gEnv->
GetValue(
"Root.MacroPath", (
char*)0);
2770#if defined(R__WIN32)
2771 macroPath.ReplaceAll(
"; ",
";");
2773 macroPath.ReplaceAll(
": ",
":");
2775 if (macroPath.Length() == 0)
2776#if !defined(R__WIN32)
2794 if (!newpath || !*newpath)
2797 macroPath = newpath;
2817 const char *wd = webdisplay;
2821 if (!strcmp(wd,
"off")) {
2827 if (!strncmp(wd,
"batch", 5)) {
2830 }
else if (!strncmp(wd,
"nobatch", 7)) {
2853 for (
int i = 0; i <
fgDirLevel; i++) std::cout.put(
' ');
2885 return 10000*(code>>16) + 100*((code&65280)>>8) + (code&255);
2894 int b = (
v -
a*10000)/100;
2895 int c =
v -
a*10000 -
b*100;
2896 return (
a << 16) + (
b << 8) +
c;
2910 static const char** extraInterpArgs = 0;
2911 return extraInterpArgs;
2917static Bool_t IgnorePrefix() {
2919 return ignorePrefix;
2928 if (IgnorePrefix()) {
2930 static TString rootsys;
2931 if (rootsys.IsNull())
2933 if (rootsys.IsNull())
2938 const static TString rootsys = ROOTPREFIX;
2949 if (IgnorePrefix()) {
2951 static TString rootbindir;
2952 if (rootbindir.IsNull()) {
2959 const static TString rootbindir = ROOTBINDIR;
2970 if (IgnorePrefix()) {
2972 static TString rootlibdir;
2973 if (rootlibdir.IsNull()) {
2980 const static TString rootlibdir = ROOTLIBDIR;
2991 if (IgnorePrefix()) {
2993 static TString rootincdir;
2994 if (rootincdir.IsNull()) {
2995 rootincdir =
"include";
3001 const static TString rootincdir = ROOTINCDIR;
3012 if (IgnorePrefix()) {
3014 static TString rootetcdir;
3015 if (rootetcdir.IsNull()) {
3022 const static TString rootetcdir = ROOTETCDIR;
3033 if (IgnorePrefix()) {
3038 const static TString rootdatadir = ROOTDATADIR;
3049 if (IgnorePrefix()) {
3054 const static TString rootdocdir = ROOTDOCDIR;
3065 if (IgnorePrefix()) {
3067 static TString rootmacrodir;
3068 if (rootmacrodir.IsNull()) {
3069 rootmacrodir =
"macros";
3072 return rootmacrodir;
3075 const static TString rootmacrodir = ROOTMACRODIR;
3076 return rootmacrodir;
3086 if (IgnorePrefix()) {
3088 static TString roottutdir;
3089 if (roottutdir.IsNull()) {
3090 roottutdir =
"tutorials";
3096 const static TString roottutdir = ROOTTUTDIR;
3107 if (IgnorePrefix()) {
3109 static TString rootsrcdir;
3110 if (rootsrcdir.IsNull()) {
3117 const static TString rootsrcdir = ROOTSRCDIR;
3128 if (IgnorePrefix()) {
3130 static TString rooticonpath;
3131 if (rooticonpath.IsNull()) {
3132 rooticonpath =
"icons";
3135 return rooticonpath;
3138 const static TString rooticonpath = ROOTICONPATH;
3139 return rooticonpath;
3149 if (IgnorePrefix()) {
3151 static TString ttffontdir;
3152 if (ttffontdir.IsNull()) {
3153 ttffontdir =
"fonts";
3159 const static TString ttffontdir = TTFFONTDIR;
#define ROOT_RELEASE_TIME
#define ROOT_VERSION_CODE
#define ROOT_RELEASE_DATE
static RooMathCoreReg dummy
R__EXTERN TClassTable * gClassTable
void Error(const char *location, const char *msgfmt,...)
void Warning(const char *location, const char *msgfmt,...)
R__EXTERN TGuiFactory * gBatchGuiFactory
R__EXTERN TGuiFactory * gGuiFactory
R__EXTERN TVirtualMutex * gInterpreterMutex
TInterpreter * CreateInterpreter_t(void *shlibHandle, const char *argv[])
R__EXTERN TInterpreter * gCling
void * DestroyInterpreter_t(TInterpreter *)
R__EXTERN TPluginManager * 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()
TVirtualMutex * gROOTMutex
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.
R__EXTERN TStyle * gStyle
typedef void((*Func_t)())
R__EXTERN const char * gRootDir
Bool_t R_ISREG(Int_t mode)
R__EXTERN TSystem * gSystem
R__EXTERN TVirtualMutex * gGlobalMutex
#define R__LOCKGUARD(mutex)
#define R__READ_LOCKGUARD(mutex)
R__EXTERN TVirtualX * gGXBatch
static void CreateApplication()
Using a TBrowser one can browse all ROOT objects.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
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.
The ROOT global object gROOT contains a list of all defined classes.
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
static Int_t ReadRules()
Read the class.rules files from the default location:.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
const char * GetDeclFileName() const
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 TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual bool UseRWLock()
Set this collection to use a RW lock upon access, making it thread safe.
virtual void Clear(Option_t *option="")=0
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void Delete(Option_t *option="")=0
Delete this object.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Add(TObject *obj)=0
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
The color creation and management class.
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
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
virtual void ls(Option_t *option="") const
List Directory contents.
static TDirectory *& CurrentDirectory()
Return the current directory for the current thread.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual void SetName(const char *newname)
Set the name for directory If the directory name is changed after the directory was written once,...
virtual void Build(TFile *motherFile=0, TDirectory *motherDir=0)
Initialise directory to defaults.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
The TEnv class reads config files, by default named .rootrc.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
A TFolder object is a collection of objects and folders.
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 TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at this folder.
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.
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
virtual void Initialize()=0
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
virtual void SaveContext()=0
virtual void EnableAutoLoading()=0
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...
virtual void Delete(Option_t *option="")
Delete all TDataMember object files.
void Unload()
Mark 'all func' as being unloaded.
TDictionary * Get(DeclId_t id)
Return (after creating it if necessary) the TDataMember describing the data member corresponding to t...
void Load()
Load all the DataMembers known to the interpreter for the scope 'fClass' into this collection.
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...
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...
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...
void Load()
Load all the functions known to the interpreter for the scope 'fClass' into this collection.
void Unload()
Mark 'all func' as being unloaded.
virtual void Delete(Option_t *option="")
Delete all TFunction object files.
A collection of TDataType designed to hold the typedef information and numerical type information.
virtual void Add(TObject *obj)
virtual TObjLink * FirstLink() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Handle messages that might be generated by the system.
virtual void HandleMessage(Int_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.
virtual void SetName(const char *name)
Set the name of the TNamed.
TObject * At(Int_t idx) const
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.
@ kNotDeleted
object has not been deleted
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
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 Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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.
@ 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.
void LoadHandlersFromEnv(TEnv *env)
Load plugin handlers specified in config file, like:
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,...
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
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
const TObject * fPrimitive
void AddClassGenerator(TClassGenerator *gen)
Add a class generator.
TSeqCollection * fGeometries
TInterpreter * fInterpreter
std::vector< std::pair< std::string, int > > FwdDeclArgsToKeepCollection_t
void EndOfProcessCleanups()
Execute the cleanups necessary at the end of the process, in particular those that must be executed b...
TSeqCollection * GetListOfFiles() const
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
static const TString & GetIncludeDir()
Get the include directory in the installation. Static utility function.
TSeqCollection * fSockets
Long_t ProcessLine(const char *line, Int_t *error=0)
Process interpreter command via TApplication::ProcessLine().
static const char * GetMacroPath()
Get macro search path. Static utility function.
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.
TFunction * GetGlobalFunctionWithPrototype(const char *name, const char *proto=0, Bool_t load=kFALSE)
Return pointer to global function by name.
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
void SetStyle(const char *stylename="Default")
Change current style to style with name stylename.
void ReadGitInfo()
Read Git commit information and branch name from the etc/gitinfo.txt file.
void RefreshBrowsers()
Refresh all browsers.
void CloseFiles()
Close any files and sockets that gROOT knows about.
std::atomic< TApplication * > fApplication
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.
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
TCanvas * MakeDefCanvas() const
Return a default canvas.
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
static const TString & GetIconPath()
Get the icon path in the installation. Static utility function.
Long_t Macro(const char *filename, Int_t *error=0, Bool_t padUpdate=kTRUE)
Execute a macro in the interpreter.
TCollection * GetListOfGlobalFunctions(Bool_t load=kFALSE)
Return list containing the TFunctions currently defined.
TSeqCollection * fSpecials
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.
TListOfDataMembers * fGlobals
TListOfFunctionTemplates * fFuncTemplate
TSeqCollection * fDataSets
TStyle * GetStyle(const char *name) const
Return pointer to style with name.
TCollection * GetListOfEnums(Bool_t load=kFALSE)
Long_t ProcessLineFast(const char *line, Int_t *error=0)
Process interpreter command directly via CINT interpreter.
void InitInterpreter()
Initialize the interpreter.
TCollection * GetListOfGlobals(Bool_t load=kFALSE)
Return list containing the TGlobals currently defined.
virtual TObject * FindObjectAnyFile(const char *name) const
Scan the memory lists of all files for an object with name.
static void SetDirLevel(Int_t level=0)
Return Indentation level for ls().
TSeqCollection * fSecContexts
static const char * GetTutorialsDir()
Get the tutorials directory in the installation.
TCollection * GetListOfFunctionOverloads(const char *name) const
Return the collection of functions named "name".
TSeqCollection * fCleanups
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
void RecursiveRemove(TObject *obj)
Recursively remove this object from the list of Cleanups.
static const TString & GetSourceDir()
Get the source directory in the installation. Static utility function.
static const TString & GetMacroDir()
Get the macro directory in the installation. Static utility function.
TSeqCollection * fClosedObjects
void Browse(TBrowser *b)
Add browsable objects to TBrowser.
TFunction * GetGlobalFunction(const char *name, const char *params=0, Bool_t load=kFALSE)
Return pointer to global function by name.
TSeqCollection * fClipboard
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,...
static Bool_t MemCheck()
Return kTRUE if the memory leak checker is on.
void Idle(UInt_t idleTimeInSec, const char *command=0)
Execute command when system has been idle for idleTimeInSec seconds.
TSeqCollection * GetListOfBrowsers() const
Bool_t ReadingObject() const
Deprecated (will be removed in next release).
TSeqCollection * GetListOfColors() const
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
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 TObject * FindObjectAny(const char *name) const
Return a pointer to the first object with name starting at //root.
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.
TObject * Remove(TObject *)
Remove an object from the in-memory list.
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,...
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.
void InitSystem()
Initialize operating system interface.
Bool_t ClassSaved(TClass *cl)
return class status bit kClassSaved for class cl This function is called by the SavePrimitive functio...
TCollection * GetListOfTypes(Bool_t load=kFALSE)
Return a dynamic list giving access to all TDataTypes (typedefs) currently defined.
virtual TObject * FindObject(const char *name) const
Returns address of a ROOT object if it exists.
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.
static const char **& GetExtraInterpreterArgs()
static void SetMacroPath(const char *newpath)
Set or extend the macro search path.
void InitThreads()
Load and initialize thread library.
TFunctionTemplate * GetFunctionTemplate(const char *name)
TPluginManager * fPluginManager
TObject * GetGeometry(const char *name) const
Return pointer to Geometry with name.
Bool_t fIsWebDisplayBatch
TSeqCollection * fMappedFiles
static const TString & GetLibDir()
Get the library directory in the installation. Static utility function.
void ls(Option_t *option="") const
To list all objects of the application.
TSeqCollection * fBrowsers
TListOfFunctions * fGlobalFunctions
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
Long_t ProcessLineSync(const char *line, Int_t *error=0)
Process interpreter command via TApplication::ProcessLine().
void Reset(Option_t *option="")
Delete all global interpreter objects created since the last call to Reset.
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.
void SetWebDisplay(const char *webdisplay)
The input parameter webdisplay defines where web graphics should be rendered.
Int_t LoadMacro(const char *filename, Int_t *error=0, Bool_t check=kFALSE)
Load a macro in the interpreter's memory.
TSeqCollection * GetListOfGeometries() const
TSeqCollection * GetListOfStyles() const
static Int_t GetDirLevel()
return directory level
void SetReadingObject(Bool_t flag=kTRUE)
Sequenceable collection abstract base class.
virtual void AddLast(TObject *obj)=0
virtual TObject * Last() const =0
virtual TObject * First() const =0
virtual void Add(TObject *obj)
static void EnableStatistics(int size=-1, int ix=-1)
Enable memory usage statistics gathering.
static void PrintStatistics()
Print memory usage statistics.
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.
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form:
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual void CleanCompiledMacros()
Remove the shared libs produced by the CompileMacro() function.
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
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.
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual Bool_t Init()
Initialize the OS interface.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * WorkingDirectory()
Return working directory.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void ResetSignals()
Reset signals handlers to previous behaviour.
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
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.
static Func_t GetSymInLibImt(const char *funcname)
static GetROOTFun_t gGetROOT
R__EXTERN TROOT * gROOTLocal
void DisableParBranchProcessing()
Globally disables the IMT use case of parallel branch processing, deactivating the corresponding lock...
void DisableParTreeProcessing()
Globally disables the IMT use case of parallel branch processing, deactivating the corresponding lock...
static Bool_t & IsImplicitMTEnabledImpl()
Keeps track of the status of ImplicitMT w/o resorting to the load of libImt.
TROOT *(* GetROOTFun_t)()
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.
Bool_t IsParTreeProcessingEnabled()
Returns true if parallel tree processing is enabled.
void EnableParTreeProcessing()
Globally enables the parallel tree processing, which is a case of implicit multi-threading in ROOT,...
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Namespace for new ROOT classes and functions.
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
R__EXTERN TVirtualRWMutex * gCoreMutex
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
UInt_t GetImplicitMTPoolSize()
Returns the size of the pool used for implicit multi-threading.
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.
static constexpr double s
static constexpr double mm
#define sym(otri1, otri2)