22#include "RConfigure.h" 
   49#include "TApplicationCommandLineOptionsHelp.h" 
   60class TIdleTimer : 
public TTimer {
 
   90      gROOT->EndOfProcessCleanups();
 
   98   fArgc(0), fArgv(0), fAppImp(0), fIsRunning(
kFALSE), fReturnFromRun(
kFALSE),
 
  100   fFiles(0), fIdleTimer(0), fSigHandler(0), fExitOnException(kDontExit),
 
  121                           void * , 
Int_t numOptions) :
 
  122   fArgc(0), fArgv(0), fAppImp(0), fIsRunning(
kFALSE), fReturnFromRun(
kFALSE),
 
  124   fFiles(0), fIdleTimer(0), fSigHandler(0), fExitOnException(kDontExit),
 
  148      Error(
"TApplication", 
"only one instance of TApplication allowed");
 
  154      ::Fatal(
"TApplication::TApplication", 
"ROOT system not initialized");
 
  157      ::Fatal(
"TApplication::TApplication", 
"gSystem not initialized");
 
  160   if (!hasRegisterAtExit) {
 
  163      hasRegisterAtExit = 
kTRUE;
 
  165   gROOT->SetName(appClassName);
 
  168   if (argc && *argc > 0) {
 
  173   for (
int i = 0; i < 
fArgc; i++)
 
  199   gROOT->SetLineHasBeenProcessed();
 
  206      const char *ssystem = 
gEnv->
GetValue(
"Root.TMemStat.system",
"gnubuiltin");
 
  208         gROOT->ProcessLine(
Form(
"new TMemStat(\"%s\",%d,%d);",ssystem,buffersize,maxcalls));
 
  214   gROOT->SetApplication(
this);
 
  223   for (
int i = 0; i < 
fArgc; i++)
 
  277#if !defined(R__WIN32) 
  287         if ((
h = 
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", 
"x11ttf")))
 
  288            if (
h->LoadPlugin() == -1)
 
  289               Info(
"InitializeGraphics", 
"no TTF support");
 
  342      if (index >= 
fArgc) {
 
  343         Error(
"Argv", 
"index (%d) >= number of arguments (%d)", index, 
fArgc);
 
  357   static char null[1] = { 
"" };
 
  369   for (i = 1; i < *argc; i++) {
 
  370      if (!strcmp(argv[i], 
"-?") || !strncmp(argv[i], 
"-h", 2) ||
 
  371          !strncmp(argv[i], 
"--help", 6)) {
 
  372         fprintf(stderr, kCommandLineOptionsHelp);
 
  374      } 
else if (!strncmp(argv[i], 
"--version", 9)) {
 
  375         fprintf(stderr, 
"ROOT Version: %s\n", 
gROOT->GetVersion());
 
  376         fprintf(stderr, 
"Built for %s on %s\n",
 
  378                 gROOT->GetGitDate());
 
  380         fprintf(stderr, 
"From %s@%s\n",
 
  381                gROOT->GetGitBranch(),
 
  382                gROOT->GetGitCommit());
 
  385      } 
else if (!strcmp(argv[i], 
"-config")) {
 
  386         fprintf(stderr, 
"ROOT ./configure options:\n%s\n", 
gROOT->GetConfigOptions());
 
  388      } 
else if (!strcmp(argv[i], 
"-memstat")) {
 
  391      } 
else if (!strcmp(argv[i], 
"-b")) {
 
  394      } 
else if (!strcmp(argv[i], 
"-n")) {
 
  397      } 
else if (!strcmp(argv[i], 
"-t")) {
 
  403      } 
else if (!strcmp(argv[i], 
"-q")) {
 
  406      } 
else if (!strcmp(argv[i], 
"-l")) {
 
  410      } 
else if (!strcmp(argv[i], 
"-x")) {
 
  413      } 
else if (!strcmp(argv[i], 
"-splash")) {
 
  417      } 
else if (strncmp(argv[i], 
"--web", 5) == 0) {
 
  419         const char *opt = argv[i] + 5;
 
  422         if (
gROOT->IsBatch()) argw = 
"batch";
 
  423         if (*opt == 
'=') argw.
Append(opt+1);
 
  428            Error(
"GetOptions", 
"--web option not supported, ROOT should be built with at least c++14 enabled");
 
  430      } 
else if (!strcmp(argv[i], 
"-e")) {
 
  441            Warning(
"GetOptions", 
"-e must be followed by an expression.");
 
  443      } 
else if (!strcmp(argv[i], 
"--")) {
 
  445         bool warnShown = 
false;
 
  451                  if (!
dynamic_cast<TNamed*
>(
f)) {
 
  452                     Error(
"GetOptions()", 
"Inconsistent file entry (not a TObjString)!");
 
  460               if (
file->String().EndsWith(
".root"))
 
  462               if (
file->String().Contains(
'('))
 
  465               if (macro && !warnShown && (warnShown = 
true))
 
  466                  Warning(
"GetOptions", 
"-- is used with several macros. " 
  467                                        "The arguments will be passed to the last one.");
 
  479            for (; i < *argc; i++) {
 
  486            Warning(
"GetOptions", 
"no macro to pass arguments to was provided. " 
  487                                  "Everything after the -- will be ignored.");
 
  488            for (; i < *argc; i++)
 
  491      } 
else if (argv[i][0] != 
'-' && argv[i][0] != 
'+') {
 
  494         char *arg = strchr(argv[i], 
'(');
 
  495         if (arg) *arg = 
'\0';
 
  519               } 
else if (!strcmp(
gROOT->GetName(), 
"Rint")) {
 
  520                  Warning(
"GetOptions", 
"only one directory argument can be specified (%s)", dir);
 
  522            } 
else if (size > 0) {
 
  528               Warning(
"GetOptions", 
"file %s has size 0, skipping", dir);
 
  535                  if (!strcmp(
gROOT->GetName(), 
"Rint"))
 
  536                     Warning(
"GetOptions", 
"file %s not found", dir);
 
  559                  if (!strcmp(
gROOT->GetName(), 
"Rint"))
 
  560                     Warning(
"GetOptions", 
"macro %s not found", fname.
Data());
 
  575   for (i = 0; i < *argc; i++) {
 
  576      if (strcmp(argv[i], 
"")) {
 
  594   Emit(
"HandleIdleTimer()");
 
  650#elif defined(R__WIN32) 
  665      Warning(
"OpenInBrowser", 
"The $DISPLAY is not set! Please open (e.g. Ctrl-click) %s\n", url.
Data());
 
  671enum EUrl { kURLforClass, kURLforNameSpace, kURLforStruct };
 
  684   TString url = 
"https://root.cern/doc/";
 
  686   TPRegexp re4(R
"(.*/v(\d)-(\d\d)-00-patches)"); 
  687   const char *branchName = 
gROOT->GetGitBranch();
 
  688   TObjArray *objarr = re4.MatchS(branchName);
 
  706   if (scopeType == kURLforClass) {
 
  708   } 
else if (scopeType == kURLforStruct) {
 
  743   methodArguments.
ReplaceAll(
"ostream", 
"std::ostream");
 
  744   methodArguments.
ReplaceAll(
"istream", 
"std::istream");
 
  745   methodArguments.
ReplaceAll(
"map", 
"std::map");
 
  746   methodArguments.
ReplaceAll(
"vector", 
"std::vector");
 
  750   scopeNameRE.Append(scopeName);
 
  751   scopeNameRE.Append(
"::\\b");
 
  753   argFix.Substitute(methodArguments, 
"");
 
  754   return methodArguments;
 
  776   scopeNameRE.Append(scopeName);
 
  777   scopeNameRE.Append(
"::\\b");
 
  779   returnFix.Substitute(returnType, 
"");
 
  785         returnType.
Prepend(
"virtual ");
 
  795   returnType.
ReplaceAll(
"istream", 
"std::istream");
 
  796   returnType.
ReplaceAll(
"ostream", 
"std::ostream");
 
  798   returnType.
ReplaceAll(
"vector", 
"std::vector");
 
  822   if (!dataMember->
IsEnum()) {
 
  827      md5DataMember.Append(
" ");
 
  829      md5DataMember.Append(scopeName);
 
  830      md5DataMember.Append(
"::");
 
  832      md5DataMember.Append(dataMemberName);
 
  833      md5DataMember.Append(dataMemberName);
 
  835      TString urlForDataMember = UrlGenerator(scopeName, scopeType);
 
  837      urlForDataMember.
Append(
"#a");
 
  838      urlForDataMember.
Append(md5DataMember.MD5());
 
  839      return urlForDataMember;
 
  846   if (scopeEnumeration.
Contains(
"(anonymous)")) {
 
  848      md5EnumClass.
Append(scopeName);
 
  849      md5EnumClass.
Append(
"::@1@1");
 
  853      md5EnumClass.
Append(scopeEnumeration);
 
  857      md5EnumClass.
Append(enumOnlyName);
 
  861   md5Enumerator.Append(scopeName);
 
  862   md5Enumerator.Append(
"::");
 
  863   md5Enumerator.Append(dataMemberName);
 
  864   md5Enumerator.Append(dataMemberName);
 
  866   TString url = UrlGenerator(scopeName, scopeType);
 
  872   url.
Append(md5Enumerator.MD5());
 
  890   TString md5Enumeration(scopeName);
 
  891   md5Enumeration.Append(
"::");
 
  892   md5Enumeration.Append(enumeration);
 
  893   md5Enumeration.Append(enumeration);
 
  895   TString url(UrlGenerator(scopeName, scopeType));
 
  898   url.
Append(md5Enumeration.MD5());
 
  904enum EMethodKind { kURLforMethod, kURLforStructor };
 
  920                               EMethodKind methodType, EUrl scopeType)
 
  923   if (methodType == kURLforMethod) {
 
  926      md5Text.
Append((FormatReturnTypeForDoxygen(scopeName, func)));
 
  927      if (scopeType == kURLforNameSpace) {
 
  936   md5Text.
Append(scopeName);
 
  938   md5Text.
Append(methodName);
 
  939   md5Text.
Append(methodName);
 
  941   md5Text.
Append(FormatMethodArgsForDoxygen(scopeName, func));
 
  943   TString url = UrlGenerator(scopeName, scopeType);
 
  968         scopeType = kURLforNameSpace;
 
  969      } 
else if (clas->Property() & 
kIsStruct) {
 
  970         scopeType = kURLforStruct;
 
  972         scopeType = kURLforClass;
 
  982   if (strippedClass == memberName) {
 
  983      Error(
"OpenReferenceGuideFor", 
"Unknown entity \"%s\" - global variables / functions not supported yet!",
 
  984            strippedClass.
Data());
 
  993      Warning(
"OpenReferenceGuideFor", 
"\"%s\" does not exist in ROOT!", scopeName.
Data());
 
  999      scopeType = kURLforNameSpace;
 
 1001      scopeType = kURLforStruct;
 
 1003      scopeType = kURLforClass;
 
 1008   int bracket = memberName.
First(
"(");
 
 1010      memberName.
Remove(bracket);
 
 1017      EMethodKind methodType;
 
 1019      if (baseClName == memberName) {
 
 1020         methodType = kURLforStructor;
 
 1022      } 
else if (memberName[0] == 
'~') {
 
 1023         methodType = kURLforStructor;
 
 1026         methodType = kURLforMethod;
 
 1029      OpenInBrowser(GetUrlForMethod(baseClName, memberName, func, methodType, scopeType));
 
 1036      OpenInBrowser(GetUrlForEnumeration(scopeName, memberName, scopeType));
 
 1044      OpenInBrowser(GetUrlForDataMember(baseClName, memberName, enumerator, scopeType));
 
 1050   Warning(
"Help", 
"cannot find \"%s\" as member of %s or its base classes! Check %s\n", memberName.
Data(),
 
 1051           scopeName.
Data(), UrlGenerator(scopeName, scopeType).Data());
 
 1065   if ((strippedCommand == 
".help") || (strippedCommand == 
".?")) {
 
 1067      Printf(
"\nROOT special commands.");
 
 1068      Printf(
"==========================================================================");
 
 1069      Printf(
"   pwd                 : show current directory, pad and style");
 
 1070      Printf(
"   ls                  : list contents of current directory");
 
 1071      Printf(
"   which [file]        : shows path of macro file");
 
 1072      Printf(
"   .help Class         : opens the reference guide for that class");
 
 1073      Printf(
"   .help Class::Member : opens the reference guide for function/member");
 
 1079         Error(
"Help", 
"Unknown command!");
 
 1084         strippedCommand.
Remove(0, 3);
 
 1086         strippedCommand.
Remove(0, 5);
 
 1100   if (
gROOT->IsBatch()) 
return;
 
 1103   if ((
h = 
gROOT->GetPluginManager()->FindHandler(
"TVirtualPad")))
 
 1104      if (
h->LoadPlugin() == -1)
 
 1108   TString title1 = 
"ROOT interface to ";
 
 1113   nativex = 
"win32gdk";
 
 1115   title   = title1 + 
"Win32gdk";
 
 1116#elif defined(R__HAS_COCOA) 
 1119   title   = title1 + 
"Quartz";
 
 1123   title   = title1 + 
"X11";
 
 1128   if (guiBackend == 
"native") {
 
 1129      guiBackend = nativex;
 
 1132      title = title1 + guiBackend;
 
 1136   if (guiFactory == 
"native")
 
 1137      guiFactory = nativeg;
 
 1139   if ((
h = 
gROOT->GetPluginManager()->FindHandler(
"TVirtualX", guiBackend))) {
 
 1140      if (
h->LoadPlugin() == -1) {
 
 1147   if ((
h = 
gROOT->GetPluginManager()->FindHandler(
"TGuiFactory", guiFactory))) {
 
 1148      if (
h->LoadPlugin() == -1) {
 
 1187   if (!ln || strlen(ln) <= 0)
 
 1199   while (
line.Tokenize(tkn, from, 
" ")) {
 
 1203      } 
else if (tkn == 
"-d") {
 
 1205      } 
else if (tkn == 
"-close") {
 
 1208         ::Warning(
"TApplication::ParseRemoteLine",
"unknown option: %s", tkn.
Data());
 
 1216         } 
else if (isHostDir) {
 
 1221         } 
else if (isScript) {
 
 1251   if (!
line) 
return 0;
 
 1253   if (!strncmp(
line, 
"-?", 2) || !strncmp(
line, 
"-h", 2) ||
 
 1254       !strncmp(
line, 
"--help", 6)) {
 
 1255      Info(
"ProcessRemote", 
"remote session help:");
 
 1256      Printf(
".R [user@]host[:dir] [-l user] [-d dbg] [[<]script] | [host] -close");
 
 1257      Printf(
"Create a ROOT session on the specified remote host.");
 
 1258      Printf(
"The variable \"dir\" is the remote directory to be used as working dir.");
 
 1259      Printf(
"The username can be specified in two ways, \"-l\" having the priority");
 
 1260      Printf(
"(as in ssh). A \"dbg\" value > 0 gives increasing verbosity.");
 
 1261      Printf(
"The last argument \"script\" allows to specify an alternative script to");
 
 1262      Printf(
"be executed remotely to startup the session, \"roots\" being");
 
 1263      Printf(
"the default. If the script is preceded by a \"<\" the script will be");
 
 1264      Printf(
"sourced, after which \"roots\" is executed. The sourced script can be ");
 
 1265      Printf(
"used to change the PATH and other variables, allowing an alternative");
 
 1266      Printf(
"\"roots\" script to be found.");
 
 1267      Printf(
"To close down a session do \".R host -close\".");
 
 1268      Printf(
"To switch between sessions do \".R host\", to switch to the local");
 
 1269      Printf(
"session do \".R\".");
 
 1270      Printf(
"To list all open sessions do \"gApplication->GetApplications()->Print()\".");
 
 1274   TString hostdir, user, script;
 
 1277   if (hostdir.
Length() <= 0) {
 
 1287   } 
else if (rc == 1) {
 
 1298   const char *sc = (script.
Length() > 0) ? script.
Data() : 0;
 
 1309   static int PrintFile(
const char* filename) {
 
 1313         Error(
"ProcessLine()", 
"Cannot find file %s", filename);
 
 1316      std::ifstream instr(sFileName);
 
 1334   if (!strncmp(
line, 
".R", 2)) {
 
 1336      while (*(
line+
n) == 
' ')
 
 1347   if (!strncasecmp(
line, 
".qqqqqqq", 7)) {
 
 1349   } 
else if (!strncasecmp(
line, 
".qqqqq", 5)) {
 
 1350      Info(
"ProcessLine", 
"Bye... (try '.qqqqqqq' if still running)");
 
 1352   } 
else if (!strncasecmp(
line, 
".exit", 4) || !strncasecmp(
line, 
".quit", 2)) {
 
 1357   if (!strncmp(
line, 
".?", 2) || !strncmp(
line, 
".help", 5)) {
 
 1362   if (!strncmp(
line, 
".demo", 5)) {
 
 1363      if (
gROOT->IsBatch()) {
 
 1364         Error(
"ProcessLine", 
"Cannot show demos in batch mode!");
 
 1371   if (!strncmp(
line, 
".license", 8)) {
 
 1375   if (!strncmp(
line, 
".credits", 8)) {
 
 1379      return PrintFile(credits);
 
 1382   if (!strncmp(
line, 
".pwd", 4)) {
 
 1392   if (!strncmp(
line, 
".ls", 3)) {
 
 1393      const char *opt = 0;
 
 1399   if (!strncmp(
line, 
".which", 6)) {
 
 1401      char *
s = strtok(fn, 
"+("); 
 
 1412   if (!strncmp(
line, 
".L", 2) || !strncmp(
line, 
".U", 2)) {
 
 1419      if (arguments.
Length()) {
 
 1420         Warning(
"ProcessLine", 
"argument(s) \"%s\" ignored with .%c", arguments.
Data(),
 
 1425         Error(
"ProcessLine", 
"macro %s not found in path %s", fname.
Data(),
 
 1430         if (posSpace == -1) cmd.
Remove(1);
 
 1431         else cmd.
Remove(posSpace);
 
 1451   if (!strncmp(
line, 
".X", 2) || !strncmp(
line, 
".x", 2)) {
 
 1455   if (!strcmp(
line, 
".reset")) {
 
 1457      Printf(
"*** .reset not allowed, please use gROOT->Reset() ***");
 
 1463      gROOT->GetListOfClasses()->Delete();
 
 1488   static const Int_t kBufSize = 1024;
 
 1499      ::Error(
"TApplication::ExecuteFile", 
"macro %s not found in path %s", fname.
Data(),
 
 1507   ::std::ifstream macro(exnam, std::ios::in);
 
 1508   if (!macro.good()) {
 
 1509      ::Error(
"TApplication::ExecuteFile", 
"%s no such file", exnam);
 
 1516   char currentline[kBufSize];
 
 1517   char dummyline[kBufSize];
 
 1527      bool res = (bool)macro.getline(currentline, kBufSize);
 
 1528      if (macro.eof()) 
break;
 
 1533         while (!macro.getline(dummyline, kBufSize) && !macro.eof()) {
 
 1538      while (
s && (*
s == 
' ' || *
s == 
'\t')) 
s++;   
 
 1545         if (strstr(cs, 
"#ifndef__CINT__") ||
 
 1546             strstr(cs, 
"#if!defined(__CINT__)"))
 
 1548         else if (ifndefc && (strstr(cs, 
"#ifdef") || strstr(cs, 
"#ifndef") ||
 
 1549                  strstr(cs, 
"#ifdefined") || strstr(cs, 
"#if!defined")))
 
 1551         else if (ifndefc && strstr(cs, 
"#endif")) {
 
 1556         } 
else if (ifndefc && !ifdef && strstr(cs, 
"#else"))
 
 1560      if (!*
s || *
s == 
'#' || ifndefc || !strncmp(
s, 
"//", 2)) 
continue;
 
 1562      if (!comment && (!strncmp(
s, 
".X", 2) || !strncmp(
s, 
".x", 2))) {
 
 1568      if (!strncmp(
s, 
"/*", 2)) comment = 1;
 
 1572         s = strstr(
s, 
"*/");
 
 1577            while (
s && (*
s == 
' ' || *
s == 
'\t')) 
s++; 
 
 1579            if (!strncmp(
s, 
"//", 2)) 
continue;
 
 1580            if (!strncmp(
s, 
"/*", 2)) {
 
 1586      if (!comment && *
s == 
'{') tempfile = 1;
 
 1587      if (!comment) 
break;
 
 1596         exname += aclicMode;
 
 1598      exname += arguments;
 
 1603         tempbuf.
Form(
".x %s", exname.
Data());
 
 1605         tempbuf.
Form(
".X%s %s", keep ? 
"k" : 
" ", exname.
Data());
 
 1635   fIdleTimer = 
new TIdleTimer(idleTimeInSec*1000);
 
 1686   Emit(
"Terminate(Int_t)", status);
 
 1706   Emit(
"LineProcessed(const char*)", 
line);
 
 1714   Emit(
"KeyPressed(Int_t)", key);
 
 1722   Emit(
"ReturnPressed(char*)", 
text);
 
 1751         Printf(
"<TApplication::CreateApplication>: " 
 1752                "created default TApplication");
 
 1753      delete [] 
a; 
delete [] 
b;
 
 1763                                  Int_t debug, 
const char *script)
 
 1789      ::Error(
"TApplication::Open", 
"list of applications undefined - protocol error");
 
 1801   if ((
h = 
gROOT->GetPluginManager()->FindHandler(
"TApplication",
"remote"))) {
 
 1802      if (
h->LoadPlugin() == 0) {
 
 1805         ::Error(
"TApplication::Open", 
"failed to load plugin for TApplicationRemote");
 
 1808      ::Error(
"TApplication::Open", 
"failed to find plugin for TApplicationRemote");
 
 1819      gROOT->RefreshBrowsers();
 
 1823              "TApplicationRemote for %s could not be instantiated", url);
 
 1838      gROOT->GetListOfBrowsables()->RecursiveRemove(app);
 
 1842         b->RecursiveRemove(app);
 
 1843      gROOT->RefreshBrowsers();
 
static void CallEndOfProcessCleanups()
 
TApplication * gApplication
 
R__EXTERN TClassTable * gClassTable
 
void Error(const char *location, const char *msgfmt,...)
 
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 ExceptionContext_t * gException
 
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
Set TObject::fBits and fStreamerType to cache information about the class.
 
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