|
ROOT
Reference Guide |
|
Go to the documentation of this file.
236 typedef void *Func_t;
342 TSystem(
const char *
name =
"Generic",
const char *title =
"Generic System");
400 virtual Int_t Exec(
const char *shellcmd);
401 virtual FILE *
OpenPipe(
const char *command,
const char *mode);
405 virtual void Abort(
int code = 0);
418 virtual const char *
HomeDirectory(
const char *userName =
nullptr);
427 virtual const char *
BaseName(
const char *pathname);
428 virtual const char *
DirName(
const char *pathname);
439 virtual int Rename(
const char *from,
const char *to);
440 virtual int Link(
const char *from,
const char *to);
441 virtual int Symlink(
const char *from,
const char *to);
450 virtual const char *
UnixPathName(
const char *unixpathname);
466 virtual void Setenv(
const char *
name,
const char *value);
468 virtual const char *
Getenv(
const char *env);
491 virtual const char *
GetLibraries(
const char *regexp =
"",
492 const char *option =
"",
501 virtual int OpenConnection(
const char *server,
int port,
int tcpwindowsize = -1,
const char *protocol =
"tcp");
508 virtual int RecvRaw(
int sock,
void *buffer,
int length,
int flag);
509 virtual int SendRaw(
int sock,
const void *buffer,
int length,
int flag);
510 virtual int RecvBuf(
int sock,
void *buffer,
int length);
511 virtual int SendBuf(
int sock,
const void *buffer,
int length);
512 virtual int SetSockOpt(
int sock,
int kind,
int val);
513 virtual int GetSockOpt(
int sock,
int kind,
int *val);
524 virtual int CompileMacro(
const char *filename,
Option_t *opt =
"",
const char *library_name =
"",
const char *build_dir =
"",
UInt_t dirmode = 0);
540 virtual const char *
GetSoExt()
const;
546 virtual void SetMakeExe(
const char *directives);
551 virtual void SetSoExt(
const char *soExt);
552 virtual void SetObjExt(
const char *objExt);
TFdSet * fWriteready
Files with reads waiting.
virtual std::string GetHomeDirectory(const char *userName=nullptr) const
Return the user's home directory.
virtual int Link(const char *from, const char *to)
Create a link from file1 to file2.
virtual const char * FindFile(const char *search, TString &file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual int Unlink(const char *name)
Unlink, i.e.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual const char * ExpandFileName(const char *fname)
Expand a pathname getting rid of special shell characters like ~.
void RemoveOnExit(TObject *obj)
Objects that should be deleted on exit of the OS interface.
virtual const char * GetBuildNode() const
Return the build node name.
Bool_t R_ISSOCK(Int_t mode)
Int_t fNfd
Signals that were trapped.
Bool_t cd(const char *path)
virtual void Setenv(const char *name, const char *value)
Set environment variable.
virtual void * GetDirPtr() const
virtual Int_t GetAclicProperties() const
Return the ACLiC properties field.
virtual void ExitLoop()
Exit from event loop.
virtual void ShowOutput(RedirectHandle_t *h)
Display the content associated with the redirection described by the opaque handle 'h'.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual void SetSoExt(const char *soExt)
Set shared library extension, should be either .so, .sl, .a, .dll, etc.
Bool_t R_ISLNK(Int_t mode)
virtual const char * GetBuildDir() const
Return the path of the build directory.
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.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * FindDynamicLibrary(TString &lib, Bool_t quiet=kFALSE)
Find a dynamic library using the system search paths.
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
virtual void FreeDirectory(void *dirp)
Free a directory.
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual void Openlog(const char *name, Int_t options, ELogFacility facility)
Open connection to system log daemon.
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
R__EXTERN TVirtualMutex * gSystemMutex
Bool_t Notify()
Notify when timer times out.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void StackTrace()
Print a stack trace.
virtual const char * GetSoExt() const
Get the shared library extension.
virtual const char * GetFlagsDebug() const
Return the debug flags.
virtual const char * GetFlagsOpt() const
Return the optimization flags.
virtual TSeqCollection * GetListOfTimers() const
virtual void SetFlagsDebug(const char *)
FlagsDebug should contain the options to pass to the C++ compiler in order to compile the library in ...
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
virtual TInetAddress GetPeerName(int sock)
Get Internet Protocol (IP) address of remote host and port #.
virtual const char * GetLinkedLibs() const
Return the list of library linked to this executable.
Bool_t R_ISCHR(Int_t mode)
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
virtual const char * GetLibraries(const char *regexp="", const char *option="", Bool_t isRegexp=kTRUE)
Return a space separated list of loaded shared libraries.
Abstract base class defining a generic interface to the underlying Operating System.
virtual void SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
This class implements a mutex interface.
TFdSet * fWritemask
Files that should be checked for read events.
virtual const char * GetLinkdefSuffix() const
Return the linkdef suffix chosen by the user for ACLiC.
virtual const char * GetError()
Return system error string.
virtual Bool_t ConsistentWith(const char *path, void *dirptr=nullptr)
Check consistency of this helper with the one required by 'path' or 'dirptr'.
virtual int MakeDirectory(const char *name)
Make a directory.
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
const char * GetErrorStr() const
RedirectHandle_t(const char *n=nullptr)
TSeqCollection * fCompiled
virtual FILE * TempFileName(TString &base, const char *dir=nullptr)
Create a secure temporary file by appending a unique 6 letter string to base.
TFdSet * fSignals
Files with writes waiting.
virtual Long_t NextTimeOut(Bool_t mode)
Time when next timer of mode (synchronous=kTRUE or asynchronous=kFALSE) will time-out (in ms).
virtual const char * GetMakeExe() const
Return the command line use to make an executable.
virtual void AddStdExceptionHandler(TStdExceptionHandler *eh)
Add an exception handler to list of system exception handlers.
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual void SetAclicMode(EAclicMode mode)
AclicMode indicates whether the library should be built in debug mode or optimized.
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,...
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual void SetLinkedLibs(const char *linkedLibs)
LinkedLibs should contain the library directory and list of libraries needed to recreate the current ...
virtual int Utime(const char *file, Long_t modtime, Long_t actime)
Set the a files modification and access times.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual int AnnounceUdpService(int port, int backlog)
Announce UDP service.
Bool_t R_ISREG(Int_t mode)
virtual Bool_t IsPathLocal(const char *path)
Returns TRUE if the url in 'path' points to the local file system.
virtual void IgnoreInterrupt(Bool_t ignore=kTRUE)
If ignore is true ignore the interrupt signal, else restore previous behaviour.
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
virtual const char * WorkingDirectory()
Return working directory.
TSeqCollection * fFileHandler
virtual TString SplitAclicMode(const char *filename, TString &mode, TString &args, TString &io) const
This method split a filename of the form:
virtual int OpenConnection(const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp")
Open a connection to another host.
virtual char * GetServiceByPort(int port)
Get name of internet service.
TString & GetLastErrorString()
Return the thread local storage for the custom last error message.
TSeqCollection * fStdExceptionHandler
static void ResetErrno()
Static function resetting system error number.
virtual const char * GetBuildCompilerVersionStr() const
Return the build compiler version identifier string.
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...
TString fBuildCompilerVersion
virtual const char * GetIncludePath()
Get the list of include path.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
TProcessEventTimer(Long_t delay)
Create async event processor timer. Delay is in milliseconds.
TFdSet * fReadready
Files that should be checked for write events.
R__EXTERN TFileHandler * gXDisplay
TSeqCollection * fHelpers
virtual Bool_t Init()
Initialize the OS interface.
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...
static const char * StripOffProto(const char *path, const char *proto)
Strip off protocol string from specified path.
virtual void SetFlagsOpt(const char *)
FlagsOpt should contain the options to pass to the C++ compiler in order to compile the library in op...
TSystem(const TSystem &)=delete
virtual const char * GetBuildArch() const
Return the build architecture.
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...
virtual Func_t DynFindSymbol(const char *module, const char *entry)
Find specific entry point in specified library.
Handles synchronous and a-synchronous timer events.
R__EXTERN const char * gProgName
virtual int SendBuf(int sock, const void *buffer, int length)
Send a buffer headed by a length indicator.
virtual void SetDynamicPath(const char *pathname)
Set the dynamic path to a new value.
virtual const char * GetObjExt() const
Get the object file extension.
virtual void SetIncludePath(const char *includePath)
IncludePath should contain the list of compiler flags to indicate where to find user defined header f...
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".
void GetBeepDefaults(Int_t &freq, Int_t &duration) const
virtual ~TSystem()
Delete the OS interface.
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=nullptr)
Redirect standard output (stdout, stderr) to the specified file.
virtual int RecvRaw(int sock, void *buffer, int length, int flag)
Receive exactly length bytes into buffer.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
virtual int GetPid()
Get process id.
virtual TSeqCollection * GetListOfStdExceptionHandlers() const
TSeqCollection * fSignalHandler
virtual void SetObjExt(const char *objExt)
Set object files extension, should be either .o, .obj, etc.
virtual int ClosePipe(FILE *pipe)
Close the pipe.
virtual int AnnounceUnixService(int port, int backlog)
Announce unix domain service.
virtual int GetCpuInfo(CpuInfo_t *info, Int_t sampleTime=1000) const
Returns cpu load average and load info into the CpuInfo_t structure.
The TNamed class is the base class for all named ROOT classes.
virtual void InnerLoop()
Inner event loop.
virtual int RecvBuf(int sock, void *buffer, int length)
Receive a buffer headed by a length indicator.
R__EXTERN const char * gProgPath
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual int SetSockOpt(int sock, int kind, int val)
Set socket option.
Basic time type with millisecond precision.
virtual void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
virtual int Rename(const char *from, const char *to)
Rename a file.
virtual std::string GetWorkingDirectory() const
Return working directory.
virtual TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
Bool_t ProcessEvents()
Process events if timer did time out.
virtual Int_t SetFPEMask(Int_t mask=kDefaultMask)
Set which conditions trigger a floating point exception.
virtual Int_t GetEffectiveUid()
Returns the effective user id.
virtual Int_t Select(TList *active, Long_t timeout)
Select on active file descriptors (called by TMonitor).
TSeqCollection * fOnExitList
virtual UInt_t LoadAllLibraries()
Load all libraries known to ROOT via the rootmap system.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
virtual const char * HostName()
Return the system's host name.
virtual void SigAlarmInterruptsSyscalls(Bool_t)
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket connection.
virtual void AddDynamicPath(const char *pathname)
Add a new directory to the dynamic path.
virtual void CleanCompiledMacros()
Remove the shared libs produced by the CompileMacro() function.
virtual void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE)
Beep for duration milliseconds with a tone of frequency freq.
typedef void((*Func_t)())
virtual Int_t GetUid(const char *user=nullptr)
Returns the user's id. If user = 0, returns current user's id.
virtual TStdExceptionHandler * RemoveStdExceptionHandler(TStdExceptionHandler *eh)
Remove an exception handler from list of exception handlers.
virtual UserGroup_t * GetGroupInfo(Int_t gid)
Returns all group info in the UserGroup_t structure.
TString fBuildCompilerVersionStr
virtual int Umask(Int_t mask)
Set the process file creation mode mask.
virtual Int_t GetGid(const char *group=nullptr)
Returns the group's id. If group = 0, returns current user's group.
R__EXTERN TSystem * gSystem
virtual void AddLinkedLibs(const char *linkedLib)
Add linkedLib to already set linked libs.
Sequenceable collection abstract base class.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual void Syslog(ELogLevel level, const char *mess)
Send mess to syslog daemon.
TSystem & operator=(const TSystem &)=delete
virtual EAclicMode GetAclicMode() const
AclicMode indicates whether the library should be built in debug mode or optimized.
virtual const char * GetBuildCompiler() const
Return the build compiler.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
virtual void Abort(int code=0)
Abort the application.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual const char * GetMakeSharedLib() const
Return the command line use to make a shared library.
virtual void Unsetenv(const char *name)
Unset environment variable.
Bool_t R_ISDIR(Int_t mode)
virtual void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
virtual TSeqCollection * GetListOfFileHandlers() const
virtual void ResetTimer(TTimer *)
R__EXTERN const char * gRootDir
virtual void Closelog()
Close connection to system log daemon.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
Mother of all ROOT objects.
#define ClassDef(name, id)
virtual const char * GetLinkedLibraries()
Get list of shared libraries loaded at the start of the executable.
Bool_t R_ISBLK(Int_t mode)
static Int_t GetErrno()
Static function returning system error number.
virtual int GetSockOpt(int sock, int kind, int *val)
Get socket option.
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
virtual int Symlink(const char *from, const char *to)
Create a symbolic link from file1 to file2.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual Int_t GetFPEMask()
Return the bitmap of conditions that trigger a floating point exception.
virtual TSeqCollection * GetListOfSignalHandlers() const
virtual void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event.
virtual void DoBeep(Int_t=-1, Int_t=-1) const
virtual int AcceptConnection(int sock)
Accept a connection.
Bool_t R_ISFIFO(Int_t mode)
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
virtual int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize=-1)
Announce TCP/IP service.
virtual void ListLibraries(const char *regexp="")
List all loaded shared libraries.
virtual void ListSymbols(const char *module, const char *re="")
List symbols in a shared library.
virtual void SetDisplay()
Set DISPLAY environment variable based on utmp entry. Only for UNIX.
virtual void SetMakeExe(const char *directives)
Directives has the same syntax as the argument of SetMakeSharedLib but is used to create an executabl...
virtual void Run()
System event loop.
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.
This class represents an Internet Protocol (IP) address.
virtual Int_t GetEffectiveGid()
Returns the effective group id.
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
virtual void Unload(const char *module)
Unload a shared library.
virtual int GetMemInfo(MemInfo_t *info) const
Returns ram and swap memory usage info into the MemInfo_t structure.
Bool_t R_ISOFF(Int_t mode)
virtual int GetServiceByName(const char *service)
Get port # of internet service.
virtual FILE * OpenPipe(const char *command, const char *mode)
Open a pipe.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
virtual int SendRaw(int sock, const void *buffer, int length, int flag)
Send exactly length bytes from buffer.
virtual void SetMakeSharedLib(const char *directives)
Directives should contain the description on how to compile and link a shared lib.
virtual const char * GetBuildCompilerVersion() const
Return the build compiler version.
virtual void ResetSignals()
Reset signals handlers to previous behaviour.
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
void SetErrorStr(const char *errstr)
Set the system error string.
virtual Bool_t IsFileInIncludePath(const char *name, char **fullpath=nullptr)
Return true if 'name' is a file that can be found in the ROOT include path or the current directory.
virtual TList * GetVolumes(Option_t *) const
virtual void AddIncludePath(const char *includePath)
Add a directory to the already set include path.