Logo ROOT  
Reference Guide
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 15/09/95
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
12 #ifndef ROOT_TSystem
13 #define ROOT_TSystem
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TSystem //
19 // //
20 // Abstract base class defining a generic interface to the underlying //
21 // Operating System. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
25 #ifndef __CINT__
26 #include <stdio.h>
27 #include <ctype.h>
28 #include <fcntl.h>
29 #ifndef WIN32
30 #include <unistd.h>
31 #endif
32 #endif
34 #include "TNamed.h"
35 #include "TInetAddress.h"
36 #include "TTimer.h"
38 class TSeqCollection;
39 class TFdSet;
40 class TVirtualMutex;
47 };
49 enum ELogOption {
50  kLogPid = 0x01,
51  kLogCons = 0x02
52 };
54 enum ELogLevel {
55  kLogEmerg = 0,
56  kLogAlert = 1,
57  kLogCrit = 2,
58  kLogErr = 3,
61  kLogInfo = 6,
63 };
74 };
76 enum EFpeMask {
77  kNoneMask = 0x00,
78  kInvalid = 0x01, // Invalid argument
79  kDivByZero = 0x02, // Division by zero
80  kOverflow = 0x04, // Overflow
81  kUnderflow = 0x08, // Underflow
82  kInexact = 0x10, // Inexact
83  kDefaultMask = 0x07,
84  kAllMask = 0x1F
85 };
88  kS_IFMT = 0170000, // bitmask for the file type bitfields
89  kS_IFSOCK = 0140000, // socket
90  kS_IFLNK = 0120000, // symbolic link
91  kS_IFOFF = 0110000, // offline file
92  kS_IFREG = 0100000, // regular file
93  kS_IFBLK = 0060000, // block device
94  kS_IFDIR = 0040000, // directory
95  kS_IFCHR = 0020000, // character device
96  kS_IFIFO = 0010000, // fifo
97  kS_ISUID = 0004000, // set UID bit
98  kS_ISGID = 0002000, // set GID bit
99  kS_ISVTX = 0001000, // sticky bit
100  kS_IRWXU = 00700, // mask for file owner permissions
101  kS_IRUSR = 00400, // owner has read permission
102  kS_IWUSR = 00200, // owner has write permission
103  kS_IXUSR = 00100, // owner has execute permission
104  kS_IRWXG = 00070, // mask for group permissions
105  kS_IRGRP = 00040, // group has read permission
106  kS_IWGRP = 00020, // group has write permission
107  kS_IXGRP = 00010, // group has execute permission
108  kS_IRWXO = 00007, // mask for permissions for others (not in group)
109  kS_IROTH = 00004, // others have read permission
110  kS_IWOTH = 00002, // others have write permission
111  kS_IXOTH = 00001 // others have execute permission
112 };
114 inline Bool_t R_ISDIR(Int_t mode) { return ((mode & kS_IFMT) == kS_IFDIR); }
115 inline Bool_t R_ISCHR(Int_t mode) { return ((mode & kS_IFMT) == kS_IFCHR); }
116 inline Bool_t R_ISBLK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFBLK); }
117 inline Bool_t R_ISREG(Int_t mode) { return ((mode & kS_IFMT) == kS_IFREG); }
118 inline Bool_t R_ISLNK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFLNK); }
119 inline Bool_t R_ISFIFO(Int_t mode) { return ((mode & kS_IFMT) == kS_IFIFO); }
120 inline Bool_t R_ISSOCK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFSOCK); }
121 inline Bool_t R_ISOFF(Int_t mode) { return ((mode & kS_IFMT) == kS_IFOFF); }
123 struct FileStat_t {
124  Long_t fDev; // device id
125  Long_t fIno; // inode
126  Int_t fMode; // protection (combination of EFileModeMask bits)
127  Int_t fUid; // user id of owner
128  Int_t fGid; // group id of owner
129  Long64_t fSize; // total size in bytes
130  Long_t fMtime; // modification date
131  Bool_t fIsLink; // symbolic link
132  TString fUrl; // end point url of file
133  FileStat_t() : fDev(0), fIno(0), fMode(0), fUid(0), fGid(0), fSize(0),
134  fMtime(0), fIsLink(kFALSE), fUrl("") { }
135 };
137 struct UserGroup_t {
138  Int_t fUid; // user id
139  Int_t fGid; // group id
140  TString fUser; // user name
141  TString fGroup; // group name
142  TString fPasswd; // password
143  TString fRealName; // user full name
144  TString fShell; // user preferred shell
145  UserGroup_t() : fUid(0), fGid(0), fUser(), fGroup(), fPasswd(),
146  fRealName (), fShell() { }
147 };
149 struct SysInfo_t {
150  TString fOS; // OS
151  TString fModel; // computer model
152  TString fCpuType; // type of cpu
153  Int_t fCpus; // number of cpus
154  Int_t fCpuSpeed; // cpu speed in MHz
155  Int_t fBusSpeed; // bus speed in MHz
156  Int_t fL2Cache; // level 2 cache size in KB
157  Int_t fPhysRam; // physical RAM in MB
159  fBusSpeed(0), fL2Cache(0), fPhysRam(0) { }
160  virtual ~SysInfo_t() { }
161  ClassDef(SysInfo_t, 1); // System information - OS, CPU, RAM.
162 };
164 struct CpuInfo_t {
165  Float_t fLoad1m; // cpu load average over 1 m
166  Float_t fLoad5m; // cpu load average over 5 m
167  Float_t fLoad15m; // cpu load average over 15 m
168  Float_t fUser; // cpu user load in percentage
169  Float_t fSys; // cpu sys load in percentage
170  Float_t fTotal; // cpu user+sys load in percentage
171  Float_t fIdle; // cpu idle percentage
173  fUser(0), fSys(0), fTotal(0), fIdle(0) { }
174  virtual ~CpuInfo_t() { }
175  ClassDef(CpuInfo_t, 1); // CPU load information.
176 };
178 struct MemInfo_t {
179  Int_t fMemTotal; // total RAM in MB
180  Int_t fMemUsed; // used RAM in MB
181  Int_t fMemFree; // free RAM in MB
182  Int_t fSwapTotal; // total swap in MB
183  Int_t fSwapUsed; // used swap in MB
184  Int_t fSwapFree; // free swap in MB
186  fSwapTotal(0), fSwapUsed(0), fSwapFree(0) { }
187  virtual ~MemInfo_t() { }
188  ClassDef(MemInfo_t, 1); // Memory utilization information.
189 };
191 struct ProcInfo_t {
192  Float_t fCpuUser; // user time used by this process in seconds
193  Float_t fCpuSys; // system time used by this process in seconds
194  Long_t fMemResident; // resident memory used by this process in KB
195  Long_t fMemVirtual; // virtual memory used by this process in KB
197  fMemVirtual(0) { }
198  virtual ~ProcInfo_t();
199  ClassDef(ProcInfo_t, 1);// System resource usage of given process.
200 };
203  TString fFile; // File where the output was redirected
204  TString fStdOutTty; // tty associated with stdout, if any (e.g. from ttyname(...))
205  TString fStdErrTty; // tty associated with stderr, if any (e.g. from ttyname(...))
206  Int_t fStdOutDup{-1}; // Duplicated descriptor for stdout
207  Int_t fStdErrDup{-1}; // Duplicated descriptor for stderr
208  Int_t fReadOffSet{-1}; // Offset where to start reading the file (used by ShowOutput(...))
209  RedirectHandle_t(const char *n = nullptr) : fFile(n) { }
210  void Reset() { fFile = ""; fStdOutTty = ""; fStdErrTty = "";
211  fStdOutDup = -1; fStdErrDup = -1; fReadOffSet = -1; }
212 };
215  kSendBuffer, // size of send buffer
216  kRecvBuffer, // size of receive buffer
217  kOobInline, // OOB message inline
218  kKeepAlive, // keep socket alive
219  kReuseAddr, // allow reuse of local portion of address 5-tuple
220  kNoDelay, // send without delay
221  kNoBlock, // non-blocking I/O
222  kProcessGroup, // socket process group (used for SIGURG and SIGIO)
223  kAtMark, // are we at out-of-band mark (read only)
224  kBytesToRead // get number of bytes to read, FIONREAD (read only)
225 };
228  kDefault, // default option (= 0)
229  kOob, // send or receive out-of-band data
230  kPeek, // peek at incoming message (receive only)
231  kDontBlock // send/recv as much data as possible without blocking
232 };
234 #ifdef __CINT__
235 typedef void *Func_t;
236 #else
237 typedef void ((*Func_t)());
238 #endif
240 R__EXTERN const char *gRootDir;
241 R__EXTERN const char *gProgName;
242 R__EXTERN const char *gProgPath;
246 //////////////////////////////////////////////////////////////////////////
247 // //
248 // Asynchronous timer used for processing pending GUI and timer events //
249 // every delay ms. Call in a tight computing loop //
250 // TProcessEventTimer::ProcessEvent(). If the timer did timeout this //
251 // call will process the pending events and return kTRUE if the //
252 // TROOT::IsInterrupted() flag is set (can be done by hitting key in //
253 // canvas or selecting canvas menu item View/Interrupt. //
254 // //
255 //////////////////////////////////////////////////////////////////////////
256 class TProcessEventTimer : public TTimer {
257 public:
258  TProcessEventTimer(Long_t delay);
259  Bool_t Notify() { return kTRUE; }
261  ClassDef(TProcessEventTimer,0) // Process pending events at fixed time intervals
262 };
265 class TSystem : public TNamed {
267 public:
270  kFlatBuildDir = BIT(0) // If set and a BuildDir is selected, then do not created sub-directories
271  };
273 protected:
274  TFdSet *fReadmask{nullptr}; //!Files that should be checked for read events
275  TFdSet *fWritemask{nullptr}; //!Files that should be checked for write events
276  TFdSet *fReadready{nullptr}; //!Files with reads waiting
277  TFdSet *fWriteready{nullptr}; //!Files with writes waiting
278  TFdSet *fSignals{nullptr}; //!Signals that were trapped
279  Int_t fNfd{0}; //Number of fd's in masks
280  Int_t fMaxrfd{-1}; //Largest fd in read mask
281  Int_t fMaxwfd{-1}; //Largest fd in write mask
282  Int_t fSigcnt{0}; //Number of pending signals
283  TString fWdpath; //Working directory
284  TString fHostname; //Hostname
285  Bool_t fInsideNotify{kFALSE}; //Used by DispatchTimers()
286  Int_t fBeepFreq{0}; //Used by Beep()
287  Int_t fBeepDuration{0}; //Used by Beep()
289  Bool_t fInControl{kFALSE}; //True if in eventloop
290  Bool_t fDone{kFALSE}; //True if eventloop should be finished
291  Int_t fLevel{0}; //Level of nested eventloops
293  TSeqCollection *fTimers{nullptr}; //List of timers
294  TSeqCollection *fSignalHandler{nullptr}; //List of signal handlers
295  TSeqCollection *fFileHandler{nullptr}; //List of file handlers
296  TSeqCollection *fStdExceptionHandler{nullptr}; //List of std::exception handlers
297  TSeqCollection *fOnExitList{nullptr}; //List of items to be cleaned-up on exit
299  TString fListLibs; //List shared libraries, cache used by GetLibraries
301  TString fBuildArch; //Architecture for which ROOT was built (passed to ./configure)
302  TString fBuildCompiler; // Compiler used to build this ROOT
303  TString fBuildCompilerVersion; //Compiler version used to build this ROOT
304  TString fBuildNode; //Detailed information where ROOT was built
305  TString fBuildDir; //Location where to build ACLiC shared library and use as scratch area.
306  TString fFlagsDebug; //Flags for debug compilation
307  TString fFlagsOpt; //Flags for optimized compilation
308  TString fListPaths; //List of all include (fIncludePath + interpreter include path). Cache used by GetIncludePath
309  TString fIncludePath; //Used to expand $IncludePath in the directives given to SetMakeSharedLib and SetMakeExe
310  TString fLinkedLibs; //Used to expand $LinkedLibs in the directives given to SetMakeSharedLib and SetMakeExe
311  TString fSoExt; //Extension of shared library (.so, .sl, .a, .dll, etc.)
312  TString fObjExt; //Extension of object files (.o, .obj, etc.)
313  EAclicMode fAclicMode{kDefault}; //Whether the compilation should be done debug or opt
314  TString fMakeSharedLib; //Directive used to build a shared library
315  TString fMakeExe; //Directive used to build an executable
316  TString fLinkdefSuffix; //Default suffix for linkdef files to be used by ACLiC (see EACLiCProperties)
317  Int_t fAclicProperties{0}; //Various boolean flag for change ACLiC's behavior.
318  TSeqCollection *fCompiled{nullptr}; //List of shared libs from compiled macros to be deleted
319  TSeqCollection *fHelpers{nullptr}; //List of helper classes for alternative file/directory access
321  TString &GetLastErrorString(); //Last system error message (thread local).
322  const TString &GetLastErrorString() const; //Last system error message (thread local).
324  TSystem *FindHelper(const char *path, void *dirptr = nullptr);
325  virtual Bool_t ConsistentWith(const char *path, void *dirptr = nullptr);
326  virtual const char *ExpandFileName(const char *fname);
327  virtual Bool_t ExpandFileName(TString &fname);
329  virtual const char *GetLinkedLibraries();
330  virtual void DoBeep(Int_t /*freq*/=-1, Int_t /*duration*/=-1) const { printf("\a"); fflush(stdout); }
332  static const char *StripOffProto(const char *path, const char *proto);
334 private:
335  TSystem(const TSystem&) = delete; // not implemented
336  TSystem& operator=(const TSystem&) = delete; // not implemented
337  Bool_t ExpandFileName(const char *fname, char *xname, const int kBufSize);
339 public:
340  TSystem(const char *name = "Generic", const char *title = "Generic System");
341  virtual ~TSystem();
343  //---- Misc
344  virtual Bool_t Init();
345  virtual void SetProgname(const char *name);
346  virtual void SetDisplay();
347  void SetErrorStr(const char *errstr);
348  const char *GetErrorStr() const { return GetLastErrorString(); }
349  virtual const char *GetError();
350  void RemoveOnExit(TObject *obj);
351  virtual const char *HostName();
352  virtual void NotifyApplicationCreated();
354  static Int_t GetErrno();
355  static void ResetErrno();
356  void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE);
357  void GetBeepDefaults(Int_t &freq, Int_t &duration) const { freq = fBeepFreq; duration = fBeepDuration; }
359  //---- EventLoop
360  virtual void Run();
361  virtual Bool_t ProcessEvents();
362  virtual void DispatchOneEvent(Bool_t pendingOnly = kFALSE);
363  virtual void ExitLoop();
364  Bool_t InControl() const { return fInControl; }
365  virtual void InnerLoop();
366  virtual Int_t Select(TList *active, Long_t timeout);
367  virtual Int_t Select(TFileHandler *fh, Long_t timeout);
369  //---- Handling of system events
370  virtual void AddSignalHandler(TSignalHandler *sh);
372  virtual void ResetSignal(ESignals sig, Bool_t reset = kTRUE);
373  virtual void ResetSignals();
374  virtual void IgnoreSignal(ESignals sig, Bool_t ignore = kTRUE);
375  virtual void IgnoreInterrupt(Bool_t ignore = kTRUE);
377  virtual void AddFileHandler(TFileHandler *fh);
379  virtual TSeqCollection *GetListOfFileHandlers() const { return fFileHandler; }
384  //---- Floating Point Exceptions Control
385  virtual Int_t GetFPEMask();
386  virtual Int_t SetFPEMask(Int_t mask = kDefaultMask);
388  //---- Time & Date
389  virtual TTime Now();
390  virtual TSeqCollection *GetListOfTimers() const { return fTimers; }
391  virtual void AddTimer(TTimer *t);
392  virtual TTimer *RemoveTimer(TTimer *t);
393  virtual void ResetTimer(TTimer *) { }
394  virtual Long_t NextTimeOut(Bool_t mode);
395  virtual void Sleep(UInt_t milliSec);
397  //---- Processes
398  virtual Int_t Exec(const char *shellcmd);
399  virtual FILE *OpenPipe(const char *command, const char *mode);
400  virtual int ClosePipe(FILE *pipe);
401  virtual TString GetFromPipe(const char *command);
402  virtual void Exit(int code, Bool_t mode = kTRUE);
403  virtual void Abort(int code = 0);
404  virtual int GetPid();
405  virtual void StackTrace();
407  //---- Directories
408  virtual int MakeDirectory(const char *name);
409  virtual void *OpenDirectory(const char *name);
410  virtual void FreeDirectory(void *dirp);
411  virtual const char *GetDirEntry(void *dirp);
412  virtual void *GetDirPtr() const { return nullptr; }
413  virtual Bool_t ChangeDirectory(const char *path);
414  virtual const char *WorkingDirectory();
415  virtual std::string GetWorkingDirectory() const;
416  virtual const char *HomeDirectory(const char *userName = nullptr);
417  virtual std::string GetHomeDirectory(const char *userName = nullptr) const;
418  virtual int mkdir(const char *name, Bool_t recursive = kFALSE);
419  Bool_t cd(const char *path) { return ChangeDirectory(path); }
420  const char *pwd() { return WorkingDirectory(); }
421  virtual const char *TempDirectory() const;
422  virtual FILE *TempFileName(TString &base, const char *dir = nullptr);
424  //---- Paths & Files
425  virtual const char *BaseName(const char *pathname);
426  virtual const char *DirName(const char *pathname);
427  virtual TString GetDirName(const char *pathname);
428  virtual char *ConcatFileName(const char *dir, const char *name);
429  virtual Bool_t IsAbsoluteFileName(const char *dir);
430  virtual Bool_t IsFileInIncludePath(const char *name, char **fullpath = nullptr);
431  virtual const char *PrependPathName(const char *dir, TString& name);
432  virtual Bool_t ExpandPathName(TString &path);
433  virtual char *ExpandPathName(const char *path);
434  virtual Bool_t AccessPathName(const char *path, EAccessMode mode = kFileExists);
435  virtual Bool_t IsPathLocal(const char *path);
436  virtual int CopyFile(const char *from, const char *to, Bool_t overwrite = kFALSE);
437  virtual int Rename(const char *from, const char *to);
438  virtual int Link(const char *from, const char *to);
439  virtual int Symlink(const char *from, const char *to);
440  virtual int Unlink(const char *name);
441  int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime);
442  int GetPathInfo(const char *path, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
443  virtual int GetPathInfo(const char *path, FileStat_t &buf);
444  virtual int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree);
445  virtual int Chmod(const char *file, UInt_t mode);
446  virtual int Umask(Int_t mask);
447  virtual int Utime(const char *file, Long_t modtime, Long_t actime);
448  virtual const char *UnixPathName(const char *unixpathname);
449  virtual const char *FindFile(const char *search, TString& file, EAccessMode mode = kFileExists);
450  virtual char *Which(const char *search, const char *file, EAccessMode mode = kFileExists);
451  virtual TList *GetVolumes(Option_t *) const { return 0; }
453  //---- Users & Groups
454  virtual Int_t GetUid(const char *user = nullptr);
455  virtual Int_t GetGid(const char *group = nullptr);
456  virtual Int_t GetEffectiveUid();
457  virtual Int_t GetEffectiveGid();
458  virtual UserGroup_t *GetUserInfo(Int_t uid);
459  virtual UserGroup_t *GetUserInfo(const char *user = nullptr);
460  virtual UserGroup_t *GetGroupInfo(Int_t gid);
461  virtual UserGroup_t *GetGroupInfo(const char *group = nullptr);
463  //---- Environment Manipulation
464  virtual void Setenv(const char *name, const char *value);
465  virtual void Unsetenv(const char *name);
466  virtual const char *Getenv(const char *env);
468  //---- System Logging
469  virtual void Openlog(const char *name, Int_t options, ELogFacility facility);
470  virtual void Syslog(ELogLevel level, const char *mess);
471  virtual void Closelog();
473  //---- Standard Output redirection
474  virtual Int_t RedirectOutput(const char *name, const char *mode = "a", RedirectHandle_t *h = nullptr);
475  virtual void ShowOutput(RedirectHandle_t *h);
477  //---- Dynamic Loading
478  virtual void AddDynamicPath(const char *pathname);
479  virtual const char *GetDynamicPath();
480  virtual void SetDynamicPath(const char *pathname);
481  char *DynamicPathName(const char *lib, Bool_t quiet = kFALSE);
482  virtual const char *FindDynamicLibrary(TString& lib, Bool_t quiet = kFALSE);
483  virtual Func_t DynFindSymbol(const char *module, const char *entry);
484  virtual int Load(const char *module, const char *entry = "", Bool_t system = kFALSE);
485  virtual void Unload(const char *module);
486  virtual UInt_t LoadAllLibraries();
487  virtual void ListSymbols(const char *module, const char *re = "");
488  virtual void ListLibraries(const char *regexp = "");
489  virtual const char *GetLibraries(const char *regexp = "",
490  const char *option = "",
491  Bool_t isRegexp = kTRUE);
493  //---- RPC
494  virtual TInetAddress GetHostByName(const char *server);
495  virtual TInetAddress GetPeerName(int sock);
496  virtual TInetAddress GetSockName(int sock);
497  virtual int GetServiceByName(const char *service);
498  virtual char *GetServiceByPort(int port);
499  virtual int OpenConnection(const char *server, int port, int tcpwindowsize = -1, const char *protocol = "tcp");
500  virtual int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize = -1);
501  virtual int AnnounceUdpService(int port, int backlog);
502  virtual int AnnounceUnixService(int port, int backlog);
503  virtual int AnnounceUnixService(const char *sockpath, int backlog);
504  virtual int AcceptConnection(int sock);
505  virtual void CloseConnection(int sock, Bool_t force = kFALSE);
506  virtual int RecvRaw(int sock, void *buffer, int length, int flag);
507  virtual int SendRaw(int sock, const void *buffer, int length, int flag);
508  virtual int RecvBuf(int sock, void *buffer, int length);
509  virtual int SendBuf(int sock, const void *buffer, int length);
510  virtual int SetSockOpt(int sock, int kind, int val);
511  virtual int GetSockOpt(int sock, int kind, int *val);
513  //---- System, CPU and Memory info
514  virtual int GetSysInfo(SysInfo_t *info) const;
515  virtual int GetCpuInfo(CpuInfo_t *info, Int_t sampleTime = 1000) const;
516  virtual int GetMemInfo(MemInfo_t *info) const;
517  virtual int GetProcInfo(ProcInfo_t *info) const;
519  //---- ACLiC (Automatic Compiler of Shared Library for CINT)
520  virtual void AddIncludePath(const char *includePath);
521  virtual void AddLinkedLibs(const char *linkedLib);
522  virtual int CompileMacro(const char *filename, Option_t *opt = "", const char *library_name = "", const char *build_dir = "", UInt_t dirmode = 0);
523  virtual Int_t GetAclicProperties() const;
524  virtual const char *GetBuildArch() const;
525  virtual const char *GetBuildCompiler() const;
526  virtual const char *GetBuildCompilerVersion() const;
527  virtual const char *GetBuildNode() const;
528  virtual const char *GetBuildDir() const;
529  virtual const char *GetFlagsDebug() const;
530  virtual const char *GetFlagsOpt() const;
531  virtual const char *GetIncludePath();
532  virtual const char *GetLinkedLibs() const;
533  virtual const char *GetLinkdefSuffix() const;
534  virtual EAclicMode GetAclicMode() const;
535  virtual const char *GetMakeExe() const;
536  virtual const char *GetMakeSharedLib() const;
537  virtual const char *GetSoExt() const;
538  virtual const char *GetObjExt() const;
539  virtual void SetBuildDir(const char* build_dir, Bool_t isflat = kFALSE);
540  virtual void SetFlagsDebug(const char *);
541  virtual void SetFlagsOpt(const char *);
542  virtual void SetIncludePath(const char *includePath);
543  virtual void SetMakeExe(const char *directives);
544  virtual void SetAclicMode(EAclicMode mode);
545  virtual void SetMakeSharedLib(const char *directives);
546  virtual void SetLinkedLibs(const char *linkedLibs);
547  virtual void SetLinkdefSuffix(const char *suffix);
548  virtual void SetSoExt(const char *soExt);
549  virtual void SetObjExt(const char *objExt);
550  virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const;
551  virtual void CleanCompiledMacros();
553  ClassDef(TSystem,0) //ABC defining a generic interface to the OS
554 };
557 R__EXTERN TFileHandler *gXDisplay; // Display server (X11) input event handler
560 #endif
Bool_t R_ISSOCK(Int_t mode)
Definition: TSystem.h:120
Int_t fMemFree
Definition: TSystem.h:181
Int_t fGid
Definition: TSystem.h:139
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Definition: TSystem.cxx:930
TString fStdErrTty
Definition: TSystem.h:205
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1291
TSeqCollection * fCompiled
Definition: TSystem.h:318
Float_t fLoad15m
Definition: TSystem.h:167
TString fBuildCompiler
Definition: TSystem.h:302
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
Definition: TSystem.cxx:947
Bool_t fDone
Definition: TSystem.h:290
virtual int GetPid()
Get process id.
Definition: TSystem.cxx:705
Definition: TSystem.h:172
Definition: TSystem.h:214
virtual int GetCpuInfo(CpuInfo_t *info, Int_t sampleTime=1000) const
Returns cpu load average and load info into the CpuInfo_t structure.
Definition: TSystem.cxx:2470
Definition: TSystem.h:229
Bool_t R_ISCHR(Int_t mode)
Definition: TSystem.h:115
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition: TSystem.cxx:414
virtual void Syslog(ELogLevel level, const char *mess)
Send mess to syslog daemon.
Definition: TSystem.cxx:1679
virtual const char * GetFlagsOpt() const
Return the optimization flags.
Definition: TSystem.cxx:3903
Bool_t R_ISLNK(Int_t mode)
Definition: TSystem.h:118
virtual const char * GetBuildCompilerVersion() const
Return the build compiler version.
Definition: TSystem.cxx:3867
virtual Bool_t IsPathLocal(const char *path)
Returns TRUE if the url in &#39;path&#39; points to the local file system.
Definition: TSystem.cxx:1300
Bool_t ProcessEvents()
Process events if timer did time out.
Definition: TSystem.cxx:88
long long Long64_t
Definition: RtypesCore.h:71
Int_t fBusSpeed
Definition: TSystem.h:155
Int_t fPhysRam
Definition: TSystem.h:157
Int_t fSigcnt
Definition: TSystem.h:282
Int_t fReadOffSet
Definition: TSystem.h:208
virtual const char * WorkingDirectory()
Return working directory.
Definition: TSystem.cxx:867
virtual void StackTrace()
Print a stack trace.
Definition: TSystem.cxx:730
Definition: TSystem.h:268
Float_t fSys
Definition: TSystem.h:169
virtual void SigAlarmInterruptsSyscalls(Bool_t)
Definition: TSystem.h:328
virtual void SetFlagsDebug(const char *)
FlagsDebug should contain the options to pass to the C++ compiler in order to compile the library in ...
Definition: TSystem.cxx:4020
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
Definition: TSystem.cxx:309
R__EXTERN TVirtualMutex * gSystemMutex
Definition: TSystem.h:243
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
Definition: TSystem.cxx:1027
virtual TSeqCollection * GetListOfFileHandlers() const
Definition: TSystem.h:379
float Float_t
Definition: RtypesCore.h:55
virtual const char * GetLinkedLibs() const
Return the list of library linked to this executable.
Definition: TSystem.cxx:3960
Int_t fLevel
Definition: TSystem.h:291
const char Option_t
Definition: RtypesCore.h:64
virtual int Link(const char *from, const char *to)
Create a link from file1 to file2.
Definition: TSystem.cxx:1354
Int_t fBeepFreq
Definition: TSystem.h:286
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form: ~~~ {.cpp} [path/]macro.C[+|++[k|f|g|O|c|s|d|v|-]][(args)]...
Definition: TSystem.cxx:4220
virtual void SetFlagsOpt(const char *)
FlagsOpt should contain the options to pass to the C++ compiler in order to compile the library in op...
Definition: TSystem.cxx:4029
virtual const char * GetLinkedLibraries()
Get list of shared libraries loaded at the start of the executable.
Definition: TSystem.cxx:2121
TSeqCollection * fOnExitList
Definition: TSystem.h:297
void RemoveOnExit(TObject *obj)
Objects that should be deleted on exit of the OS interface.
Definition: TSystem.cxx:290
virtual Int_t SetFPEMask(Int_t mask=kDefaultMask)
Set which conditions trigger a floating point exception.
Definition: TSystem.cxx:640
TString fOS
Definition: TSystem.h:150
Int_t fUid
Definition: TSystem.h:127
virtual Int_t GetGid(const char *group=nullptr)
Returns the group&#39;s id. If group = 0, returns current user&#39;s group.
Definition: TSystem.cxx:1574
virtual const char * GetBuildNode() const
Return the build node name.
Definition: TSystem.cxx:3875
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.
Definition: TSystem.cxx:1393
TString fBuildCompilerVersion
Definition: TSystem.h:303
#define BIT(n)
Definition: Rtypes.h:83
TString fStdOutTty
Definition: TSystem.h:204
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
Definition: TSystem.cxx:678
TString fBuildNode
Definition: TSystem.h:304
TString fGroup
Definition: TSystem.h:141
virtual void * GetDirPtr() const
Definition: TSystem.h:412
This class represents an Internet Protocol (IP) address.
Definition: TInetAddress.h:36
virtual int MakeDirectory(const char *name)
Make a directory.
Definition: TSystem.cxx:823
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
Definition: TSystem.cxx:530
TString fWdpath
Definition: TSystem.h:283
virtual void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket connection.
Definition: TSystem.cxx:2391
This class implements a mutex interface.
Definition: TVirtualMutex.h:34
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
Definition: TSystem.cxx:858
Int_t fStdOutDup
Definition: TSystem.h:206
virtual UserGroup_t * GetGroupInfo(Int_t gid)
Returns all group info in the UserGroup_t structure.
Definition: TSystem.cxx:1618
virtual int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree)
Get info about a file system: fs type, block size, number of blocks, number of free blocks...
Definition: TSystem.cxx:1467
Definition: TSystem.h:76
virtual void SetMakeExe(const char *directives)
Directives has the same syntax as the argument of SetMakeSharedLib but is used to create an executabl...
Definition: TSystem.cxx:4057
Bool_t cd(const char *path)
Definition: TSystem.h:419
virtual Bool_t ConsistentWith(const char *path, void *dirptr=nullptr)
Check consistency of this helper with the one required by &#39;path&#39; or &#39;dirptr&#39;.
Definition: TSystem.cxx:800
virtual FILE * TempFileName(TString &base, const char *dir=nullptr)
Create a secure temporary file by appending a unique 6 letter string to base.
Definition: TSystem.cxx:1492
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition: TSystem.cxx:1850
virtual void AddStdExceptionHandler(TStdExceptionHandler *eh)
Add an exception handler to list of system exception handlers.
Definition: TSystem.cxx:609
Basic string class.
Definition: TString.h:131
TSeqCollection * fSignalHandler
Definition: TSystem.h:294
TString fBuildArch
Definition: TSystem.h:301
virtual void ResetSignal(ESignals sig, Bool_t reset=kTRUE)
If reset is true reset the signal handler for the specified signal to the default handler...
Definition: TSystem.cxx:574
virtual int GetMemInfo(MemInfo_t *info) const
Returns ram and swap memory usage info into the MemInfo_t structure.
Definition: TSystem.cxx:2480
int Int_t
Definition: RtypesCore.h:43
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
Definition: TSystem.cxx:1002
bool Bool_t
Definition: RtypesCore.h:61
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
Definition: TSystem.cxx:479
virtual const char * GetSoExt() const
Get the shared library extension.
Definition: TSystem.cxx:3981
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1541
Long_t fMtime
Definition: TSystem.h:130
TSystem & operator=(const TSystem &)=delete
virtual void SetMakeSharedLib(const char *directives)
Directives should contain the description on how to compile and link a shared lib.
Definition: TSystem.cxx:4109
virtual int AnnounceUdpService(int port, int backlog)
Announce UDP service.
Definition: TSystem.cxx:2355
virtual FILE * OpenPipe(const char *command, const char *mode)
Open a pipe.
Definition: TSystem.cxx:660
virtual const char * GetFlagsDebug() const
Return the debug flags.
Definition: TSystem.cxx:3895
virtual TSeqCollection * GetListOfTimers() const
Definition: TSystem.h:390
virtual void ResetSignals()
Reset signals handlers to previous behaviour.
Definition: TSystem.cxx:582
virtual void IgnoreInterrupt(Bool_t ignore=kTRUE)
If ignore is true ignore the interrupt signal, else restore previous behaviour.
Definition: TSystem.cxx:600
Basic time type with millisecond precision.
Definition: TTime.h:27
TString fModel
Definition: TSystem.h:151
Bool_t fInsideNotify
Definition: TSystem.h:285
Long64_t fSize
Definition: TSystem.h:129
virtual TInetAddress GetPeerName(int sock)
Get Internet Protocol (IP) address of remote host and port #.
Definition: TSystem.cxx:2301
Int_t fUid
Definition: TSystem.h:138
virtual int SendRaw(int sock, const void *buffer, int length, int flag)
Send exactly length bytes from buffer.
Definition: TSystem.cxx:2410
virtual TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
Definition: TSystem.cxx:562
Bool_t R_ISREG(Int_t mode)
Definition: TSystem.h:117
virtual char * GetServiceByPort(int port)
Get name of internet service.
Definition: TSystem.cxx:2328
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
Definition: TSystem.cxx:902
RedirectHandle_t(const char *n=nullptr)
Definition: TSystem.h:209
virtual const char * FindFile(const char *search, TString &file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1531
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition: TSystem.cxx:1058
static Int_t GetErrno()
Static function returning system error number.
Definition: TSystem.cxx:258
TSystem * FindHelper(const char *path, void *dirptr=nullptr)
Create helper TSystem to handle file and directory operations that might be special for remote file a...
Definition: TSystem.cxx:742
Int_t fMode
Definition: TSystem.h:126
TSeqCollection * fStdExceptionHandler
Definition: TSystem.h:296
virtual int Rename(const char *from, const char *to)
Rename a file.
Definition: TSystem.cxx:1345
TString fHostname
Definition: TSystem.h:284
virtual const char * GetLinkdefSuffix() const
Return the linkdef suffix chosen by the user for ACLiC.
Definition: TSystem.cxx:3969
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
Definition: TSystem.cxx:849
virtual int Unlink(const char *name)
Unlink, i.e.
Definition: TSystem.cxx:1376
Sequenceable collection abstract base class.
#define ClassDef(name, id)
Definition: Rtypes.h:322
virtual int GetSysInfo(SysInfo_t *info) const
Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t s...
Definition: TSystem.cxx:2459
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition: TSystem.cxx:435
Float_t fUser
Definition: TSystem.h:168
const char * GetErrorStr() const
Definition: TSystem.h:348
Int_t fSwapFree
Definition: TSystem.h:184
TString fBuildDir
Definition: TSystem.h:305
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Int_t fMaxrfd
Definition: TSystem.h:280
TSeqCollection * fHelpers
Definition: TSystem.h:319
TString fListPaths
Definition: TSystem.h:308
TString fLinkedLibs
Definition: TSystem.h:310
R__EXTERN TFileHandler * gXDisplay
Definition: TSystem.h:557
Int_t fNfd
Signals that were trapped.
Definition: TSystem.h:279
TString fShell
Definition: TSystem.h:144
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
Definition: TSystem.cxx:1788
TString fRealName
Definition: TSystem.h:143
virtual int CompileMacro(const char *filename, Option_t *opt="", const char *library_name="", const char *build_dir="", UInt_t dirmode=0)
This method compiles and loads a shared library containing the code from the file "filename"...
Definition: TSystem.cxx:2831
Definition: TSystem.h:269
virtual const char * Getenv(const char *env)
Get environment variable.
Definition: TSystem.cxx:1658
TString fUrl
Definition: TSystem.h:132
virtual void ListLibraries(const char *regexp="")
List all loaded shared libraries.
Definition: TSystem.cxx:2066
virtual const char * GetMakeExe() const
Return the command line use to make an executable.
Definition: TSystem.cxx:3933
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
Definition: TSystem.cxx:229
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
Definition: TSystem.cxx:1076
virtual EAclicMode GetAclicMode() const
AclicMode indicates whether the library should be built in debug mode or optimized.
Definition: TSystem.cxx:3915
virtual void ExitLoop()
Exit from event loop.
Definition: TSystem.cxx:390
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Definition: TSystem.cxx:1594
virtual int RecvRaw(int sock, void *buffer, int length, int flag)
Receive exactly length bytes into buffer.
Definition: TSystem.cxx:2400
virtual ~TSystem()
Delete the OS interface.
Definition: TSystem.cxx:135
virtual void Unload(const char *module)
Unload a shared library.
Definition: TSystem.cxx:2045
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Definition: TSystem.cxx:1477
Definition: TSystem.h:87
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
Definition: TSystem.cxx:2292
Definition: TSystem.h:145
Int_t fGid
Definition: TSystem.h:128
Definition: TSystem.h:54
virtual void Closelog()
Close connection to system log daemon.
Definition: TSystem.cxx:1687
virtual const char * GetBuildCompiler() const
Return the build compiler.
Definition: TSystem.cxx:3859
Definition: TSystem.h:49
TSeqCollection * fFileHandler
Definition: TSystem.h:295
TString fLinkdefSuffix
Definition: TSystem.h:316
Definition: TSystem.h:227
A doubly linked list.
Definition: TList.h:44
Float_t fLoad1m
Definition: TSystem.h:165
TString & GetLastErrorString()
Return the thread local storage for the custom last error message.
Definition: TSystem.cxx:2103
const char * pwd()
Definition: TSystem.h:420
Int_t fL2Cache
Definition: TSystem.h:156
virtual UInt_t LoadAllLibraries()
Load all libraries known to ROOT via the rootmap system.
Definition: TSystem.cxx:1963
R__EXTERN const char * gProgName
Definition: TSystem.h:241
Float_t fCpuUser
Definition: TSystem.h:192
virtual void AddDynamicPath(const char *pathname)
Add a new directory to the dynamic path.
Definition: TSystem.cxx:1780
TString fUser
Definition: TSystem.h:140
virtual const char * GetBuildArch() const
Return the build architecture.
Definition: TSystem.cxx:3851
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
Definition: TSystem.cxx:461
virtual void Setenv(const char *name, const char *value)
Set environment variable.
Definition: TSystem.cxx:1642
virtual TStdExceptionHandler * RemoveStdExceptionHandler(TStdExceptionHandler *eh)
Remove an exception handler from list of exception handlers.
Definition: TSystem.cxx:619
Int_t fCpus
Definition: TSystem.h:153
virtual Bool_t Init()
Initialize the OS interface.
Definition: TSystem.cxx:179
Bool_t fIsLink
Definition: TSystem.h:131
R__EXTERN TSystem * gSystem
Definition: TSystem.h:556
virtual const char * GetLibraries(const char *regexp="", const char *option="", Bool_t isRegexp=kTRUE)
Return a space separated list of loaded shared libraries.
Definition: TSystem.cxx:2137
virtual ~ProcInfo_t()
Definition: TSystem.cxx:71
virtual int AcceptConnection(int sock)
Accept a connection.
Definition: TSystem.cxx:2382
Int_t fSwapUsed
Definition: TSystem.h:183
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=nullptr)
Redirect standard output (stdout, stderr) to the specified file.
Definition: TSystem.cxx:1708
Long_t fMemVirtual
Definition: TSystem.h:195
virtual void SetDynamicPath(const char *pathname)
Set the dynamic path to a new value.
Definition: TSystem.cxx:1799
void GetBeepDefaults(Int_t &freq, Int_t &duration) const
Definition: TSystem.h:357
virtual int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize=-1)
Announce TCP/IP service.
Definition: TSystem.cxx:2346
virtual const char * GetBuildDir() const
Return the path of the build directory.
Definition: TSystem.cxx:3883
virtual Long_t NextTimeOut(Bool_t mode)
Time when next timer of mode (synchronous=kTRUE or asynchronous=kFALSE) will time-out (in ms)...
Definition: TSystem.cxx:492
unsigned int UInt_t
Definition: RtypesCore.h:44
virtual int Umask(Int_t mask)
Set the process file creation mode mask.
Definition: TSystem.cxx:1510
virtual void SetBuildDir(const char *build_dir, Bool_t isflat=kFALSE)
Set the location where ACLiC will create libraries and use as a scratch area.
Definition: TSystem.cxx:4007
virtual Int_t GetAclicProperties() const
Return the ACLiC properties field.
Definition: TSystem.cxx:3843
virtual int SendBuf(int sock, const void *buffer, int length)
Send a buffer headed by a length indicator.
Definition: TSystem.cxx:2428
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user&#39;s home directory.
Definition: TSystem.cxx:883
virtual TSeqCollection * GetListOfSignalHandlers() const
Definition: TSystem.h:376
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
Float_t fLoad5m
Definition: TSystem.h:166
virtual void ListSymbols(const char *module, const char *re="")
List symbols in a shared library.
Definition: TSystem.cxx:2057
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition: TSystem.cxx:651
TString fMakeExe
Definition: TSystem.h:315
virtual int Utime(const char *file, Long_t modtime, Long_t actime)
Set the a files modification and access times.
Definition: TSystem.cxx:1520
virtual TSeqCollection * GetListOfStdExceptionHandlers() const
Definition: TSystem.h:382
virtual void Abort(int code=0)
Abort the application.
Definition: TSystem.cxx:722
virtual void InnerLoop()
Inner event loop.
Definition: TSystem.cxx:398
virtual const char * GetMakeSharedLib() const
Return the command line use to make a shared library.
Definition: TSystem.cxx:3924
virtual void SetSoExt(const char *soExt)
Set shared library extension, should be either .so, .sl, .a, .dll, etc.
Definition: TSystem.cxx:4198
TString fListLibs
Definition: TSystem.h:299
virtual ~MemInfo_t()
Definition: TSystem.h:187
virtual void Unsetenv(const char *name)
Unset environment variable.
Definition: TSystem.cxx:1650
Int_t fAclicProperties
Definition: TSystem.h:317
virtual void ResetTimer(TTimer *)
Definition: TSystem.h:393
virtual void FreeDirectory(void *dirp)
Free a directory.
Definition: TSystem.cxx:841
virtual int ClosePipe(FILE *pipe)
Close the pipe.
Definition: TSystem.cxx:669
virtual void Run()
System event loop.
Definition: TSystem.cxx:341
#define h(i)
Definition: RSha256.hxx:106
virtual int OpenConnection(const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp")
Open a connection to another host.
Definition: TSystem.cxx:2337
const Bool_t kFALSE
Definition: RtypesCore.h:90
virtual int SetSockOpt(int sock, int kind, int val)
Set socket option.
Definition: TSystem.cxx:2437
virtual Int_t Select(TList *active, Long_t timeout)
Select on active file descriptors (called by TMonitor).
Definition: TSystem.cxx:443
virtual const char * FindDynamicLibrary(TString &lib, Bool_t quiet=kFALSE)
Find a dynamic library using the system search paths.
Definition: TSystem.cxx:2027
long Long_t
Definition: RtypesCore.h:52
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
Definition: TSystem.cxx:1501
TString fPasswd
Definition: TSystem.h:142
virtual TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
Definition: TSystem.cxx:540
EAclicMode fAclicMode
Definition: TSystem.h:313
virtual Int_t GetEffectiveUid()
Returns the effective user id.
Definition: TSystem.cxx:1565
virtual const char * GetIncludePath()
Get the list of include path.
Definition: TSystem.cxx:3941
TFdSet * fReadready
Files that should be checked for write events.
Definition: TSystem.h:276
virtual std::string GetHomeDirectory(const char *userName=nullptr) const
Return the user&#39;s home directory.
Definition: TSystem.cxx:891
R__EXTERN const char * gProgPath
Definition: TSystem.h:242
Definition: TSystem.h:133
Definition: TSystem.h:196
Float_t fCpuSys
Definition: TSystem.h:193
Definition: TSystem.h:158
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
Definition: TSystem.cxx:2037
virtual const char * HostName()
Return the system&#39;s host name.
Definition: TSystem.cxx:301
virtual Bool_t IsFileInIncludePath(const char *name, char **fullpath=nullptr)
Return true if &#39;name&#39; is a file that can be found in the ROOT include path or the current directory...
Definition: TSystem.cxx:962
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
Definition: TSystem.cxx:1363
TFdSet * fReadmask
Definition: TSystem.h:274
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
Definition: TSystem.cxx:2013
Definition: TSystem.h:65
virtual const char * ExpandFileName(const char *fname)
Expand a pathname getting rid of special shell characters like ~.
Definition: TSystem.cxx:1093
TString fCpuType
Definition: TSystem.h:152
TString fObjExt
Definition: TSystem.h:312
virtual void SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
Definition: TSystem.cxx:220
TFdSet * fSignals
Files with writes waiting.
Definition: TSystem.h:278
void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE)
Beep for duration milliseconds with a tone of frequency freq.
Definition: TSystem.cxx:322
virtual void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event.
Definition: TSystem.cxx:427
virtual void CleanCompiledMacros()
Remove the shared libs produced by the CompileMacro() function.
Definition: TSystem.cxx:4330
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
Definition: TSystem.cxx:2310
Definition: TSystem.h:42
Definition: TSystem.h:230
virtual void AddLinkedLibs(const char *linkedLib)
Add linkedLib to already set linked libs.
Definition: TSystem.cxx:4132
void Reset()
Definition: TSystem.h:210
virtual void SetAclicMode(EAclicMode mode)
AclicMode indicates whether the library should be built in debug mode or optimized.
Definition: TSystem.cxx:4041
Int_t fMemTotal
Definition: TSystem.h:179
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void DoBeep(Int_t=-1, Int_t=-1) const
Definition: TSystem.h:330
virtual void SetObjExt(const char *objExt)
Set object files extension, should be either .o, .obj, etc.
Definition: TSystem.cxx:4206
#define R__EXTERN
Definition: DllImport.h:27
typedef void((*Func_t)())
Int_t fMaxwfd
Definition: TSystem.h:281
TSeqCollection * fTimers
Definition: TSystem.h:293
virtual int RecvBuf(int sock, void *buffer, int length)
Receive a buffer headed by a length indicator.
Definition: TSystem.cxx:2419
virtual void Openlog(const char *name, Int_t options, ELogFacility facility)
Open connection to system log daemon.
Definition: TSystem.cxx:1670
Bool_t R_ISDIR(Int_t mode)
Definition: TSystem.h:114
virtual int GetServiceByName(const char *service)
Get port # of internet service.
Definition: TSystem.cxx:2319
virtual int AnnounceUnixService(int port, int backlog)
Announce unix domain service.
Definition: TSystem.cxx:2364
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
Definition: TSystem.cxx:469
virtual void ShowOutput(RedirectHandle_t *h)
Display the content associated with the redirection described by the opaque handle &#39;h&#39;...
Definition: TSystem.cxx:1718
Definition: file.py:1
Bool_t fInControl
Definition: TSystem.h:289
virtual void SetLinkedLibs(const char *linkedLibs)
LinkedLibs should contain the library directory and list of libraries needed to recreate the current ...
Definition: TSystem.cxx:4167
R__EXTERN const char * gRootDir
Definition: TSystem.h:240
virtual Int_t GetEffectiveGid()
Returns the effective group id.
Definition: TSystem.cxx:1584
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
Definition: TSystem.cxx:714
TString fFlagsDebug
Definition: TSystem.h:306
Int_t fMemUsed
Definition: TSystem.h:180
virtual std::string GetWorkingDirectory() const
Return working directory.
Definition: TSystem.cxx:875
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
Definition: TSystem.cxx:2490
Int_t fCpuSpeed
Definition: TSystem.h:154
virtual TList * GetVolumes(Option_t *) const
Definition: TSystem.h:451
Long_t fIno
Definition: TSystem.h:125
TString fFlagsOpt
Definition: TSystem.h:307
Bool_t R_ISBLK(Int_t mode)
Definition: TSystem.h:116
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
Definition: TSystem.cxx:1336
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
Definition: TSystem.cxx:832
const char * proto
Definition: civetweb.c:16604
virtual void AddIncludePath(const char *includePath)
Add includePath to the already set include path.
Definition: TSystem.cxx:4121
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
Definition: TSystem.cxx:552
static void ResetErrno()
Static function resetting system error number.
Definition: TSystem.cxx:274
Float_t fTotal
Definition: TSystem.h:170
static const char * StripOffProto(const char *path, const char *proto)
Strip off protocol string from specified path.
Definition: TSystem.cxx:113
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
Definition: TSystem.cxx:1269
TString fMakeSharedLib
Definition: TSystem.h:314
Int_t fBeepDuration
Definition: TSystem.h:287
TFdSet * fWriteready
Files with reads waiting.
Definition: TSystem.h:277
Int_t fSwapTotal
Definition: TSystem.h:182
void SetErrorStr(const char *errstr)
Set the system error string.
Definition: TSystem.cxx:239
Long_t fDev
Definition: TSystem.h:124
TString fSoExt
Definition: TSystem.h:311
virtual int GetSockOpt(int sock, int kind, int *val)
Get socket option.
Definition: TSystem.cxx:2446
virtual Int_t GetUid(const char *user=nullptr)
Returns the user&#39;s id. If user = 0, returns current user&#39;s id.
Definition: TSystem.cxx:1555
Abstract base class defining a generic interface to the underlying Operating System.
Definition: TSystem.h:265
Int_t fStdErrDup
Definition: TSystem.h:207
Bool_t R_ISFIFO(Int_t mode)
Definition: TSystem.h:119
virtual void SetLinkdefSuffix(const char *suffix)
The &#39;suffix&#39; will be appended to the name of a script loaded by ACLiC and used to locate any eventual...
Definition: TSystem.cxx:4189
virtual Int_t GetFPEMask()
Return the bitmap of conditions that trigger a floating point exception.
Definition: TSystem.cxx:630
TFdSet * fWritemask
Files that should be checked for read events.
Definition: TSystem.h:275
const Bool_t kTRUE
Definition: RtypesCore.h:89
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
Definition: TSystem.cxx:1066
Bool_t Notify()
Notify when timer times out.
Definition: TSystem.h:259
Definition: TSystem.h:185
Float_t fIdle
Definition: TSystem.h:171
const Int_t n
Definition: legend1.C:16
TString fFile
Definition: TSystem.h:203
virtual const char * GetObjExt() const
Get the object file extension.
Definition: TSystem.cxx:3989
TString fIncludePath
Definition: TSystem.h:309
virtual const char * GetError()
Return system error string.
Definition: TSystem.cxx:248
char name[80]
Definition: TGX11.cxx:109
Long_t fMemResident
Definition: TSystem.h:194
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
Definition: TSystem.cxx:4156
virtual ~SysInfo_t()
Definition: TSystem.h:160
Bool_t InControl() const
Definition: TSystem.h:364
TSystem(const TSystem &)=delete
virtual ~CpuInfo_t()
Definition: TSystem.h:174
TProcessEventTimer(Long_t delay)
Create async event processor timer. Delay is in milliseconds.
Definition: TSystem.cxx:77
Bool_t R_ISOFF(Int_t mode)
Definition: TSystem.h:121
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
Definition: TSystem.cxx:591