Logo ROOT   6.08/07
Reference Guide
TSystem.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 15/09/95
3 
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  *************************************************************************/
11 
12 #ifndef ROOT_TSystem
13 #define ROOT_TSystem
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TSystem //
19 // //
20 // Abstract base class defining a generic interface to the underlying //
21 // Operating System. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
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
33 
34 #ifndef ROOT_TNamed
35 #include "TNamed.h"
36 #endif
37 #ifndef ROOT_TString
38 #include "TString.h"
39 #endif
40 #ifndef ROOT_TInetAddress
41 #include "TInetAddress.h"
42 #endif
43 #ifndef ROOT_TTimer
44 #include "TTimer.h"
45 #endif
46 #ifndef ROOT_ThreadLocalStorage
47 #include "ThreadLocalStorage.h"
48 #endif
49 
50 class TSeqCollection;
51 class TFdSet;
52 class TVirtualMutex;
53 
59 };
60 
61 enum ELogOption {
62  kLogPid = 0x01,
63  kLogCons = 0x02
64 };
65 
66 enum ELogLevel {
67  kLogEmerg = 0,
68  kLogAlert = 1,
69  kLogCrit = 2,
70  kLogErr = 3,
73  kLogInfo = 6,
75 };
76 
86 };
87 
88 enum EFpeMask {
89  kNoneMask = 0x00,
90  kInvalid = 0x01, // Invalid argument
91  kDivByZero = 0x02, // Division by zero
92  kOverflow = 0x04, // Overflow
93  kUnderflow = 0x08, // Underflow
94  kInexact = 0x10, // Inexact
95  kDefaultMask = 0x07,
96  kAllMask = 0x1F
97 };
98 
100  kS_IFMT = 0170000, // bitmask for the file type bitfields
101  kS_IFSOCK = 0140000, // socket
102  kS_IFLNK = 0120000, // symbolic link
103  kS_IFOFF = 0110000, // offline file
104  kS_IFREG = 0100000, // regular file
105  kS_IFBLK = 0060000, // block device
106  kS_IFDIR = 0040000, // directory
107  kS_IFCHR = 0020000, // character device
108  kS_IFIFO = 0010000, // fifo
109  kS_ISUID = 0004000, // set UID bit
110  kS_ISGID = 0002000, // set GID bit
111  kS_ISVTX = 0001000, // sticky bit
112  kS_IRWXU = 00700, // mask for file owner permissions
113  kS_IRUSR = 00400, // owner has read permission
114  kS_IWUSR = 00200, // owner has write permission
115  kS_IXUSR = 00100, // owner has execute permission
116  kS_IRWXG = 00070, // mask for group permissions
117  kS_IRGRP = 00040, // group has read permission
118  kS_IWGRP = 00020, // group has write permission
119  kS_IXGRP = 00010, // group has execute permission
120  kS_IRWXO = 00007, // mask for permissions for others (not in group)
121  kS_IROTH = 00004, // others have read permission
122  kS_IWOTH = 00002, // others have write permisson
123  kS_IXOTH = 00001 // others have execute permission
124 };
125 
126 inline Bool_t R_ISDIR(Int_t mode) { return ((mode & kS_IFMT) == kS_IFDIR); }
127 inline Bool_t R_ISCHR(Int_t mode) { return ((mode & kS_IFMT) == kS_IFCHR); }
128 inline Bool_t R_ISBLK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFBLK); }
129 inline Bool_t R_ISREG(Int_t mode) { return ((mode & kS_IFMT) == kS_IFREG); }
130 inline Bool_t R_ISLNK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFLNK); }
131 inline Bool_t R_ISFIFO(Int_t mode) { return ((mode & kS_IFMT) == kS_IFIFO); }
132 inline Bool_t R_ISSOCK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFSOCK); }
133 inline Bool_t R_ISOFF(Int_t mode) { return ((mode & kS_IFMT) == kS_IFOFF); }
134 
135 struct FileStat_t {
136  Long_t fDev; // device id
137  Long_t fIno; // inode
138  Int_t fMode; // protection (combination of EFileModeMask bits)
139  Int_t fUid; // user id of owner
140  Int_t fGid; // group id of owner
141  Long64_t fSize; // total size in bytes
142  Long_t fMtime; // modification date
143  Bool_t fIsLink; // symbolic link
144  TString fUrl; // end point url of file
145  FileStat_t() : fDev(0), fIno(0), fMode(0), fUid(0), fGid(0), fSize(0),
146  fMtime(0), fIsLink(kFALSE), fUrl("") { }
147 };
148 
149 struct UserGroup_t {
150  Int_t fUid; // user id
151  Int_t fGid; // group id
152  TString fUser; // user name
153  TString fGroup; // group name
154  TString fPasswd; // password
155  TString fRealName; // user full name
156  TString fShell; // user preferred shell
157  UserGroup_t() : fUid(0), fGid(0), fUser(), fGroup(), fPasswd(),
158  fRealName (), fShell() { }
159 };
160 
161 struct SysInfo_t {
162  TString fOS; // OS
163  TString fModel; // computer model
164  TString fCpuType; // type of cpu
165  Int_t fCpus; // number of cpus
166  Int_t fCpuSpeed; // cpu speed in MHz
167  Int_t fBusSpeed; // bus speed in MHz
168  Int_t fL2Cache; // level 2 cache size in KB
169  Int_t fPhysRam; // physical RAM in MB
170  SysInfo_t() : fOS(), fModel(), fCpuType(), fCpus(0), fCpuSpeed(0),
171  fBusSpeed(0), fL2Cache(0), fPhysRam(0) { }
172  virtual ~SysInfo_t() { }
173  ClassDef(SysInfo_t, 1); // System information - OS, CPU, RAM.
174 };
175 
176 struct CpuInfo_t {
177  Float_t fLoad1m; // cpu load average over 1 m
178  Float_t fLoad5m; // cpu load average over 5 m
179  Float_t fLoad15m; // cpu load average over 15 m
180  Float_t fUser; // cpu user load in percentage
181  Float_t fSys; // cpu sys load in percentage
182  Float_t fTotal; // cpu user+sys load in percentage
183  Float_t fIdle; // cpu idle percentage
184  CpuInfo_t() : fLoad1m(0), fLoad5m(0), fLoad15m(0),
185  fUser(0), fSys(0), fTotal(0), fIdle(0) { }
186  virtual ~CpuInfo_t() { }
187  ClassDef(CpuInfo_t, 1); // CPU load information.
188 };
189 
190 struct MemInfo_t {
191  Int_t fMemTotal; // total RAM in MB
192  Int_t fMemUsed; // used RAM in MB
193  Int_t fMemFree; // free RAM in MB
194  Int_t fSwapTotal; // total swap in MB
195  Int_t fSwapUsed; // used swap in MB
196  Int_t fSwapFree; // free swap in MB
197  MemInfo_t() : fMemTotal(0), fMemUsed(0), fMemFree(0),
198  fSwapTotal(0), fSwapUsed(0), fSwapFree(0) { }
199  virtual ~MemInfo_t() { }
200  ClassDef(MemInfo_t, 1); // Memory utilization information.
201 };
202 
203 struct ProcInfo_t {
204  Float_t fCpuUser; // user time used by this process in seconds
205  Float_t fCpuSys; // system time used by this process in seconds
206  Long_t fMemResident; // resident memory used by this process in KB
207  Long_t fMemVirtual; // virtual memory used by this process in KB
208  ProcInfo_t() : fCpuUser(0), fCpuSys(0), fMemResident(0),
209  fMemVirtual(0) { }
210  virtual ~ProcInfo_t() { }
211  ClassDef(ProcInfo_t, 1);// System resource usage of given process.
212 };
213 
215  TString fFile; // File where the output was redirected
216  TString fStdOutTty; // tty associated with stdout, if any (e.g. from ttyname(...))
217  TString fStdErrTty; // tty associated with stderr, if any (e.g. from ttyname(...))
218  Int_t fStdOutDup; // Duplicated descriptor for stdout
219  Int_t fStdErrDup; // Duplicated descriptor for stderr
220  Int_t fReadOffSet; // Offset where to start reading the file (used by ShowOutput(...))
221  RedirectHandle_t(const char *n = 0) : fFile(n), fStdOutTty(), fStdErrTty(), fStdOutDup(-1),
222  fStdErrDup(-1), fReadOffSet(-1) { }
223  void Reset() { fFile = ""; fStdOutTty = ""; fStdErrTty = "";
224  fStdOutDup = -1; fStdErrDup = -1; fReadOffSet = -1; }
225 };
226 
227 #ifdef __CINT__
228 typedef void *Func_t;
229 #else
230 typedef void ((*Func_t)());
231 #endif
232 
233 R__EXTERN const char *gRootDir;
234 R__EXTERN const char *gProgName;
235 R__EXTERN const char *gProgPath;
237 
238 
239 //////////////////////////////////////////////////////////////////////////
240 // //
241 // Asynchronous timer used for processing pending GUI and timer events //
242 // every delay ms. Call in a tight computing loop //
243 // TProcessEventTimer::ProcessEvent(). If the timer did timeout this //
244 // call will process the pending events and return kTRUE if the //
245 // TROOT::IsInterrupted() flag is set (can be done by hitting key in //
246 // canvas or selecting canvas menu item View/Interrupt. //
247 // //
248 //////////////////////////////////////////////////////////////////////////
249 class TProcessEventTimer : public TTimer {
250 public:
251  TProcessEventTimer(Long_t delay);
252  Bool_t Notify() { return kTRUE; }
253  Bool_t ProcessEvents();
254  ClassDef(TProcessEventTimer,0) // Process pending events at fixed time intervals
255 };
256 
257 
258 class TSystem : public TNamed {
259 
260 public:
261  enum EAclicMode { kDefault, kDebug, kOpt };
263  kFlatBuildDir = BIT(0) // If set and a BuildDir is selected, then do not created subdirectories
264  };
265 
266 protected:
267  TFdSet *fReadmask; //!Files that should be checked for read events
268  TFdSet *fWritemask; //!Files that should be checked for write events
269  TFdSet *fReadready; //!Files with reads waiting
270  TFdSet *fWriteready; //!Files with writes waiting
271  TFdSet *fSignals; //!Signals that were trapped
272  Int_t fNfd; //Number of fd's in masks
273  Int_t fMaxrfd; //Largest fd in read mask
274  Int_t fMaxwfd; //Largest fd in write mask
275  Int_t fSigcnt; //Number of pending signals
276  TString fWdpath; //Working directory
277  TString fHostname; //Hostname
278  Bool_t fInsideNotify; //Used by DispatchTimers()
279  Int_t fBeepFreq; //Used by Beep()
280  Int_t fBeepDuration; //Used by Beep()
281 
282  Bool_t fInControl; //True if in eventloop
283  Bool_t fDone; //True if eventloop should be finished
284  Int_t fLevel; //Level of nested eventloops
285 
286  TSeqCollection *fTimers; //List of timers
287  TSeqCollection *fSignalHandler; //List of signal handlers
288  TSeqCollection *fFileHandler; //List of file handlers
289  TSeqCollection *fStdExceptionHandler; //List of std::exception handlers
290  TSeqCollection *fOnExitList; //List of items to be cleaned-up on exit
291 
292  TString fListLibs; //List shared libraries, cache used by GetLibraries
293 
294  TString fBuildArch; //Architecure for which ROOT was built (passed to ./configure)
295  TString fBuildCompiler; // Compiler used to build this ROOT
296  TString fBuildCompilerVersion; //Compiler version used to build this ROOT
297  TString fBuildNode; //Detailed information where ROOT was built
298  TString fBuildDir; //Location where to build ACLiC shared library and use as scratch area.
299  TString fFlagsDebug; //Flags for debug compilation
300  TString fFlagsOpt; //Flags for optimized compilation
301  TString fListPaths; //List of all include (fIncludePath + interpreter include path). Cache used by GetIncludePath
302  TString fIncludePath; //Used to expand $IncludePath in the directives given to SetMakeSharedLib and SetMakeExe
303  TString fLinkedLibs; //Used to expand $LinkedLibs in the directives given to SetMakeSharedLib and SetMakeExe
304  TString fSoExt; //Extension of shared library (.so, .sl, .a, .dll, etc.)
305  TString fObjExt; //Extension of object files (.o, .obj, etc.)
306  EAclicMode fAclicMode; //Whether the compilation should be done debug or opt
307  TString fMakeSharedLib; //Directive used to build a shared library
308  TString fMakeExe; //Directive used to build an executable
309  TString fLinkdefSuffix; //Default suffix for linkdef files to be used by ACLiC (see EACLiCProperties)
310  Int_t fAclicProperties; //Various boolean flag for change ACLiC's behavior.
311  TSeqCollection *fCompiled; //List of shared libs from compiled macros to be deleted
312  TSeqCollection *fHelpers; //List of helper classes for alternative file/directory access
313 
314  TString &GetLastErrorString(); //Last system error message (thread local).
315  const TString &GetLastErrorString() const; //Last system error message (thread local).
316 
317  TSystem *FindHelper(const char *path, void *dirptr = 0);
318  virtual Bool_t ConsistentWith(const char *path, void *dirptr = 0);
319  virtual const char *ExpandFileName(const char *fname);
320  virtual Bool_t ExpandFileName(TString &fname);
322  virtual const char *GetLinkedLibraries();
323  virtual void DoBeep(Int_t /*freq*/=-1, Int_t /*duration*/=-1) const { printf("\a"); fflush(stdout); }
324 
325  static const char *StripOffProto(const char *path, const char *proto) {
326  return !strncmp(path, proto, strlen(proto)) ? path + strlen(proto) : path;
327  }
328 
329 private:
330  TSystem(const TSystem&); // not implemented
331  TSystem& operator=(const TSystem&); // not implemented
332  Bool_t ExpandFileName(const char *fname, char *xname, const int kBufSize);
333 
334 public:
335  TSystem(const char *name = "Generic", const char *title = "Generic System");
336  virtual ~TSystem();
337 
338  //---- Misc
339  virtual Bool_t Init();
340  virtual void SetProgname(const char *name);
341  virtual void SetDisplay();
342  void SetErrorStr(const char *errstr);
343  const char *GetErrorStr() const { return GetLastErrorString(); }
344  virtual const char *GetError();
345  void RemoveOnExit(TObject *obj);
346  virtual const char *HostName();
347  virtual void NotifyApplicationCreated();
348 
349  static Int_t GetErrno();
350  static void ResetErrno();
351  void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE);
352  void GetBeepDefaults(Int_t &freq, Int_t &duration) const { freq = fBeepFreq; duration = fBeepDuration; }
353 
354  //---- EventLoop
355  virtual void Run();
356  virtual Bool_t ProcessEvents();
357  virtual void DispatchOneEvent(Bool_t pendingOnly = kFALSE);
358  virtual void ExitLoop();
359  Bool_t InControl() const { return fInControl; }
360  virtual void InnerLoop();
361  virtual Int_t Select(TList *active, Long_t timeout);
362  virtual Int_t Select(TFileHandler *fh, Long_t timeout);
363 
364  //---- Handling of system events
365  virtual void AddSignalHandler(TSignalHandler *sh);
366  virtual TSignalHandler *RemoveSignalHandler(TSignalHandler *sh);
367  virtual void ResetSignal(ESignals sig, Bool_t reset = kTRUE);
368  virtual void ResetSignals();
369  virtual void IgnoreSignal(ESignals sig, Bool_t ignore = kTRUE);
370  virtual void IgnoreInterrupt(Bool_t ignore = kTRUE);
371  virtual TSeqCollection *GetListOfSignalHandlers() const { return fSignalHandler; }
372  virtual void AddFileHandler(TFileHandler *fh);
373  virtual TFileHandler *RemoveFileHandler(TFileHandler *fh);
374  virtual TSeqCollection *GetListOfFileHandlers() const { return fFileHandler; }
375  virtual void AddStdExceptionHandler(TStdExceptionHandler *eh);
376  virtual TStdExceptionHandler *RemoveStdExceptionHandler(TStdExceptionHandler *eh);
377  virtual TSeqCollection *GetListOfStdExceptionHandlers() const { return fStdExceptionHandler; }
378 
379  //---- Floating Point Exceptions Control
380  virtual Int_t GetFPEMask();
381  virtual Int_t SetFPEMask(Int_t mask = kDefaultMask);
382 
383  //---- Time & Date
384  virtual TTime Now();
385  virtual TSeqCollection *GetListOfTimers() const { return fTimers; }
386  virtual void AddTimer(TTimer *t);
387  virtual TTimer *RemoveTimer(TTimer *t);
388  virtual void ResetTimer(TTimer *) { }
389  virtual Long_t NextTimeOut(Bool_t mode);
390  virtual void Sleep(UInt_t milliSec);
391 
392  //---- Processes
393  virtual Int_t Exec(const char *shellcmd);
394  virtual FILE *OpenPipe(const char *command, const char *mode);
395  virtual int ClosePipe(FILE *pipe);
396  virtual TString GetFromPipe(const char *command);
397  virtual void Exit(int code, Bool_t mode = kTRUE);
398  virtual void Abort(int code = 0);
399  virtual int GetPid();
400  virtual void StackTrace();
401 
402  //---- Directories
403  virtual int MakeDirectory(const char *name);
404  virtual void *OpenDirectory(const char *name);
405  virtual void FreeDirectory(void *dirp);
406  virtual const char *GetDirEntry(void *dirp);
407  virtual void *GetDirPtr() const { return 0; }
408  virtual Bool_t ChangeDirectory(const char *path);
409  virtual const char *WorkingDirectory();
410  virtual std::string GetWorkingDirectory() const;
411  virtual const char *HomeDirectory(const char *userName = 0);
412  virtual std::string GetHomeDirectory(const char *userName = 0) const;
413  virtual int mkdir(const char *name, Bool_t recursive = kFALSE);
414  Bool_t cd(const char *path) { return ChangeDirectory(path); }
415  const char *pwd() { return WorkingDirectory(); }
416  virtual const char *TempDirectory() const;
417  virtual FILE *TempFileName(TString &base, const char *dir = 0);
418 
419  //---- Paths & Files
420  virtual const char *BaseName(const char *pathname);
421  virtual const char *DirName(const char *pathname);
422  virtual char *ConcatFileName(const char *dir, const char *name);
423  virtual Bool_t IsAbsoluteFileName(const char *dir);
424  virtual Bool_t IsFileInIncludePath(const char *name, char **fullpath = 0);
425  virtual const char *PrependPathName(const char *dir, TString& name);
426  virtual Bool_t ExpandPathName(TString &path);
427  virtual char *ExpandPathName(const char *path);
428  virtual Bool_t AccessPathName(const char *path, EAccessMode mode = kFileExists);
429  virtual Bool_t IsPathLocal(const char *path);
430  virtual int CopyFile(const char *from, const char *to, Bool_t overwrite = kFALSE);
431  virtual int Rename(const char *from, const char *to);
432  virtual int Link(const char *from, const char *to);
433  virtual int Symlink(const char *from, const char *to);
434  virtual int Unlink(const char *name);
435  int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime);
436  int GetPathInfo(const char *path, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
437  virtual int GetPathInfo(const char *path, FileStat_t &buf);
438  virtual int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree);
439  virtual int Chmod(const char *file, UInt_t mode);
440  virtual int Umask(Int_t mask);
441  virtual int Utime(const char *file, Long_t modtime, Long_t actime);
442  virtual const char *UnixPathName(const char *unixpathname);
443  virtual const char *FindFile(const char *search, TString& file, EAccessMode mode = kFileExists);
444  virtual char *Which(const char *search, const char *file, EAccessMode mode = kFileExists);
445  virtual TList *GetVolumes(Option_t *) const { return 0; }
446 
447  //---- Users & Groups
448  virtual Int_t GetUid(const char *user = 0);
449  virtual Int_t GetGid(const char *group = 0);
450  virtual Int_t GetEffectiveUid();
451  virtual Int_t GetEffectiveGid();
452  virtual UserGroup_t *GetUserInfo(Int_t uid);
453  virtual UserGroup_t *GetUserInfo(const char *user = 0);
454  virtual UserGroup_t *GetGroupInfo(Int_t gid);
455  virtual UserGroup_t *GetGroupInfo(const char *group = 0);
456 
457  //---- Environment Manipulation
458  virtual void Setenv(const char *name, const char *value);
459  virtual void Unsetenv(const char *name);
460  virtual const char *Getenv(const char *env);
461 
462  //---- System Logging
463  virtual void Openlog(const char *name, Int_t options, ELogFacility facility);
464  virtual void Syslog(ELogLevel level, const char *mess);
465  virtual void Closelog();
466 
467  //---- Standard Output redirection
468  virtual Int_t RedirectOutput(const char *name, const char *mode = "a", RedirectHandle_t *h = 0);
469  virtual void ShowOutput(RedirectHandle_t *h);
470 
471  //---- Dynamic Loading
472  virtual void AddDynamicPath(const char *pathname);
473  virtual const char *GetDynamicPath();
474  virtual void SetDynamicPath(const char *pathname);
475  char *DynamicPathName(const char *lib, Bool_t quiet = kFALSE);
476  virtual const char *FindDynamicLibrary(TString& lib, Bool_t quiet = kFALSE);
477  virtual Func_t DynFindSymbol(const char *module, const char *entry);
478  virtual int Load(const char *module, const char *entry = "", Bool_t system = kFALSE);
479  virtual void Unload(const char *module);
480  virtual void ListSymbols(const char *module, const char *re = "");
481  virtual void ListLibraries(const char *regexp = "");
482  virtual const char *GetLibraries(const char *regexp = "",
483  const char *option = "",
484  Bool_t isRegexp = kTRUE);
485 
486  //---- RPC
487  virtual TInetAddress GetHostByName(const char *server);
488  virtual TInetAddress GetPeerName(int sock);
489  virtual TInetAddress GetSockName(int sock);
490  virtual int GetServiceByName(const char *service);
491  virtual char *GetServiceByPort(int port);
492  virtual int OpenConnection(const char *server, int port, int tcpwindowsize = -1, const char *protocol = "tcp");
493  virtual int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize = -1);
494  virtual int AnnounceUdpService(int port, int backlog);
495  virtual int AnnounceUnixService(int port, int backlog);
496  virtual int AnnounceUnixService(const char *sockpath, int backlog);
497  virtual int AcceptConnection(int sock);
498  virtual void CloseConnection(int sock, Bool_t force = kFALSE);
499  virtual int RecvRaw(int sock, void *buffer, int length, int flag);
500  virtual int SendRaw(int sock, const void *buffer, int length, int flag);
501  virtual int RecvBuf(int sock, void *buffer, int length);
502  virtual int SendBuf(int sock, const void *buffer, int length);
503  virtual int SetSockOpt(int sock, int kind, int val);
504  virtual int GetSockOpt(int sock, int kind, int *val);
505 
506  //---- System, CPU and Memory info
507  virtual int GetSysInfo(SysInfo_t *info) const;
508  virtual int GetCpuInfo(CpuInfo_t *info, Int_t sampleTime = 1000) const;
509  virtual int GetMemInfo(MemInfo_t *info) const;
510  virtual int GetProcInfo(ProcInfo_t *info) const;
511 
512  //---- ACLiC (Automatic Compiler of Shared Library for CINT)
513  virtual void AddIncludePath(const char *includePath);
514  virtual void AddLinkedLibs(const char *linkedLib);
515  virtual int CompileMacro(const char *filename, Option_t *opt="", const char* library_name = "", const char* build_dir = "", UInt_t dirmode = 0);
516  virtual Int_t GetAclicProperties() const;
517  virtual const char *GetBuildArch() const;
518  virtual const char *GetBuildCompiler() const;
519  virtual const char *GetBuildCompilerVersion() const;
520  virtual const char *GetBuildNode() const;
521  virtual const char *GetBuildDir() const;
522  virtual const char *GetFlagsDebug() const;
523  virtual const char *GetFlagsOpt() const;
524  virtual const char *GetIncludePath();
525  virtual const char *GetLinkedLibs() const;
526  virtual const char *GetLinkdefSuffix() const;
527  virtual EAclicMode GetAclicMode() const;
528  virtual const char *GetMakeExe() const;
529  virtual const char *GetMakeSharedLib() const;
530  virtual const char *GetSoExt() const;
531  virtual const char *GetObjExt() const;
532  virtual void SetBuildDir(const char* build_dir, Bool_t isflat = kFALSE);
533  virtual void SetFlagsDebug(const char *);
534  virtual void SetFlagsOpt(const char *);
535  virtual void SetIncludePath(const char *includePath);
536  virtual void SetMakeExe(const char *directives);
537  virtual void SetAclicMode(EAclicMode mode);
538  virtual void SetMakeSharedLib(const char *directives);
539  virtual void SetLinkedLibs(const char *linkedLibs);
540  virtual void SetLinkdefSuffix(const char *suffix);
541  virtual void SetSoExt(const char *soExt);
542  virtual void SetObjExt(const char *objExt);
543  virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const;
544  virtual void CleanCompiledMacros();
545 
546  ClassDef(TSystem,0) //ABC defining a generic interface to the OS
547 };
548 
550 R__EXTERN TFileHandler *gXDisplay; // Display server (X11) input event handler
551 
552 
553 #endif
Bool_t R_ISSOCK(Int_t mode)
Definition: TSystem.h:132
Int_t fMemFree
Definition: TSystem.h:193
Int_t fGid
Definition: TSystem.h:151
TString fStdErrTty
Definition: TSystem.h:217
TSeqCollection * fCompiled
Definition: TSystem.h:311
Float_t fLoad15m
Definition: TSystem.h:179
TString fBuildCompiler
Definition: TSystem.h:295
Bool_t fDone
Definition: TSystem.h:283
CpuInfo_t()
Definition: TSystem.h:184
Bool_t R_ISCHR(Int_t mode)
Definition: TSystem.h:127
int GetErrno()
return errno
Bool_t R_ISLNK(Int_t mode)
Definition: TSystem.h:130
long long Long64_t
Definition: RtypesCore.h:69
Int_t fBusSpeed
Definition: TSystem.h:167
Int_t fPhysRam
Definition: TSystem.h:169
Int_t fSigcnt
Definition: TSystem.h:275
Int_t fReadOffSet
Definition: TSystem.h:220
virtual ~ProcInfo_t()
Definition: TSystem.h:210
EAclicMode
Definition: TSystem.h:261
Float_t fSys
Definition: TSystem.h:181
virtual void SigAlarmInterruptsSyscalls(Bool_t)
Definition: TSystem.h:321
R__EXTERN TVirtualMutex * gSystemMutex
Definition: TSystem.h:236
virtual TSeqCollection * GetListOfFileHandlers() const
Definition: TSystem.h:374
float Float_t
Definition: RtypesCore.h:53
Int_t fLevel
Definition: TSystem.h:284
const char Option_t
Definition: RtypesCore.h:62
Int_t fBeepFreq
Definition: TSystem.h:279
TSeqCollection * fOnExitList
Definition: TSystem.h:290
TString fOS
Definition: TSystem.h:162
Int_t fUid
Definition: TSystem.h:139
TString fBuildCompilerVersion
Definition: TSystem.h:296
#define BIT(n)
Definition: Rtypes.h:120
TH1 * h
Definition: legend2.C:5
RooCmdArg Link(const char *state, RooAbsData &data)
TString fStdOutTty
Definition: TSystem.h:216
TString fBuildNode
Definition: TSystem.h:297
TString fGroup
Definition: TSystem.h:153
virtual void * GetDirPtr() const
Definition: TSystem.h:407
This class represents an Internet Protocol (IP) address.
Definition: TInetAddress.h:40
TString fWdpath
Definition: TSystem.h:276
This class implements a mutex interface.
Definition: TVirtualMutex.h:34
Int_t fStdOutDup
Definition: TSystem.h:218
EFpeMask
Definition: TSystem.h:88
Bool_t cd(const char *path)
Definition: TSystem.h:414
Basic string class.
Definition: TString.h:137
TSeqCollection * fSignalHandler
Definition: TSystem.h:287
TString fBuildArch
Definition: TSystem.h:294
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Long_t fMtime
Definition: TSystem.h:142
virtual TSeqCollection * GetListOfTimers() const
Definition: TSystem.h:385
Basic time type with millisecond precision.
Definition: TTime.h:29
TString fModel
Definition: TSystem.h:163
Bool_t fInsideNotify
Definition: TSystem.h:278
Long64_t fSize
Definition: TSystem.h:141
Int_t fUid
Definition: TSystem.h:150
Bool_t R_ISREG(Int_t mode)
Definition: TSystem.h:129
Int_t fMode
Definition: TSystem.h:138
TSeqCollection * fStdExceptionHandler
Definition: TSystem.h:289
TString fHostname
Definition: TSystem.h:277
Sequenceable collection abstract base class.
#define ClassDef(name, id)
Definition: Rtypes.h:254
Float_t fUser
Definition: TSystem.h:180
const char * GetErrorStr() const
Definition: TSystem.h:343
Int_t fSwapFree
Definition: TSystem.h:196
TString fBuildDir
Definition: TSystem.h:298
Int_t bsize[]
Definition: SparseFit4.cxx:31
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
Int_t fMaxrfd
Definition: TSystem.h:273
TSeqCollection * fHelpers
Definition: TSystem.h:312
TString fListPaths
Definition: TSystem.h:301
TString fLinkedLibs
Definition: TSystem.h:303
R__EXTERN TFileHandler * gXDisplay
Definition: TSystem.h:550
Int_t fNfd
Signals that were trapped.
Definition: TSystem.h:272
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:119
TString fShell
Definition: TSystem.h:156
TString fRealName
Definition: TSystem.h:155
EAclicProperties
Definition: TSystem.h:262
TString fUrl
Definition: TSystem.h:144
EFileModeMask
Definition: TSystem.h:99
UserGroup_t()
Definition: TSystem.h:157
Int_t fGid
Definition: TSystem.h:140
ELogLevel
Definition: TSystem.h:66
ELogOption
Definition: TSystem.h:61
TSeqCollection * fFileHandler
Definition: TSystem.h:288
TString fLinkdefSuffix
Definition: TSystem.h:309
A doubly linked list.
Definition: TList.h:47
Float_t fLoad1m
Definition: TSystem.h:177
const char * pwd()
Definition: TSystem.h:415
Int_t fL2Cache
Definition: TSystem.h:168
R__EXTERN const char * gProgName
Definition: TSystem.h:234
Float_t fCpuUser
Definition: TSystem.h:204
ESignals
TString fUser
Definition: TSystem.h:152
void ResetErrno()
reset errno
Int_t fCpus
Definition: TSystem.h:165
Bool_t fIsLink
Definition: TSystem.h:143
R__EXTERN TSystem * gSystem
Definition: TSystem.h:549
Int_t fSwapUsed
Definition: TSystem.h:195
Long_t fMemVirtual
Definition: TSystem.h:207
void GetBeepDefaults(Int_t &freq, Int_t &duration) const
Definition: TSystem.h:352
unsigned int UInt_t
Definition: RtypesCore.h:42
static const char * StripOffProto(const char *path, const char *proto)
Definition: TSystem.h:325
virtual TSeqCollection * GetListOfSignalHandlers() const
Definition: TSystem.h:371
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:57
Float_t fLoad5m
Definition: TSystem.h:178
TString fMakeExe
Definition: TSystem.h:308
RedirectHandle_t(const char *n=0)
Definition: TSystem.h:221
virtual TSeqCollection * GetListOfStdExceptionHandlers() const
Definition: TSystem.h:377
RooCmdArg Rename(const char *suffix)
TString fListLibs
Definition: TSystem.h:292
virtual ~MemInfo_t()
Definition: TSystem.h:199
Int_t fAclicProperties
Definition: TSystem.h:310
virtual void ResetTimer(TTimer *)
Definition: TSystem.h:388
long Long_t
Definition: RtypesCore.h:50
TString fPasswd
Definition: TSystem.h:154
EAclicMode fAclicMode
Definition: TSystem.h:306
TFdSet * fReadready
Files that should be checked for write events.
Definition: TSystem.h:269
R__EXTERN const char * gProgPath
Definition: TSystem.h:235
FileStat_t()
Definition: TSystem.h:145
ProcInfo_t()
Definition: TSystem.h:208
Float_t fCpuSys
Definition: TSystem.h:205
SysInfo_t()
Definition: TSystem.h:170
TFdSet * fReadmask
Definition: TSystem.h:267
ELogFacility
Definition: TSystem.h:77
TString fCpuType
Definition: TSystem.h:164
TString fObjExt
Definition: TSystem.h:305
TFdSet * fSignals
Files with writes waiting.
Definition: TSystem.h:271
EAccessMode
Definition: TSystem.h:54
void Reset()
Definition: TSystem.h:223
Int_t fMemTotal
Definition: TSystem.h:191
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void DoBeep(Int_t=-1, Int_t=-1) const
Definition: TSystem.h:323
#define R__EXTERN
Definition: DllImport.h:27
typedef void((*Func_t)())
Int_t fMaxwfd
Definition: TSystem.h:274
TSeqCollection * fTimers
Definition: TSystem.h:286
Bool_t R_ISDIR(Int_t mode)
Definition: TSystem.h:126
Definition: file.py:1
Bool_t fInControl
Definition: TSystem.h:282
R__EXTERN const char * gRootDir
Definition: TSystem.h:233
TString fFlagsDebug
Definition: TSystem.h:299
Int_t fMemUsed
Definition: TSystem.h:192
Int_t fCpuSpeed
Definition: TSystem.h:166
virtual TList * GetVolumes(Option_t *) const
Definition: TSystem.h:445
Long_t fIno
Definition: TSystem.h:137
TString fFlagsOpt
Definition: TSystem.h:300
Bool_t R_ISBLK(Int_t mode)
Definition: TSystem.h:128
const char * proto
Definition: civetweb.c:11652
Float_t fTotal
Definition: TSystem.h:182
TString fMakeSharedLib
Definition: TSystem.h:307
Int_t fBeepDuration
Definition: TSystem.h:280
TFdSet * fWriteready
Files with reads waiting.
Definition: TSystem.h:270
Int_t fSwapTotal
Definition: TSystem.h:194
Long_t fDev
Definition: TSystem.h:136
TString fSoExt
Definition: TSystem.h:304
Abstract base class defining a generic interface to the underlying Operating System.
Definition: TSystem.h:258
const Bool_t kTRUE
Definition: Rtypes.h:91
Int_t fStdErrDup
Definition: TSystem.h:219
Bool_t R_ISFIFO(Int_t mode)
Definition: TSystem.h:131
TFdSet * fWritemask
Files that should be checked for read events.
Definition: TSystem.h:268
Bool_t Notify()
Notify when timer times out.
Definition: TSystem.h:252
MemInfo_t()
Definition: TSystem.h:197
Float_t fIdle
Definition: TSystem.h:183
const Int_t n
Definition: legend1.C:16
TString fFile
Definition: TSystem.h:215
TString fIncludePath
Definition: TSystem.h:302
char name[80]
Definition: TGX11.cxx:109
Long_t fMemResident
Definition: TSystem.h:206
virtual ~SysInfo_t()
Definition: TSystem.h:172
Bool_t InControl() const
Definition: TSystem.h:359
virtual ~CpuInfo_t()
Definition: TSystem.h:186
Bool_t R_ISOFF(Int_t mode)
Definition: TSystem.h:133