22#include "RConfigure.h"
48#include "TApplicationCommandLineOptionsHelp.h"
59class TIdleTimer :
public TTimer {
89 gROOT->EndOfProcessCleanups();
97 fArgc(0), fArgv(0), fAppImp(0), fIsRunning(
kFALSE), fReturnFromRun(
kFALSE),
99 fFiles(0), fIdleTimer(0), fSigHandler(0), fExitOnException(kDontExit),
120 void * ,
Int_t numOptions) :
121 fArgc(0), fArgv(0), fAppImp(0), fIsRunning(
kFALSE), fReturnFromRun(
kFALSE),
123 fFiles(0), fIdleTimer(0), fSigHandler(0), fExitOnException(kDontExit),
147 Error(
"TApplication",
"only one instance of TApplication allowed");
153 ::Fatal(
"TApplication::TApplication",
"ROOT system not initialized");
156 ::Fatal(
"TApplication::TApplication",
"gSystem not initialized");
159 if (!hasRegisterAtExit) {
162 hasRegisterAtExit =
kTRUE;
164 gROOT->SetName(appClassName);
167 if (argc && *argc > 0) {
172 for (
int i = 0; i <
fArgc; i++)
198 gROOT->SetLineHasBeenProcessed();
205 const char *ssystem =
gEnv->
GetValue(
"Root.TMemStat.system",
"gnubuiltin");
207 gROOT->ProcessLine(
Form(
"new TMemStat(\"%s\",%d,%d);",ssystem,buffersize,maxcalls));
213 gROOT->SetApplication(
this);
222 for (
int i = 0; i <
fArgc; i++)
276#if !defined(R__WIN32)
286 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX",
"x11ttf")))
287 if (
h->LoadPlugin() == -1)
288 Info(
"InitializeGraphics",
"no TTF support");
341 if (index >=
fArgc) {
342 Error(
"Argv",
"index (%d) >= number of arguments (%d)", index,
fArgc);
356 static char null[1] = {
"" };
368 for (i = 1; i < *argc; i++) {
369 if (!strcmp(argv[i],
"-?") || !strncmp(argv[i],
"-h", 2) ||
370 !strncmp(argv[i],
"--help", 6)) {
371 fprintf(stderr, kCommandLineOptionsHelp);
373 }
else if (!strncmp(argv[i],
"--version", 9)) {
374 fprintf(stderr,
"ROOT Version: %s\n",
gROOT->GetVersion());
375 fprintf(stderr,
"Built for %s on %s\n",
377 gROOT->GetGitDate());
379 fprintf(stderr,
"From %s@%s\n",
380 gROOT->GetGitBranch(),
381 gROOT->GetGitCommit());
384 }
else if (!strcmp(argv[i],
"-config")) {
385 fprintf(stderr,
"ROOT ./configure options:\n%s\n",
gROOT->GetConfigOptions());
387 }
else if (!strcmp(argv[i],
"-memstat")) {
390 }
else if (!strcmp(argv[i],
"-b")) {
393 }
else if (!strcmp(argv[i],
"-n")) {
396 }
else if (!strcmp(argv[i],
"-t")) {
402 }
else if (!strcmp(argv[i],
"-q")) {
405 }
else if (!strcmp(argv[i],
"-l")) {
409 }
else if (!strcmp(argv[i],
"-x")) {
412 }
else if (!strcmp(argv[i],
"-splash")) {
416 }
else if (strncmp(argv[i],
"--web", 5) == 0) {
418 const char *opt = argv[i] + 5;
421 if (
gROOT->IsBatch()) argw =
"batch";
422 if (*opt ==
'=') argw.
Append(opt+1);
427 Error(
"GetOptions",
"--web option not supported, ROOT should be built with at least c++14 enabled");
429 }
else if (!strcmp(argv[i],
"-e")) {
440 Warning(
"GetOptions",
"-e must be followed by an expression.");
442 }
else if (!strcmp(argv[i],
"--")) {
444 bool warnShown =
false;
450 if (!
dynamic_cast<TNamed*
>(
f)) {
451 Error(
"GetOptions()",
"Inconsistent file entry (not a TObjString)!");
459 if (
file->String().EndsWith(
".root"))
461 if (
file->String().Contains(
'('))
464 if (macro && !warnShown && (warnShown =
true))
465 Warning(
"GetOptions",
"-- is used with several macros. "
466 "The arguments will be passed to the last one.");
478 for (; i < *argc; i++) {
485 Warning(
"GetOptions",
"no macro to pass arguments to was provided. "
486 "Everything after the -- will be ignored.");
487 for (; i < *argc; i++)
490 }
else if (argv[i][0] !=
'-' && argv[i][0] !=
'+') {
493 char *arg = strchr(argv[i],
'(');
494 if (arg) *arg =
'\0';
518 }
else if (!strcmp(
gROOT->GetName(),
"Rint")) {
519 Warning(
"GetOptions",
"only one directory argument can be specified (%s)", dir);
521 }
else if (size > 0) {
527 Warning(
"GetOptions",
"file %s has size 0, skipping", dir);
534 if (!strcmp(
gROOT->GetName(),
"Rint"))
535 Warning(
"GetOptions",
"file %s not found", dir);
558 if (!strcmp(
gROOT->GetName(),
"Rint"))
559 Warning(
"GetOptions",
"macro %s not found", fname.
Data());
574 for (i = 0; i < *argc; i++) {
575 if (strcmp(argv[i],
"")) {
593 Emit(
"HandleIdleTimer()");
649#elif defined(R__WIN32)
664 Warning(
"OpenInBrowser",
"The $DISPLAY is not set! Please open (e.g. Ctrl-click) %s\n", url.
Data());
670enum EUrl { kURLforClass, kURLforNameSpace, kURLforStruct };
683 TString url =
"https://root.cern/doc/";
685 TPRegexp re4(R
"(.*/v(\d)-(\d\d)-00-patches)");
686 const char *branchName =
gROOT->GetGitBranch();
687 TObjArray *objarr = re4.MatchS(branchName);
705 if (scopeType == kURLforClass) {
707 }
else if (scopeType == kURLforStruct) {
742 methodArguments.
ReplaceAll(
"ostream",
"std::ostream");
743 methodArguments.
ReplaceAll(
"istream",
"std::istream");
744 methodArguments.
ReplaceAll(
"map",
"std::map");
745 methodArguments.
ReplaceAll(
"vector",
"std::vector");
749 scopeNameRE.Append(scopeName);
750 scopeNameRE.Append(
"::\\b");
752 argFix.Substitute(methodArguments,
"");
753 return methodArguments;
775 scopeNameRE.Append(scopeName);
776 scopeNameRE.Append(
"::\\b");
778 returnFix.Substitute(returnType,
"");
784 returnType.
Prepend(
"virtual ");
794 returnType.
ReplaceAll(
"istream",
"std::istream");
795 returnType.
ReplaceAll(
"ostream",
"std::ostream");
797 returnType.
ReplaceAll(
"vector",
"std::vector");
821 if (!dataMember->
IsEnum()) {
826 md5DataMember.Append(
" ");
828 md5DataMember.Append(scopeName);
829 md5DataMember.Append(
"::");
831 md5DataMember.Append(dataMemberName);
832 md5DataMember.Append(dataMemberName);
834 TString urlForDataMember = UrlGenerator(scopeName, scopeType);
836 urlForDataMember.
Append(
"#a");
837 urlForDataMember.
Append(md5DataMember.MD5());
838 return urlForDataMember;
845 if (scopeEnumeration.
Contains(
"(anonymous)")) {
847 md5EnumClass.
Append(scopeName);
848 md5EnumClass.
Append(
"::@1@1");
852 md5EnumClass.
Append(scopeEnumeration);
856 md5EnumClass.
Append(enumOnlyName);
860 md5Enumerator.Append(scopeName);
861 md5Enumerator.Append(
"::");
862 md5Enumerator.Append(dataMemberName);
863 md5Enumerator.Append(dataMemberName);
865 TString url = UrlGenerator(scopeName, scopeType);
871 url.
Append(md5Enumerator.MD5());
889 TString md5Enumeration(scopeName);
890 md5Enumeration.Append(
"::");
891 md5Enumeration.Append(enumeration);
892 md5Enumeration.Append(enumeration);
894 TString url(UrlGenerator(scopeName, scopeType));
897 url.
Append(md5Enumeration.MD5());
903enum EMethodKind { kURLforMethod, kURLforStructor };
919 EMethodKind methodType, EUrl scopeType)
922 if (methodType == kURLforMethod) {
925 md5Text.
Append((FormatReturnTypeForDoxygen(scopeName, func)));
926 if (scopeType == kURLforNameSpace) {
935 md5Text.
Append(scopeName);
937 md5Text.
Append(methodName);
938 md5Text.
Append(methodName);
940 md5Text.
Append(FormatMethodArgsForDoxygen(scopeName, func));
942 TString url = UrlGenerator(scopeName, scopeType);
967 scopeType = kURLforNameSpace;
968 }
else if (clas->Property() &
kIsStruct) {
969 scopeType = kURLforStruct;
971 scopeType = kURLforClass;
981 if (strippedClass == memberName) {
982 Error(
"OpenReferenceGuideFor",
"Unknown entity \"%s\" - global variables / functions not supported yet!",
983 strippedClass.
Data());
992 Warning(
"OpenReferenceGuideFor",
"\"%s\" does not exist in ROOT!", scopeName.
Data());
998 scopeType = kURLforNameSpace;
1000 scopeType = kURLforStruct;
1002 scopeType = kURLforClass;
1007 int bracket = memberName.
First(
"(");
1009 memberName.
Remove(bracket);
1016 EMethodKind methodType;
1018 if (baseClName == memberName) {
1019 methodType = kURLforStructor;
1021 }
else if (memberName[0] ==
'~') {
1022 methodType = kURLforStructor;
1025 methodType = kURLforMethod;
1028 OpenInBrowser(GetUrlForMethod(baseClName, memberName, func, methodType, scopeType));
1035 OpenInBrowser(GetUrlForEnumeration(scopeName, memberName, scopeType));
1043 OpenInBrowser(GetUrlForDataMember(baseClName, memberName, enumerator, scopeType));
1049 Warning(
"Help",
"cannot find \"%s\" as member of %s or its base classes! Check %s\n", memberName.
Data(),
1050 scopeName.
Data(), UrlGenerator(scopeName, scopeType).Data());
1064 if ((strippedCommand ==
".help") || (strippedCommand ==
".?")) {
1066 Printf(
"\nROOT special commands.");
1067 Printf(
"==========================================================================");
1068 Printf(
" .pwd : show current directory, pad and style");
1069 Printf(
" .ls : list contents of current directory");
1070 Printf(
" .which [file] : shows path of macro file");
1071 Printf(
" .help Class : opens the reference guide for that class");
1072 Printf(
" .help Class::Member : opens the reference guide for function/member");
1078 Error(
"Help",
"Unknown command!");
1083 strippedCommand.
Remove(0, 3);
1085 strippedCommand.
Remove(0, 5);
1099 if (
gROOT->IsBatch())
return;
1102 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPad")))
1103 if (
h->LoadPlugin() == -1)
1107 TString title1 =
"ROOT interface to ";
1112 nativex =
"win32gdk";
1114 title = title1 +
"Win32gdk";
1115#elif defined(R__HAS_COCOA)
1118 title = title1 +
"Quartz";
1122 title = title1 +
"X11";
1127 if (guiBackend ==
"native") {
1128 guiBackend = nativex;
1131 title = title1 + guiBackend;
1135 if (guiFactory ==
"native")
1136 guiFactory = nativeg;
1138 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
1139 if (
h->LoadPlugin() == -1) {
1146 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TGuiFactory", guiFactory))) {
1147 if (
h->LoadPlugin() == -1) {
1186 if (!ln || strlen(ln) <= 0)
1198 while (
line.Tokenize(tkn, from,
" ")) {
1202 }
else if (tkn ==
"-d") {
1204 }
else if (tkn ==
"-close") {
1207 ::Warning(
"TApplication::ParseRemoteLine",
"unknown option: %s", tkn.
Data());
1215 }
else if (isHostDir) {
1220 }
else if (isScript) {
1250 if (!
line)
return 0;
1252 if (!strncmp(
line,
"-?", 2) || !strncmp(
line,
"-h", 2) ||
1253 !strncmp(
line,
"--help", 6)) {
1254 Info(
"ProcessRemote",
"remote session help:");
1255 Printf(
".R [user@]host[:dir] [-l user] [-d dbg] [[<]script] | [host] -close");
1256 Printf(
"Create a ROOT session on the specified remote host.");
1257 Printf(
"The variable \"dir\" is the remote directory to be used as working dir.");
1258 Printf(
"The username can be specified in two ways, \"-l\" having the priority");
1259 Printf(
"(as in ssh). A \"dbg\" value > 0 gives increasing verbosity.");
1260 Printf(
"The last argument \"script\" allows to specify an alternative script to");
1261 Printf(
"be executed remotely to startup the session, \"roots\" being");
1262 Printf(
"the default. If the script is preceded by a \"<\" the script will be");
1263 Printf(
"sourced, after which \"roots\" is executed. The sourced script can be ");
1264 Printf(
"used to change the PATH and other variables, allowing an alternative");
1265 Printf(
"\"roots\" script to be found.");
1266 Printf(
"To close down a session do \".R host -close\".");
1267 Printf(
"To switch between sessions do \".R host\", to switch to the local");
1268 Printf(
"session do \".R\".");
1269 Printf(
"To list all open sessions do \"gApplication->GetApplications()->Print()\".");
1273 TString hostdir, user, script;
1276 if (hostdir.
Length() <= 0) {
1286 }
else if (rc == 1) {
1297 const char *sc = (script.
Length() > 0) ? script.
Data() : 0;
1308 static int PrintFile(
const char* filename) {
1312 Error(
"ProcessLine()",
"Cannot find file %s", filename);
1315 std::ifstream instr(sFileName);
1333 if (!strncmp(
line,
".R", 2)) {
1335 while (*(
line+
n) ==
' ')
1346 if (!strncasecmp(
line,
".qqqqqqq", 7)) {
1348 }
else if (!strncasecmp(
line,
".qqqqq", 5)) {
1349 Info(
"ProcessLine",
"Bye... (try '.qqqqqqq' if still running)");
1351 }
else if (!strncasecmp(
line,
".exit", 4) || !strncasecmp(
line,
".quit", 2)) {
1356 if (!strncmp(
line,
".?", 2) || !strncmp(
line,
".help", 5)) {
1361 if (!strncmp(
line,
".demo", 5)) {
1362 if (
gROOT->IsBatch()) {
1363 Error(
"ProcessLine",
"Cannot show demos in batch mode!");
1370 if (!strncmp(
line,
".license", 8)) {
1374 if (!strncmp(
line,
".credits", 8)) {
1378 return PrintFile(credits);
1381 if (!strncmp(
line,
".pwd", 4)) {
1391 if (!strncmp(
line,
".ls", 3)) {
1392 const char *opt = 0;
1398 if (!strncmp(
line,
".which", 6)) {
1400 char *
s = strtok(fn,
"+(");
1411 if (!strncmp(
line,
".L", 2) || !strncmp(
line,
".U", 2)) {
1418 if (arguments.
Length()) {
1419 Warning(
"ProcessLine",
"argument(s) \"%s\" ignored with .%c", arguments.
Data(),
1424 Error(
"ProcessLine",
"macro %s not found in path %s", fname.
Data(),
1429 if (posSpace == -1) cmd.
Remove(1);
1430 else cmd.
Remove(posSpace);
1450 if (!strncmp(
line,
".X", 2) || !strncmp(
line,
".x", 2)) {
1454 if (!strcmp(
line,
".reset")) {
1456 Printf(
"*** .reset not allowed, please use gROOT->Reset() ***");
1462 gROOT->GetListOfClasses()->Delete();
1487 static const Int_t kBufSize = 1024;
1498 ::Error(
"TApplication::ExecuteFile",
"macro %s not found in path %s", fname.
Data(),
1506 ::std::ifstream macro(exnam, std::ios::in);
1507 if (!macro.good()) {
1508 ::Error(
"TApplication::ExecuteFile",
"%s no such file", exnam);
1515 char currentline[kBufSize];
1516 char dummyline[kBufSize];
1526 bool res = (
bool)macro.getline(currentline, kBufSize);
1527 if (macro.eof())
break;
1532 while (!macro.getline(dummyline, kBufSize) && !macro.eof()) {
1537 while (
s && (*
s ==
' ' || *
s ==
'\t'))
s++;
1544 if (strstr(cs,
"#ifndef__CINT__") ||
1545 strstr(cs,
"#if!defined(__CINT__)"))
1547 else if (ifndefc && (strstr(cs,
"#ifdef") || strstr(cs,
"#ifndef") ||
1548 strstr(cs,
"#ifdefined") || strstr(cs,
"#if!defined")))
1550 else if (ifndefc && strstr(cs,
"#endif")) {
1555 }
else if (ifndefc && !ifdef && strstr(cs,
"#else"))
1559 if (!*
s || *
s ==
'#' || ifndefc || !strncmp(
s,
"//", 2))
continue;
1561 if (!
comment && (!strncmp(
s,
".X", 2) || !strncmp(
s,
".x", 2))) {
1567 if (!strncmp(
s,
"/*", 2))
comment = 1;
1571 s = strstr(
s,
"*/");
1576 while (
s && (*
s ==
' ' || *
s ==
'\t'))
s++;
1578 if (!strncmp(
s,
"//", 2))
continue;
1579 if (!strncmp(
s,
"/*", 2)) {
1585 if (!
comment && *
s ==
'{') tempfile = 1;
1595 exname += aclicMode;
1597 exname += arguments;
1602 tempbuf.
Form(
".x %s", exname.
Data());
1604 tempbuf.
Form(
".X%s %s", keep ?
"k" :
" ", exname.
Data());
1634 fIdleTimer =
new TIdleTimer(idleTimeInSec*1000);
1685 Emit(
"Terminate(Int_t)", status);
1705 Emit(
"LineProcessed(const char*)",
line);
1713 Emit(
"KeyPressed(Int_t)", key);
1721 Emit(
"ReturnPressed(char*)",
text);
1750 Printf(
"<TApplication::CreateApplication>: "
1751 "created default TApplication");
1752 delete []
a;
delete []
b;
1762 Int_t debug,
const char *script)
1788 ::Error(
"TApplication::Open",
"list of applications undefined - protocol error");
1800 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TApplication",
"remote"))) {
1801 if (
h->LoadPlugin() == 0) {
1804 ::Error(
"TApplication::Open",
"failed to load plugin for TApplicationRemote");
1807 ::Error(
"TApplication::Open",
"failed to find plugin for TApplicationRemote");
1818 gROOT->RefreshBrowsers();
1822 "TApplicationRemote for %s could not be instantiated", url);
1837 gROOT->GetListOfBrowsables()->RecursiveRemove(app);
1841 b->RecursiveRemove(app);
1842 gROOT->RefreshBrowsers();
static void CallEndOfProcessCleanups()
TApplication * gApplication
R__EXTERN TClassTable * gClassTable
void Error(const char *location, const char *msgfmt,...)
R__EXTERN ExceptionContext_t * gException
R__EXTERN void Throw(int code)
If an exception context has been set (using the TRY and RETRY macros) jump back to where it was set.
R__EXTERN TGuiFactory * gBatchGuiFactory
R__EXTERN TGuiFactory * gGuiFactory
R__EXTERN TVirtualMutex * gInterpreterMutex
R__EXTERN TVirtualMutex * gROOTMutex
char * Compress(const char *str)
Remove all blanks from the string str.
char * Form(const char *fmt,...)
char * Strip(const char *str, char c=' ')
Strip leading and trailing c (blanks by default) from a string.
void Printf(const char *fmt,...)
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
R__EXTERN TVirtualX * gGXBatch
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
EExitOnException ExitOnException(EExitOnException opt=kExit)
Set the exit on exception option.
virtual void KeyPressed(Int_t key)
Emit signal when console keyboard key was pressed.
static TList * fgApplications
static void Close(TApplication *app)
Static function used to close a remote application.
virtual Long_t ProcessRemote(const char *line, Int_t *error=0)
Process the content of a line starting with ".R" (already stripped-off) The format is.
virtual void SetEchoMode(Bool_t mode)
Set console echo mode:
virtual void Help(const char *line)
The function lists useful commands (".help") or opens the online reference guide, generated with Doxy...
virtual void LineProcessed(const char *line)
Emit signal when a line has been processed.
void ClearInputFiles()
Clear list containing macro files passed as program arguments.
TApplicationImp * fAppImp
virtual void LoadGraphicsLibs()
Load shared libs necessary for graphics.
virtual void StopIdleing()
Called when system stops idleing.
virtual void StartIdleing()
Called when system starts idleing.
virtual void Run(Bool_t retrn=kFALSE)
Main application eventloop. Calls system dependent eventloop via gSystem.
virtual ~TApplication()
TApplication dtor.
void OpenReferenceGuideFor(const TString &strippedClass)
It opens the online reference guide, generated with Doxygen, for the chosen scope (class/namespace/st...
virtual void HandleException(Int_t sig)
Handle exceptions (kSigBus, kSigSegmentationViolation, kSigIllegalInstruction and kSigFloatingExcepti...
virtual void MakeBatch()
Switch to batch mode.
Bool_t fIsRunning
Window system specific application implementation.
void InitializeGraphics()
Initialize the graphics environment.
static Bool_t fgGraphNeeded
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
void OpenInBrowser(const TString &url)
The function generates and executes a command that loads the Doxygen URL in a browser.
virtual const char * ApplicationName() const
static Long_t ExecuteFile(const char *file, Int_t *error=0, Bool_t keep=kFALSE)
Execute a file containing a C++ macro (static method).
void SetReturnFromRun(Bool_t ret)
virtual Int_t TabCompletionHook(char *buf, int *pLoc, std::ostream &out)
What to do when tab is pressed.
EExitOnException fExitOnException
const char * GetIdleCommand() const
virtual void ls(Option_t *option="") const
Show available sessions.
TApplication()
Default ctor. Can be used by classes deriving from TApplication.
virtual void ReturnPressed(char *text)
Emit signal when return key was pressed.
static Bool_t fgGraphInit
virtual void RemoveIdleTimer()
Remove idle timer. Normally called via TROOT::Idle(0).
virtual void SetIdleTimer(UInt_t idleTimeInSec, const char *command)
Set the command to be executed after the system has been idle for idleTimeInSec seconds.
static void CreateApplication()
Static function used to create a default application environment.
virtual void GetOptions(Int_t *argc, char **argv)
Get and handle command line options.
static TList * GetApplications()
Static method returning the list of available applications.
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
Process a single command line, either a C++ statement or an interpreter command starting with a "....
static void NeedGraphicsLibs()
Static method.
static Int_t ParseRemoteLine(const char *ln, TString &hostdir, TString &user, Int_t &dbg, TString &script)
Parse the content of a line starting with ".R" (already stripped-off) The format is.
virtual void HandleIdleTimer()
Handle idle timeout.
virtual Long_t ProcessFile(const char *file, Int_t *error=0, Bool_t keep=kFALSE)
Process a file containing a C++ macro.
TApplication * fAppRemote
Using a TBrowser one can browse all ROOT objects.
static DictFuncPtr_t GetDict(const char *cname)
Given the class name returns the Dictionary() function of a class (uses hash of name).
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfAllPublicDataMembers(Bool_t load=kTRUE)
Returns a list of all public data members of this class and its base classes.
TList * GetListOfEnums(Bool_t load=kTRUE)
Return a list containing the TEnums of a class.
Long_t Property() const
Returns the properties of the TClass as a bit field stored as a Long_t value.
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
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.
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
All ROOT classes may have RTTI (run time type identification) support added.
const char * GetTrueTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Bool_t IsEnum() const
Return true if data member is an enum.
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource.
Global functions class (global functions are obtained from CINT).
const char * GetSignature()
Return signature of function.
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Long_t ExtraProperty() const
Get property description word. For meaning of bits see EProperty.
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
This ABC is a factory for GUI components.
virtual TApplicationImp * CreateApplicationImp(const char *classname, int *argc, char **argv)
Create a batch version of TApplicationImp.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObjLink * FirstLink() const
Each ROOT class (see TClass) has a linked list of methods.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const
Collectable string class.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
@ kInvalidObject
if object ctor succeeded but object should not be used
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
static const char * GetMacroPath()
Get macro search path. Static utility function.
static void ShutDown()
Shut down ROOT.
static const TString & GetTTFFontDir()
Get the fonts directory in the installation. Static utility function.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
static const TString & GetTutorialDir()
Get the tutorials directory in the installation. Static utility function.
static const TString & GetDocDir()
Get the documentation directory in the installation. Static utility function.
void ToLower()
Change string to lower-case.
TString & Insert(Ssiz_t pos, const char *s)
Int_t Atoi() const
Return integer value of string.
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.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString MD5() const
Return the MD5 digest for this string, in a string representation.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
std::istream & ReadFile(std::istream &str)
Replace string with the contents of strm, stopping at an EOF.
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void SetScreenFactor(Float_t factor=1)
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
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 Int_t Exec(const char *shellcmd)
Execute a command.
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 Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void Run()
System event loop.
virtual void ExitLoop()
Exit from event loop.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
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 SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
virtual const char * GetBuildArch() const
Return the build architecture.
virtual void Abort(int code=0)
Abort the application.
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
Handles synchronous and a-synchronous timer events.
void Reset()
Reset the timer.
virtual Bool_t Notify()
Notify when timer times out.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
const char * GetFile() const
const char * GetUser() const
const char * GetHost() const
void SetOptions(const char *opt)
const char * GetProtocol() const
Semi-Abstract base class defining a generic interface to the underlying, low level,...
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
void EnableThreadSafety()
Enables the global mutex to make ROOT thread safe/aware.
const char * GetUnqualifiedName(const char *name)
Return the start of the unqualified name include in 'original'.
static constexpr double s
static constexpr double ms