| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# System.h

Go to the documentation of this file.

    00001 // $Header: /local/reps/Gaudi/GaudiKernel/GaudiKernel/System.h,v 1.13 2006/11/29 18:46:30 hmd Exp $
    00002 #ifndef GAUDIKERNEL_SYSTEM_H
    00003 #define GAUDIKERNEL_SYSTEM_H
    00004
    00005 // Framework include files
    00006 #include "GaudiKernel/Kernel.h"
    00007 // STL include files
    00008 #include <string>
    00009 #include <vector>
    00010 #include <typeinfo>
    00011
    00012 #include "GaudiKernel/Timing.h"
    00013 #include "GaudiKernel/ModuleInfo.h"
    00014
    00015 #ifdef __linux
    00016 # include <pthread.h>
    00017 #ifndef __APPLE__
    00018 # include <execinfo.h>
    00019 #endif
    00020 #endif
    00021
    00030 namespace System  {
    00032   typedef void* ImageHandle;
    00034   typedef void* ProcessHandle;
    00036   typedef unsigned long (*EntryPoint)(const unsigned long iid, void** ppvObject);
    00038   typedef void* (*Creator)();
    00040   unsigned long loadDynamicLib(const std::string& name, ImageHandle* handle);
    00042   unsigned long unloadDynamicLib(ImageHandle handle);
    00044   unsigned long getProcedureByName(ImageHandle handle, const std::string& name, EntryPoint* pFunction);
    00046   unsigned long getProcedureByName(ImageHandle handle, const std::string& name, Creator* pFunction);
    00048   unsigned long getLastError();
    00050   const std::string getLastErrorString();
    00052   const std::string getErrorString(unsigned long error);
    00054   const std::string typeinfoName( const std::type_info& );
    00055   const std::string typeinfoName( const char* );
    00057   const std::string& hostName();
    00059   const std::string& osName();
    00061   const std::string& osVersion();
    00063   const std::string& machineType();
    00065   const std::string& accountName();
    00067   long numCmdLineArgs();
    00069   long argc();
    00071   const std::vector<std::string> cmdLineArgs();
    00073   char** argv();
    00075   const std::string getEnv(const char* var);
    00077   const std::vector<std::string> getEnv();
    00083   int setEnv(const std::string &name, const std::string &value, int overwrite = 1);
    00084 #ifdef __linux
    00086   typedef pthread_t ThreadHandle;
    00088   inline ThreadHandle threadSelf() { return pthread_self(); }
    00089 #else
    00091   typedef void* ThreadHandle;
    00093   inline ThreadHandle threadSelf() { return (void*)0; }
    00094 #endif
    00095   bool backTrace(void** addresses, const size_t depth);
    00096   bool getStackLevel(void* addresses, void*& addr, std::string& fnc, std::string& lib) ;
    00097 }
    00098 #endif    // SYSTEM_SYSTEM_H