Logo ROOT   6.16/01
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#include "TNamed.h"
35#include "TString.h"
36#include "TInetAddress.h"
37#include "TTimer.h"
38#include "ThreadLocalStorage.h"
39
40class TSeqCollection;
41class TFdSet;
42class TVirtualMutex;
43
49};
50
52 kLogPid = 0x01,
53 kLogCons = 0x02
54};
55
64 kLogDebug = 7
65};
66
76};
77
79 kNoneMask = 0x00,
80 kInvalid = 0x01, // Invalid argument
81 kDivByZero = 0x02, // Division by zero
82 kOverflow = 0x04, // Overflow
83 kUnderflow = 0x08, // Underflow
84 kInexact = 0x10, // Inexact
86 kAllMask = 0x1F
87};
88
90 kS_IFMT = 0170000, // bitmask for the file type bitfields
91 kS_IFSOCK = 0140000, // socket
92 kS_IFLNK = 0120000, // symbolic link
93 kS_IFOFF = 0110000, // offline file
94 kS_IFREG = 0100000, // regular file
95 kS_IFBLK = 0060000, // block device
96 kS_IFDIR = 0040000, // directory
97 kS_IFCHR = 0020000, // character device
98 kS_IFIFO = 0010000, // fifo
99 kS_ISUID = 0004000, // set UID bit
100 kS_ISGID = 0002000, // set GID bit
101 kS_ISVTX = 0001000, // sticky bit
102 kS_IRWXU = 00700, // mask for file owner permissions
103 kS_IRUSR = 00400, // owner has read permission
104 kS_IWUSR = 00200, // owner has write permission
105 kS_IXUSR = 00100, // owner has execute permission
106 kS_IRWXG = 00070, // mask for group permissions
107 kS_IRGRP = 00040, // group has read permission
108 kS_IWGRP = 00020, // group has write permission
109 kS_IXGRP = 00010, // group has execute permission
110 kS_IRWXO = 00007, // mask for permissions for others (not in group)
111 kS_IROTH = 00004, // others have read permission
112 kS_IWOTH = 00002, // others have write permisson
113 kS_IXOTH = 00001 // others have execute permission
115
116inline Bool_t R_ISDIR(Int_t mode) { return ((mode & kS_IFMT) == kS_IFDIR); }
117inline Bool_t R_ISCHR(Int_t mode) { return ((mode & kS_IFMT) == kS_IFCHR); }
118inline Bool_t R_ISBLK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFBLK); }
119inline Bool_t R_ISREG(Int_t mode) { return ((mode & kS_IFMT) == kS_IFREG); }
120inline Bool_t R_ISLNK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFLNK); }
121inline Bool_t R_ISFIFO(Int_t mode) { return ((mode & kS_IFMT) == kS_IFIFO); }
122inline Bool_t R_ISSOCK(Int_t mode) { return ((mode & kS_IFMT) == kS_IFSOCK); }
123inline Bool_t R_ISOFF(Int_t mode) { return ((mode & kS_IFMT) == kS_IFOFF); }
124
126 Long_t fDev; // device id
127 Long_t fIno; // inode
128 Int_t fMode; // protection (combination of EFileModeMask bits)
129 Int_t fUid; // user id of owner
130 Int_t fGid; // group id of owner
131 Long64_t fSize; // total size in bytes
132 Long_t fMtime; // modification date
133 Bool_t fIsLink; // symbolic link
134 TString fUrl; // end point url of file
135 FileStat_t() : fDev(0), fIno(0), fMode(0), fUid(0), fGid(0), fSize(0),
136 fMtime(0), fIsLink(kFALSE), fUrl("") { }
137};
138
140 Int_t fUid; // user id
141 Int_t fGid; // group id
142 TString fUser; // user name
143 TString fGroup; // group name
144 TString fPasswd; // password
145 TString fRealName; // user full name
146 TString fShell; // user preferred shell
148 fRealName (), fShell() { }
149};
150
151struct SysInfo_t {
153 TString fModel; // computer model
154 TString fCpuType; // type of cpu
155 Int_t fCpus; // number of cpus
156 Int_t fCpuSpeed; // cpu speed in MHz
157 Int_t fBusSpeed; // bus speed in MHz
158 Int_t fL2Cache; // level 2 cache size in KB
159 Int_t fPhysRam; // physical RAM in MB
161 fBusSpeed(0), fL2Cache(0), fPhysRam(0) { }
162 virtual ~SysInfo_t() { }
163 ClassDef(SysInfo_t, 1); // System information - OS, CPU, RAM.
164};
165
166struct CpuInfo_t {
167 Float_t fLoad1m; // cpu load average over 1 m
168 Float_t fLoad5m; // cpu load average over 5 m
169 Float_t fLoad15m; // cpu load average over 15 m
170 Float_t fUser; // cpu user load in percentage
171 Float_t fSys; // cpu sys load in percentage
172 Float_t fTotal; // cpu user+sys load in percentage
173 Float_t fIdle; // cpu idle percentage
175 fUser(0), fSys(0), fTotal(0), fIdle(0) { }
176 virtual ~CpuInfo_t() { }
177 ClassDef(CpuInfo_t, 1); // CPU load information.
178};
179
180struct MemInfo_t {
181 Int_t fMemTotal; // total RAM in MB
182 Int_t fMemUsed; // used RAM in MB
183 Int_t fMemFree; // free RAM in MB
184 Int_t fSwapTotal; // total swap in MB
185 Int_t fSwapUsed; // used swap in MB
186 Int_t fSwapFree; // free swap in MB
188 fSwapTotal(0), fSwapUsed(0), fSwapFree(0) { }
189 virtual ~MemInfo_t() { }
190 ClassDef(MemInfo_t, 1); // Memory utilization information.
191};
192
194 Float_t fCpuUser; // user time used by this process in seconds
195 Float_t fCpuSys; // system time used by this process in seconds
196 Long_t fMemResident; // resident memory used by this process in KB
197 Long_t fMemVirtual; // virtual memory used by this process in KB
199 fMemVirtual(0) { }
200 virtual ~ProcInfo_t();
201 ClassDef(ProcInfo_t, 1);// System resource usage of given process.
202};
203
205 TString fFile; // File where the output was redirected
206 TString fStdOutTty; // tty associated with stdout, if any (e.g. from ttyname(...))
207 TString fStdErrTty; // tty associated with stderr, if any (e.g. from ttyname(...))
208 Int_t fStdOutDup; // Duplicated descriptor for stdout
209 Int_t fStdErrDup; // Duplicated descriptor for stderr
210 Int_t fReadOffSet; // Offset where to start reading the file (used by ShowOutput(...))
211 RedirectHandle_t(const char *n = 0) : fFile(n), fStdOutTty(), fStdErrTty(), fStdOutDup(-1),
212 fStdErrDup(-1), fReadOffSet(-1) { }
213 void Reset() { fFile = ""; fStdOutTty = ""; fStdErrTty = "";
214 fStdOutDup = -1; fStdErrDup = -1; fReadOffSet = -1; }
215};
216
217#ifdef __CINT__
218typedef void *Func_t;
219#else
220typedef void ((*Func_t)());
221#endif
222
223R__EXTERN const char *gRootDir;
227
228
229//////////////////////////////////////////////////////////////////////////
230// //
231// Asynchronous timer used for processing pending GUI and timer events //
232// every delay ms. Call in a tight computing loop //
233// TProcessEventTimer::ProcessEvent(). If the timer did timeout this //
234// call will process the pending events and return kTRUE if the //
235// TROOT::IsInterrupted() flag is set (can be done by hitting key in //
236// canvas or selecting canvas menu item View/Interrupt. //
237// //
238//////////////////////////////////////////////////////////////////////////
240public:
242 Bool_t Notify() { return kTRUE; }
244 ClassDef(TProcessEventTimer,0) // Process pending events at fixed time intervals
245};
246
247
248class TSystem : public TNamed {
249
250public:
253 kFlatBuildDir = BIT(0) // If set and a BuildDir is selected, then do not created subdirectories
254 };
255
256protected:
257 TFdSet *fReadmask; //!Files that should be checked for read events
258 TFdSet *fWritemask; //!Files that should be checked for write events
259 TFdSet *fReadready; //!Files with reads waiting
260 TFdSet *fWriteready; //!Files with writes waiting
261 TFdSet *fSignals; //!Signals that were trapped
262 Int_t fNfd; //Number of fd's in masks
263 Int_t fMaxrfd; //Largest fd in read mask
264 Int_t fMaxwfd; //Largest fd in write mask
265 Int_t fSigcnt; //Number of pending signals
266 TString fWdpath; //Working directory
267 TString fHostname; //Hostname
268 Bool_t fInsideNotify; //Used by DispatchTimers()
269 Int_t fBeepFreq; //Used by Beep()
270 Int_t fBeepDuration; //Used by Beep()
271
272 Bool_t fInControl; //True if in eventloop
273 Bool_t fDone; //True if eventloop should be finished
274 Int_t fLevel; //Level of nested eventloops
275
276 TSeqCollection *fTimers; //List of timers
277 TSeqCollection *fSignalHandler; //List of signal handlers
278 TSeqCollection *fFileHandler; //List of file handlers
279 TSeqCollection *fStdExceptionHandler; //List of std::exception handlers
280 TSeqCollection *fOnExitList; //List of items to be cleaned-up on exit
281
282 TString fListLibs; //List shared libraries, cache used by GetLibraries
283
284 TString fBuildArch; //Architecure for which ROOT was built (passed to ./configure)
285 TString fBuildCompiler; // Compiler used to build this ROOT
286 TString fBuildCompilerVersion; //Compiler version used to build this ROOT
287 TString fBuildNode; //Detailed information where ROOT was built
288 TString fBuildDir; //Location where to build ACLiC shared library and use as scratch area.
289 TString fFlagsDebug; //Flags for debug compilation
290 TString fFlagsOpt; //Flags for optimized compilation
291 TString fListPaths; //List of all include (fIncludePath + interpreter include path). Cache used by GetIncludePath
292 TString fIncludePath; //Used to expand $IncludePath in the directives given to SetMakeSharedLib and SetMakeExe
293 TString fLinkedLibs; //Used to expand $LinkedLibs in the directives given to SetMakeSharedLib and SetMakeExe
294 TString fSoExt; //Extension of shared library (.so, .sl, .a, .dll, etc.)
295 TString fObjExt; //Extension of object files (.o, .obj, etc.)
296 EAclicMode fAclicMode; //Whether the compilation should be done debug or opt
297 TString fMakeSharedLib; //Directive used to build a shared library
298 TString fMakeExe; //Directive used to build an executable
299 TString fLinkdefSuffix; //Default suffix for linkdef files to be used by ACLiC (see EACLiCProperties)
300 Int_t fAclicProperties; //Various boolean flag for change ACLiC's behavior.
301 TSeqCollection *fCompiled; //List of shared libs from compiled macros to be deleted
302 TSeqCollection *fHelpers; //List of helper classes for alternative file/directory access
303
304 TString &GetLastErrorString(); //Last system error message (thread local).
305 const TString &GetLastErrorString() const; //Last system error message (thread local).
306
307 TSystem *FindHelper(const char *path, void *dirptr = 0);
308 virtual Bool_t ConsistentWith(const char *path, void *dirptr = 0);
309 virtual const char *ExpandFileName(const char *fname);
310 virtual Bool_t ExpandFileName(TString &fname);
312 virtual const char *GetLinkedLibraries();
313 virtual void DoBeep(Int_t /*freq*/=-1, Int_t /*duration*/=-1) const { printf("\a"); fflush(stdout); }
314
315 static const char *StripOffProto(const char *path, const char *proto) {
316 return !strncmp(path, proto, strlen(proto)) ? path + strlen(proto) : path;
317 }
318
319private:
320 TSystem(const TSystem&); // not implemented
321 TSystem& operator=(const TSystem&); // not implemented
322 Bool_t ExpandFileName(const char *fname, char *xname, const int kBufSize);
323
324public:
325 TSystem(const char *name = "Generic", const char *title = "Generic System");
326 virtual ~TSystem();
327
328 //---- Misc
329 virtual Bool_t Init();
330 virtual void SetProgname(const char *name);
331 virtual void SetDisplay();
332 void SetErrorStr(const char *errstr);
333 const char *GetErrorStr() const { return GetLastErrorString(); }
334 virtual const char *GetError();
335 void RemoveOnExit(TObject *obj);
336 virtual const char *HostName();
337 virtual void NotifyApplicationCreated();
338
339 static Int_t GetErrno();
340 static void ResetErrno();
341 void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE);
342 void GetBeepDefaults(Int_t &freq, Int_t &duration) const { freq = fBeepFreq; duration = fBeepDuration; }
343
344 //---- EventLoop
345 virtual void Run();
346 virtual Bool_t ProcessEvents();
347 virtual void DispatchOneEvent(Bool_t pendingOnly = kFALSE);
348 virtual void ExitLoop();
349 Bool_t InControl() const { return fInControl; }
350 virtual void InnerLoop();
351 virtual Int_t Select(TList *active, Long_t timeout);
352 virtual Int_t Select(TFileHandler *fh, Long_t timeout);
353
354 //---- Handling of system events
355 virtual void AddSignalHandler(TSignalHandler *sh);
357 virtual void ResetSignal(ESignals sig, Bool_t reset = kTRUE);
358 virtual void ResetSignals();
359 virtual void IgnoreSignal(ESignals sig, Bool_t ignore = kTRUE);
360 virtual void IgnoreInterrupt(Bool_t ignore = kTRUE);
362 virtual void AddFileHandler(TFileHandler *fh);
368
369 //---- Floating Point Exceptions Control
370 virtual Int_t GetFPEMask();
371 virtual Int_t SetFPEMask(Int_t mask = kDefaultMask);
372
373 //---- Time & Date
374 virtual TTime Now();
375 virtual TSeqCollection *GetListOfTimers() const { return fTimers; }
376 virtual void AddTimer(TTimer *t);
377 virtual TTimer *RemoveTimer(TTimer *t);
378 virtual void ResetTimer(TTimer *) { }
379 virtual Long_t NextTimeOut(Bool_t mode);
380 virtual void Sleep(UInt_t milliSec);
381
382 //---- Processes
383 virtual Int_t Exec(const char *shellcmd);
384 virtual FILE *OpenPipe(const char *command, const char *mode);
385 virtual int ClosePipe(FILE *pipe);
386 virtual TString GetFromPipe(const char *command);
387 virtual void Exit(int code, Bool_t mode = kTRUE);
388 virtual void Abort(int code = 0);
389 virtual int GetPid();
390 virtual void StackTrace();
391
392 //---- Directories
393 virtual int MakeDirectory(const char *name);
394 virtual void *OpenDirectory(const char *name);
395 virtual void FreeDirectory(void *dirp);
396 virtual const char *GetDirEntry(void *dirp);
397 virtual void *GetDirPtr() const { return 0; }
398 virtual Bool_t ChangeDirectory(const char *path);
399 virtual const char *WorkingDirectory();
400 virtual std::string GetWorkingDirectory() const;
401 virtual const char *HomeDirectory(const char *userName = 0);
402 virtual std::string GetHomeDirectory(const char *userName = 0) const;
403 virtual int mkdir(const char *name, Bool_t recursive = kFALSE);
404 Bool_t cd(const char *path) { return ChangeDirectory(path); }
405 const char *pwd() { return WorkingDirectory(); }
406 virtual const char *TempDirectory() const;
407 virtual FILE *TempFileName(TString &base, const char *dir = 0);
408
409 //---- Paths & Files
410 virtual const char *BaseName(const char *pathname);
411 virtual const char *DirName(const char *pathname);
412 virtual char *ConcatFileName(const char *dir, const char *name);
413 virtual Bool_t IsAbsoluteFileName(const char *dir);
414 virtual Bool_t IsFileInIncludePath(const char *name, char **fullpath = 0);
415 virtual const char *PrependPathName(const char *dir, TString& name);
416 virtual Bool_t ExpandPathName(TString &path);
417 virtual char *ExpandPathName(const char *path);
418 virtual Bool_t AccessPathName(const char *path, EAccessMode mode = kFileExists);
419 virtual Bool_t IsPathLocal(const char *path);
420 virtual int CopyFile(const char *from, const char *to, Bool_t overwrite = kFALSE);
421 virtual int Rename(const char *from, const char *to);
422 virtual int Link(const char *from, const char *to);
423 virtual int Symlink(const char *from, const char *to);
424 virtual int Unlink(const char *name);
425 int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime);
426 int GetPathInfo(const char *path, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
427 virtual int GetPathInfo(const char *path, FileStat_t &buf);
428 virtual int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree);
429 virtual int Chmod(const char *file, UInt_t mode);
430 virtual int Umask(Int_t mask);
431 virtual int Utime(const char *file, Long_t modtime, Long_t actime);
432 virtual const char *UnixPathName(const char *unixpathname);
433 virtual const char *FindFile(const char *search, TString& file, EAccessMode mode = kFileExists);
434 virtual char *Which(const char *search, const char *file, EAccessMode mode = kFileExists);
435 virtual TList *GetVolumes(Option_t *) const { return 0; }
436
437 //---- Users & Groups
438 virtual Int_t GetUid(const char *user = 0);
439 virtual Int_t GetGid(const char *group = 0);
440 virtual Int_t GetEffectiveUid();
441 virtual Int_t GetEffectiveGid();
442 virtual UserGroup_t *GetUserInfo(Int_t uid);
443 virtual UserGroup_t *GetUserInfo(const char *user = 0);
444 virtual UserGroup_t *GetGroupInfo(Int_t gid);
445 virtual UserGroup_t *GetGroupInfo(const char *group = 0);
446
447 //---- Environment Manipulation
448 virtual void Setenv(const char *name, const char *value);
449 virtual void Unsetenv(const char *name);
450 virtual const char *Getenv(const char *env);
451
452 //---- System Logging
453 virtual void Openlog(const char *name, Int_t options, ELogFacility facility);
454 virtual void Syslog(ELogLevel level, const char *mess);
455 virtual void Closelog();
456
457 //---- Standard Output redirection
458 virtual Int_t RedirectOutput(const char *name, const char *mode = "a", RedirectHandle_t *h = 0);
459 virtual void ShowOutput(RedirectHandle_t *h);
460
461 //---- Dynamic Loading
462 virtual void AddDynamicPath(const char *pathname);
463 virtual const char *GetDynamicPath();
464 virtual void SetDynamicPath(const char *pathname);
465 char *DynamicPathName(const char *lib, Bool_t quiet = kFALSE);
466 virtual const char *FindDynamicLibrary(TString& lib, Bool_t quiet = kFALSE);
467 virtual Func_t DynFindSymbol(const char *module, const char *entry);
468 virtual int Load(const char *module, const char *entry = "", Bool_t system = kFALSE);
469 virtual void Unload(const char *module);
470 virtual UInt_t LoadAllLibraries();
471 virtual void ListSymbols(const char *module, const char *re = "");
472 virtual void ListLibraries(const char *regexp = "");
473 virtual const char *GetLibraries(const char *regexp = "",
474 const char *option = "",
475 Bool_t isRegexp = kTRUE);
476
477 //---- RPC
478 virtual TInetAddress GetHostByName(const char *server);
479 virtual TInetAddress GetPeerName(int sock);
480 virtual TInetAddress GetSockName(int sock);
481 virtual int GetServiceByName(const char *service);
482 virtual char *GetServiceByPort(int port);
483 virtual int OpenConnection(const char *server, int port, int tcpwindowsize = -1, const char *protocol = "tcp");
484 virtual int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize = -1);
485 virtual int AnnounceUdpService(int port, int backlog);
486 virtual int AnnounceUnixService(int port, int backlog);
487 virtual int AnnounceUnixService(const char *sockpath, int backlog);
488 virtual int AcceptConnection(int sock);
489 virtual void CloseConnection(int sock, Bool_t force = kFALSE);
490 virtual int RecvRaw(int sock, void *buffer, int length, int flag);
491 virtual int SendRaw(int sock, const void *buffer, int length, int flag);
492 virtual int RecvBuf(int sock, void *buffer, int length);
493 virtual int SendBuf(int sock, const void *buffer, int length);
494 virtual int SetSockOpt(int sock, int kind, int val);
495 virtual int GetSockOpt(int sock, int kind, int *val);
496
497 //---- System, CPU and Memory info
498 virtual int GetSysInfo(SysInfo_t *info) const;
499 virtual int GetCpuInfo(CpuInfo_t *info, Int_t sampleTime = 1000) const;
500 virtual int GetMemInfo(MemInfo_t *info) const;
501 virtual int GetProcInfo(ProcInfo_t *info) const;
502
503 //---- ACLiC (Automatic Compiler of Shared Library for CINT)
504 virtual void AddIncludePath(const char *includePath);
505 virtual void AddLinkedLibs(const char *linkedLib);
506 virtual int CompileMacro(const char *filename, Option_t *opt="", const char* library_name = "", const char* build_dir = "", UInt_t dirmode = 0);
507 virtual Int_t GetAclicProperties() const;
508 virtual const char *GetBuildArch() const;
509 virtual const char *GetBuildCompiler() const;
510 virtual const char *GetBuildCompilerVersion() const;
511 virtual const char *GetBuildNode() const;
512 virtual const char *GetBuildDir() const;
513 virtual const char *GetFlagsDebug() const;
514 virtual const char *GetFlagsOpt() const;
515 virtual const char *GetIncludePath();
516 virtual const char *GetLinkedLibs() const;
517 virtual const char *GetLinkdefSuffix() const;
518 virtual EAclicMode GetAclicMode() const;
519 virtual const char *GetMakeExe() const;
520 virtual const char *GetMakeSharedLib() const;
521 virtual const char *GetSoExt() const;
522 virtual const char *GetObjExt() const;
523 virtual void SetBuildDir(const char* build_dir, Bool_t isflat = kFALSE);
524 virtual void SetFlagsDebug(const char *);
525 virtual void SetFlagsOpt(const char *);
526 virtual void SetIncludePath(const char *includePath);
527 virtual void SetMakeExe(const char *directives);
528 virtual void SetAclicMode(EAclicMode mode);
529 virtual void SetMakeSharedLib(const char *directives);
530 virtual void SetLinkedLibs(const char *linkedLibs);
531 virtual void SetLinkdefSuffix(const char *suffix);
532 virtual void SetSoExt(const char *soExt);
533 virtual void SetObjExt(const char *objExt);
534 virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const;
535 virtual void CleanCompiledMacros();
536
537 ClassDef(TSystem,0) //ABC defining a generic interface to the OS
538};
539
541R__EXTERN TFileHandler *gXDisplay; // Display server (X11) input event handler
542
543
544#endif
#define R__EXTERN
Definition: DllImport.h:27
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
long long Long64_t
Definition: RtypesCore.h:69
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
#define BIT(n)
Definition: Rtypes.h:82
ESignals
R__EXTERN const char * gProgName
Definition: TSystem.h:224
Bool_t R_ISFIFO(Int_t mode)
Definition: TSystem.h:121
Bool_t R_ISOFF(Int_t mode)
Definition: TSystem.h:123
R__EXTERN TVirtualMutex * gSystemMutex
Definition: TSystem.h:226
typedef void((*Func_t)())
Bool_t R_ISSOCK(Int_t mode)
Definition: TSystem.h:122
Bool_t R_ISBLK(Int_t mode)
Definition: TSystem.h:118
R__EXTERN const char * gRootDir
Definition: TSystem.h:223
EAccessMode
Definition: TSystem.h:44
@ kFileExists
Definition: TSystem.h:45
@ kExecutePermission
Definition: TSystem.h:46
@ kReadPermission
Definition: TSystem.h:48
@ kWritePermission
Definition: TSystem.h:47
Bool_t R_ISREG(Int_t mode)
Definition: TSystem.h:119
Bool_t R_ISLNK(Int_t mode)
Definition: TSystem.h:120
ELogFacility
Definition: TSystem.h:67
@ kLogLocal2
Definition: TSystem.h:70
@ kLogLocal6
Definition: TSystem.h:74
@ kLogLocal4
Definition: TSystem.h:72
@ kLogLocal5
Definition: TSystem.h:73
@ kLogLocal0
Definition: TSystem.h:68
@ kLogLocal3
Definition: TSystem.h:71
@ kLogLocal1
Definition: TSystem.h:69
@ kLogLocal7
Definition: TSystem.h:75
ELogLevel
Definition: TSystem.h:56
@ kLogWarning
Definition: TSystem.h:61
@ kLogEmerg
Definition: TSystem.h:57
@ kLogAlert
Definition: TSystem.h:58
@ kLogNotice
Definition: TSystem.h:62
@ kLogInfo
Definition: TSystem.h:63
@ kLogCrit
Definition: TSystem.h:59
@ kLogErr
Definition: TSystem.h:60
@ kLogDebug
Definition: TSystem.h:64
Bool_t R_ISDIR(Int_t mode)
Definition: TSystem.h:116
R__EXTERN TSystem * gSystem
Definition: TSystem.h:540
EFpeMask
Definition: TSystem.h:78
@ kDivByZero
Definition: TSystem.h:81
@ kInexact
Definition: TSystem.h:84
@ kNoneMask
Definition: TSystem.h:79
@ kInvalid
Definition: TSystem.h:80
@ kUnderflow
Definition: TSystem.h:83
@ kOverflow
Definition: TSystem.h:82
@ kAllMask
Definition: TSystem.h:86
@ kDefaultMask
Definition: TSystem.h:85
R__EXTERN TFileHandler * gXDisplay
Definition: TSystem.h:541
R__EXTERN const char * gProgPath
Definition: TSystem.h:225
ELogOption
Definition: TSystem.h:51
@ kLogPid
Definition: TSystem.h:52
@ kLogCons
Definition: TSystem.h:53
Bool_t R_ISCHR(Int_t mode)
Definition: TSystem.h:117
EFileModeMask
Definition: TSystem.h:89
@ kS_IRWXG
Definition: TSystem.h:106
@ kS_IRGRP
Definition: TSystem.h:107
@ kS_IWUSR
Definition: TSystem.h:104
@ kS_IFDIR
Definition: TSystem.h:96
@ kS_ISUID
Definition: TSystem.h:99
@ kS_IFCHR
Definition: TSystem.h:97
@ kS_IRUSR
Definition: TSystem.h:103
@ kS_IXOTH
Definition: TSystem.h:113
@ kS_ISGID
Definition: TSystem.h:100
@ kS_IROTH
Definition: TSystem.h:111
@ kS_IFMT
Definition: TSystem.h:90
@ kS_IWGRP
Definition: TSystem.h:108
@ kS_IXUSR
Definition: TSystem.h:105
@ kS_IFBLK
Definition: TSystem.h:95
@ kS_ISVTX
Definition: TSystem.h:101
@ kS_IFSOCK
Definition: TSystem.h:91
@ kS_IFOFF
Definition: TSystem.h:93
@ kS_IFREG
Definition: TSystem.h:94
@ kS_IRWXU
Definition: TSystem.h:102
@ kS_IWOTH
Definition: TSystem.h:112
@ kS_IRWXO
Definition: TSystem.h:110
@ kS_IFIFO
Definition: TSystem.h:98
@ kS_IXGRP
Definition: TSystem.h:109
@ kS_IFLNK
Definition: TSystem.h:92
const char * proto
Definition: civetweb.c:16604
This class represents an Internet Protocol (IP) address.
Definition: TInetAddress.h:36
A doubly linked list.
Definition: TList.h:44
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Mother of all ROOT objects.
Definition: TObject.h:37
TProcessEventTimer(Long_t delay)
Create async event processor timer. Delay is in milliseconds.
Definition: TSystem.cxx:75
Bool_t Notify()
Notify when timer times out.
Definition: TSystem.h:242
Bool_t ProcessEvents()
Process events if timer did time out.
Definition: TSystem.cxx:86
Sequenceable collection abstract base class.
Basic string class.
Definition: TString.h:131
Abstract base class defining a generic interface to the underlying Operating System.
Definition: TSystem.h:248
TString fListPaths
Definition: TSystem.h:291
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
Definition: TSystem.cxx:320
virtual const char * GetBuildNode() const
Return the build node name.
Definition: TSystem.cxx:3828
virtual int Umask(Int_t mask)
Set the process file creation mode mask.
Definition: TSystem.cxx:1505
virtual int SendBuf(int sock, const void *buffer, int length)
Send a buffer headed by a length indicator.
Definition: TSystem.cxx:2470
virtual int GetServiceByName(const char *service)
Get port # of internet service.
Definition: TSystem.cxx:2361
virtual void Unload(const char *module)
Unload a shared library.
Definition: TSystem.cxx:2052
virtual const char * GetMakeSharedLib() const
Return the command line use to make a shared library.
Definition: TSystem.cxx:3877
virtual Bool_t ConsistentWith(const char *path, void *dirptr=0)
Check consistency of this helper with the one required by 'path' or 'dirptr'.
Definition: TSystem.cxx:811
virtual int AnnounceUdpService(int port, int backlog)
Announce UDP service.
Definition: TSystem.cxx:2397
Bool_t fInControl
Definition: TSystem.h:272
TSeqCollection * fFileHandler
Definition: TSystem.h:278
Int_t fAclicProperties
Definition: TSystem.h:300
Int_t fMaxrfd
Definition: TSystem.h:263
virtual Int_t GetGid(const char *group=0)
Returns the group's id. If group = 0, returns current user's group.
Definition: TSystem.cxx:1568
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
Definition: TSystem.cxx:563
TString & GetLastErrorString()
Return the thread local storage for the custom last error message.
Definition: TSystem.cxx:2110
virtual void AddLinkedLibs(const char *linkedLib)
Add linkedLib to already set linked libs.
Definition: TSystem.cxx:4072
virtual TSeqCollection * GetListOfTimers() const
Definition: TSystem.h:375
virtual const char * GetBuildCompilerVersion() const
Return the build compiler version.
Definition: TSystem.cxx:3820
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:585
Bool_t cd(const char *path)
Definition: TSystem.h:404
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
Definition: TSystem.cxx:2352
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:1462
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
Definition: TSystem.cxx:2044
virtual const char * GetLinkedLibs() const
Return the list of library linked to this executable.
Definition: TSystem.cxx:3905
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:333
Bool_t fInsideNotify
Definition: TSystem.h:268
Bool_t InControl() const
Definition: TSystem.h:349
Int_t fBeepDuration
Definition: TSystem.h:270
virtual void IgnoreInterrupt(Bool_t ignore=kTRUE)
If ignore is true ignore the interrupt signal, else restore previous behaviour.
Definition: TSystem.cxx:611
virtual void Syslog(ELogLevel level, const char *mess)
Send mess to syslog daemon.
Definition: TSystem.cxx:1673
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
Definition: TSystem.cxx:1358
virtual void SetAclicMode(EAclicMode mode)
AclicMode indicates whether the library should be built in debug mode or optimized.
Definition: TSystem.cxx:3984
static void ResetErrno()
Static function resetting system error number.
Definition: TSystem.cxx:285
virtual UInt_t LoadAllLibraries()
Load all libraries known to ROOT via the rootmap system.
Definition: TSystem.cxx:1970
TSystem(const TSystem &)
virtual void * GetDirPtr() const
Definition: TSystem.h:397
virtual void SetObjExt(const char *objExt)
Set object files extension, should be either .o, .obj, etc.
Definition: TSystem.cxx:4146
virtual void SetLinkdefSuffix(const char *suffix)
The 'suffix' will be appended to the name of a script loaded by ACLiC and used to locate any eventual...
Definition: TSystem.cxx:4129
TSeqCollection * fHelpers
Definition: TSystem.h:302
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
Definition: TSystem.cxx:1264
virtual TSeqCollection * GetListOfStdExceptionHandlers() const
Definition: TSystem.h:367
const char * pwd()
Definition: TSystem.h:405
virtual const char * GetBuildDir() const
Return the path of the build directory.
Definition: TSystem.cxx:3836
virtual void Openlog(const char *name, Int_t options, ELogFacility facility)
Open connection to system log daemon.
Definition: TSystem.cxx:1664
static Int_t GetErrno()
Static function returning system error number.
Definition: TSystem.cxx:269
virtual void AddIncludePath(const char *includePath)
Add includePath to the already set include path.
Definition: TSystem.cxx:4061
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:1496
virtual Int_t GetEffectiveGid()
Returns the effective group id.
Definition: TSystem.cxx:1578
EAclicMode
Definition: TSystem.h:251
@ kDefault
Definition: TSystem.h:251
@ kDebug
Definition: TSystem.h:251
@ kOpt
Definition: TSystem.h:251
virtual ~TSystem()
Delete the OS interface.
Definition: TSystem.cxx:147
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
Definition: TSystem.cxx:240
TFdSet * fReadmask
Definition: TSystem.h:257
TString fWdpath
Definition: TSystem.h:266
virtual std::string GetHomeDirectory(const char *userName=0) const
Return the user's home directory.
Definition: TSystem.cxx:902
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
Definition: TSystem.cxx:1013
virtual void FreeDirectory(void *dirp)
Free a directory.
Definition: TSystem.cxx:852
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:3972
void RemoveOnExit(TObject *obj)
Objects that should be deleted on exit of the OS interface.
Definition: TSystem.cxx:301
TSeqCollection * fStdExceptionHandler
Definition: TSystem.h:279
virtual char * GetServiceByPort(int port)
Get name of internet service.
Definition: TSystem.cxx:2370
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
Definition: TSystem.cxx:843
virtual int GetPid()
Get process id.
Definition: TSystem.cxx:716
virtual int RecvBuf(int sock, void *buffer, int length)
Receive a buffer headed by a length indicator.
Definition: TSystem.cxx:2461
TString fHostname
Definition: TSystem.h:267
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
Definition: TSystem.cxx:1331
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:503
virtual int SetSockOpt(int sock, int kind, int val)
Set socket option.
Definition: TSystem.cxx:2479
virtual const char * Getenv(const char *env)
Get environment variable.
Definition: TSystem.cxx:1652
virtual TStdExceptionHandler * RemoveStdExceptionHandler(TStdExceptionHandler *eh)
Remove an exception handler from list of exception handlers.
Definition: TSystem.cxx:630
virtual const char * GetIncludePath()
Get the list of include path.
Definition: TSystem.cxx:3894
virtual int AcceptConnection(int sock)
Accept a connection.
Definition: TSystem.cxx:2424
virtual Int_t GetAclicProperties() const
Return the ACLiC properties field.
Definition: TSystem.cxx:3796
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form:
Definition: TSystem.cxx:4160
TFdSet * fWritemask
Files that should be checked for read events.
Definition: TSystem.h:258
TString fListLibs
Definition: TSystem.h:282
virtual void ResetTimer(TTimer *)
Definition: TSystem.h:378
TFdSet * fSignals
Files with writes waiting.
Definition: TSystem.h:261
virtual void ShowOutput(RedirectHandle_t *h)
Display the content associated with the redirection described by the opaque handle 'h'.
Definition: TSystem.cxx:1712
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
Definition: TSystem.cxx:1061
virtual UserGroup_t * GetGroupInfo(Int_t gid)
Returns all group info in the UserGroup_t structure.
Definition: TSystem.cxx:1612
virtual void CleanCompiledMacros()
Remove the shared libs produced by the CompileMacro() function.
Definition: TSystem.cxx:4245
virtual Bool_t IsPathLocal(const char *path)
Returns TRUE if the url in 'path' points to the local file system.
Definition: TSystem.cxx:1295
TString fMakeExe
Definition: TSystem.h:298
virtual const char * FindFile(const char *search, TString &file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1526
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
Definition: TSystem.cxx:913
void GetBeepDefaults(Int_t &freq, Int_t &duration) const
Definition: TSystem.h:342
virtual int MakeDirectory(const char *name)
Make a directory.
Definition: TSystem.cxx:834
virtual const char * ExpandFileName(const char *fname)
Expand a pathname getting rid of special shell characters like ~.
Definition: TSystem.cxx:1088
EAclicMode fAclicMode
Definition: TSystem.h:296
virtual TInetAddress GetPeerName(int sock)
Get Internet Protocol (IP) address of remote host and port #.
Definition: TSystem.cxx:2343
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
Definition: TSystem.cxx:472
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition: TSystem.cxx:662
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:2501
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
Definition: TSystem.cxx:894
TString fFlagsOpt
Definition: TSystem.h:290
virtual int GetMemInfo(MemInfo_t *info) const
Returns ram and swap memory usage info into the MemInfo_t structure.
Definition: TSystem.cxx:2522
virtual EAclicMode GetAclicMode() const
AclicMode indicates whether the library should be built in debug mode or optimized.
Definition: TSystem.cxx:3868
virtual const char * GetLinkedLibraries()
Get list of shared libraries loaded at the start of the executable.
Definition: TSystem.cxx:2128
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:4096
virtual TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
Definition: TSystem.cxx:573
TString fLinkedLibs
Definition: TSystem.h:293
Int_t fSigcnt
Definition: TSystem.h:265
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition: TSystem.cxx:1843
virtual void ListSymbols(const char *module, const char *re="")
List symbols in a shared library.
Definition: TSystem.cxx:2064
virtual void DoBeep(Int_t=-1, Int_t=-1) const
Definition: TSystem.h:313
TString fObjExt
Definition: TSystem.h:295
TString fLinkdefSuffix
Definition: TSystem.h:299
Int_t fBeepFreq
Definition: TSystem.h:269
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:2512
virtual Bool_t IsFileInIncludePath(const char *name, char **fullpath=0)
Return true if 'name' is a file that can be found in the ROOT include path or the current directory.
Definition: TSystem.cxx:973
EAclicProperties
Definition: TSystem.h:252
@ kFlatBuildDir
Definition: TSystem.h:253
virtual TSeqCollection * GetListOfFileHandlers() const
Definition: TSystem.h:364
virtual void ListLibraries(const char *regexp="")
List all loaded shared libraries.
Definition: TSystem.cxx:2073
virtual FILE * OpenPipe(const char *command, const char *mode)
Open a pipe.
Definition: TSystem.cxx:671
virtual void SetMakeSharedLib(const char *directives)
Directives should contain the description on how to compile and link a shared lib.
Definition: TSystem.cxx:4052
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:1388
virtual void InnerLoop()
Inner event loop.
Definition: TSystem.cxx:409
virtual TList * GetVolumes(Option_t *) const
Definition: TSystem.h:435
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
Definition: TSystem.cxx:1071
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:1286
virtual int OpenConnection(const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp")
Open a connection to another host.
Definition: TSystem.cxx:2379
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
Definition: TSystem.cxx:860
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
Definition: TSystem.cxx:602
virtual void Run()
System event loop.
Definition: TSystem.cxx:352
virtual int GetSockOpt(int sock, int kind, int *val)
Get socket option.
Definition: TSystem.cxx:2488
virtual void ExitLoop()
Exit from event loop.
Definition: TSystem.cxx:401
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
Definition: TSystem.cxx:869
virtual int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize=-1)
Announce TCP/IP service.
Definition: TSystem.cxx:2388
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
Definition: TSystem.cxx:1053
virtual int RecvRaw(int sock, void *buffer, int length, int flag)
Receive exactly length bytes into buffer.
Definition: TSystem.cxx:2442
virtual Bool_t Init()
Initialize the OS interface.
Definition: TSystem.cxx:191
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
Definition: TSystem.cxx:480
virtual FILE * TempFileName(TString &base, const char *dir=0)
Create a secure temporary file by appending a unique 6 letter string to base.
Definition: TSystem.cxx:1487
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
Definition: TSystem.cxx:2532
TFdSet * fWriteready
Files with reads waiting.
Definition: TSystem.h:260
virtual void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event.
Definition: TSystem.cxx:438
virtual int Rename(const char *from, const char *to)
Rename a file.
Definition: TSystem.cxx:1340
virtual int ClosePipe(FILE *pipe)
Close the pipe.
Definition: TSystem.cxx:680
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Definition: TSystem.cxx:941
TString fBuildArch
Definition: TSystem.h:284
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
Definition: TSystem.cxx:541
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
Definition: TSystem.cxx:1782
TSeqCollection * fSignalHandler
Definition: TSystem.h:277
virtual const char * GetMakeExe() const
Return the command line use to make an executable.
Definition: TSystem.cxx:3886
virtual const char * FindDynamicLibrary(TString &lib, Bool_t quiet=kFALSE)
Find a dynamic library using the system search paths.
Definition: TSystem.cxx:2034
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:3963
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
Definition: TSystem.cxx:725
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:4000
TFdSet * fReadready
Files that should be checked for write events.
Definition: TSystem.h:259
TSeqCollection * fCompiled
Definition: TSystem.h:301
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
Definition: TSystem.cxx:689
TString fBuildCompilerVersion
Definition: TSystem.h:286
virtual const char * GetFlagsDebug() const
Return the debug flags.
Definition: TSystem.cxx:3848
virtual const char * HostName()
Return the system's host name.
Definition: TSystem.cxx:312
Bool_t fDone
Definition: TSystem.h:273
TSystem * FindHelper(const char *path, void *dirptr=0)
Create helper TSystem to handle file and directory operations that might be special for remote file a...
Definition: TSystem.cxx:753
Int_t fNfd
Signals that were trapped.
Definition: TSystem.h:262
virtual void Unsetenv(const char *name)
Unset environment variable.
Definition: TSystem.cxx:1644
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
Definition: TSystem.cxx:958
static const char * StripOffProto(const char *path, const char *proto)
Definition: TSystem.h:315
virtual void AddDynamicPath(const char *pathname)
Add a new directory to the dynamic path.
Definition: TSystem.cxx:1774
virtual Int_t Select(TList *active, Long_t timeout)
Select on active file descriptors (called by TMonitor).
Definition: TSystem.cxx:454
TSeqCollection * fOnExitList
Definition: TSystem.h:280
virtual const char * GetObjExt() const
Get the object file extension.
Definition: TSystem.cxx:3934
virtual int AnnounceUnixService(int port, int backlog)
Announce unix domain service.
Definition: TSystem.cxx:2406
TString fIncludePath
Definition: TSystem.h:292
virtual Int_t GetEffectiveUid()
Returns the effective user id.
Definition: TSystem.cxx:1559
TString fFlagsDebug
Definition: TSystem.h:289
virtual const char * GetLinkdefSuffix() const
Return the linkdef suffix chosen by the user for ACLiC.
Definition: TSystem.cxx:3914
virtual void SetDynamicPath(const char *pathname)
Set the dynamic path to a new value.
Definition: TSystem.cxx:1793
TString fMakeSharedLib
Definition: TSystem.h:297
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition: TSystem.cxx:446
Int_t fMaxwfd
Definition: TSystem.h:264
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:2873
virtual const char * WorkingDirectory()
Return working directory.
Definition: TSystem.cxx:878
virtual void AddStdExceptionHandler(TStdExceptionHandler *eh)
Add an exception handler to list of system exception handlers.
Definition: TSystem.cxx:620
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1536
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
Definition: TSystem.cxx:2334
virtual void SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
Definition: TSystem.cxx:232
virtual int SendRaw(int sock, const void *buffer, int length, int flag)
Send exactly length bytes from buffer.
Definition: TSystem.cxx:2452
virtual Int_t SetFPEMask(Int_t mask=kDefaultMask)
Set which conditions trigger a floating point exception.
Definition: TSystem.cxx:651
Int_t fLevel
Definition: TSystem.h:274
virtual const char * GetBuildCompiler() const
Return the build compiler.
Definition: TSystem.cxx:3812
virtual void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket connection.
Definition: TSystem.cxx:2433
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:2146
virtual TSeqCollection * GetListOfSignalHandlers() const
Definition: TSystem.h:361
TString fBuildDir
Definition: TSystem.h:288
void SetErrorStr(const char *errstr)
Set the system error string.
Definition: TSystem.cxx:250
virtual TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
Definition: TSystem.cxx:551
virtual void SetSoExt(const char *soExt)
Set shared library extension, should be either .so, .sl, .a, .dll, etc.
Definition: TSystem.cxx:4138
virtual void Closelog()
Close connection to system log daemon.
Definition: TSystem.cxx:1681
TString fBuildCompiler
Definition: TSystem.h:285
virtual Int_t GetUid(const char *user=0)
Returns the user's id. If user = 0, returns current user's id.
Definition: TSystem.cxx:1549
virtual void Setenv(const char *name, const char *value)
Set environment variable.
Definition: TSystem.cxx:1636
virtual const char * GetBuildArch() const
Return the build architecture.
Definition: TSystem.cxx:3804
virtual int Link(const char *from, const char *to)
Create a link from file1 to file2.
Definition: TSystem.cxx:1349
virtual void SigAlarmInterruptsSyscalls(Bool_t)
Definition: TSystem.h:311
virtual void SetLinkedLibs(const char *linkedLibs)
LinkedLibs should contain the library directory and list of libraries needed to recreate the current ...
Definition: TSystem.cxx:4107
const char * GetErrorStr() const
Definition: TSystem.h:333
virtual std::string GetWorkingDirectory() const
Return working directory.
Definition: TSystem.cxx:886
TString fSoExt
Definition: TSystem.h:294
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:3952
virtual void Abort(int code=0)
Abort the application.
Definition: TSystem.cxx:733
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition: TSystem.cxx:425
virtual const char * GetSoExt() const
Get the shared library extension.
Definition: TSystem.cxx:3926
virtual int Utime(const char *file, Long_t modtime, Long_t actime)
Set the a files modification and access times.
Definition: TSystem.cxx:1515
virtual const char * GetError()
Return system error string.
Definition: TSystem.cxx:259
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
Definition: TSystem.cxx:490
virtual Int_t GetFPEMask()
Return the bitmap of conditions that trigger a floating point exception.
Definition: TSystem.cxx:641
virtual int Unlink(const char *name)
Unlink, i.e.
Definition: TSystem.cxx:1371
virtual void StackTrace()
Print a stack trace.
Definition: TSystem.cxx:741
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Definition: TSystem.cxx:1588
virtual void ResetSignals()
Reset signals handlers to previous behaviour.
Definition: TSystem.cxx:593
TString fBuildNode
Definition: TSystem.h:287
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
Definition: TSystem.cxx:1702
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Definition: TSystem.cxx:1472
TSeqCollection * fTimers
Definition: TSystem.h:276
virtual const char * GetFlagsOpt() const
Return the optimization flags.
Definition: TSystem.cxx:3856
TSystem & operator=(const TSystem &)
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
Definition: TSystem.cxx:2020
Basic time type with millisecond precision.
Definition: TTime.h:27
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
This class implements a mutex interface.
Definition: TVirtualMutex.h:34
const Int_t n
Definition: legend1.C:16
Definition: file.py:1
virtual ~CpuInfo_t()
Definition: TSystem.h:176
Float_t fIdle
Definition: TSystem.h:173
Float_t fLoad15m
Definition: TSystem.h:169
Float_t fUser
Definition: TSystem.h:170
Float_t fLoad1m
Definition: TSystem.h:167
CpuInfo_t()
Definition: TSystem.h:174
Float_t fSys
Definition: TSystem.h:171
Float_t fTotal
Definition: TSystem.h:172
Float_t fLoad5m
Definition: TSystem.h:168
Int_t fMode
Definition: TSystem.h:128
Long64_t fSize
Definition: TSystem.h:131
FileStat_t()
Definition: TSystem.h:135
Long_t fDev
Definition: TSystem.h:126
TString fUrl
Definition: TSystem.h:134
Int_t fGid
Definition: TSystem.h:130
Long_t fMtime
Definition: TSystem.h:132
Long_t fIno
Definition: TSystem.h:127
Bool_t fIsLink
Definition: TSystem.h:133
Int_t fUid
Definition: TSystem.h:129
virtual ~MemInfo_t()
Definition: TSystem.h:189
Int_t fSwapTotal
Definition: TSystem.h:184
Int_t fSwapFree
Definition: TSystem.h:186
Int_t fMemFree
Definition: TSystem.h:183
Int_t fMemUsed
Definition: TSystem.h:182
Int_t fSwapUsed
Definition: TSystem.h:185
Int_t fMemTotal
Definition: TSystem.h:181
MemInfo_t()
Definition: TSystem.h:187
Long_t fMemVirtual
Definition: TSystem.h:197
virtual ~ProcInfo_t()
Definition: TSystem.cxx:69
Float_t fCpuSys
Definition: TSystem.h:195
Long_t fMemResident
Definition: TSystem.h:196
ProcInfo_t()
Definition: TSystem.h:198
Float_t fCpuUser
Definition: TSystem.h:194
TString fStdErrTty
Definition: TSystem.h:207
Int_t fStdOutDup
Definition: TSystem.h:208
Int_t fReadOffSet
Definition: TSystem.h:210
RedirectHandle_t(const char *n=0)
Definition: TSystem.h:211
TString fFile
Definition: TSystem.h:205
void Reset()
Definition: TSystem.h:213
Int_t fStdErrDup
Definition: TSystem.h:209
TString fStdOutTty
Definition: TSystem.h:206
SysInfo_t()
Definition: TSystem.h:160
Int_t fCpuSpeed
Definition: TSystem.h:156
Int_t fL2Cache
Definition: TSystem.h:158
Int_t fBusSpeed
Definition: TSystem.h:157
TString fCpuType
Definition: TSystem.h:154
Int_t fCpus
Definition: TSystem.h:155
Int_t fPhysRam
Definition: TSystem.h:159
TString fOS
Definition: TSystem.h:152
TString fModel
Definition: TSystem.h:153
virtual ~SysInfo_t()
Definition: TSystem.h:162
Int_t fGid
Definition: TSystem.h:141
TString fRealName
Definition: TSystem.h:145
TString fShell
Definition: TSystem.h:146
TString fPasswd
Definition: TSystem.h:144
TString fUser
Definition: TSystem.h:142
TString fGroup
Definition: TSystem.h:143
Int_t fUid
Definition: TSystem.h:140
UserGroup_t()
Definition: TSystem.h:147