ROOT  6.06/08
Reference Guide
Macros | Typedefs | Functions | Variables
TWinNTSystem.cxx File Reference
#include "Windows4Root.h"
#include "TWinNTSystem.h"
#include "TROOT.h"
#include "TError.h"
#include "TOrdCollection.h"
#include "TRegexp.h"
#include "TException.h"
#include "TEnv.h"
#include "TSocket.h"
#include "TApplication.h"
#include "TWin32SplashThread.h"
#include "Win32Constants.h"
#include "TInterpreter.h"
#include "TObjString.h"
#include "TVirtualX.h"
#include "TUrl.h"
#include <sys/utime.h>
#include <sys/timeb.h>
#include <process.h>
#include <io.h>
#include <direct.h>
#include <ctype.h>
#include <float.h>
#include <sys/stat.h>
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <lm.h>
#include <dbghelp.h>
#include <Tlhelp32.h>
#include <sstream>
#include <iostream>
#include <list>
#include <shlobj.h>
#include <conio.h>
+ Include dependency graph for TWinNTSystem.cxx:

Go to the source code of this file.

Macros

#define isin(address, start, length)   ((address)>=(start) && (address)<(start)+(length))
 
#define SystemBasicInformation   0
 
#define SystemPerformanceInformation   2
 
#define Li2Double(x)   ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))
 
#define BUFSIZE   80
 
#define SM_SERVERR2   89
 

Typedefs

typedef struct _PROCESS_MEMORY_COUNTERS PROCESS_MEMORY_COUNTERS
 
typedef struct _PROCESS_MEMORY_COUNTERS * PPROCESS_MEMORY_COUNTERS
 
typedef LONG(WINAPI * PROCNTQSI) (UINT, PVOID, ULONG, PULONG)
 
typedef void(WINAPI * PGNSI) (LPSYSTEM_INFO)
 

Functions

static void __cpuid (int *cpuid_data, int)
 
__int64 __rdtsc ()
 
void Gl_setwidth (int width)
 
void_ReturnAddress (void)
 
__inline BOOL DBL_BSLASH (LPCTSTR psz)
 Inline function to check for a double-backslash at the beginning of a string. More...
 
BOOL PathIsUNC (LPCTSTR pszPath)
 Returns TRUE if the given string is a UNC path. More...
 
BOOL PathIsRoot (LPCTSTR pPath)
 check if a path is a root More...
 
static DWORD GetCPUSpeed ()
 Calculate the CPU clock speed using the 'rdtsc' instruction. More...
 
static char * GetWindowsVersion ()
 
static int GetL2CacheSize ()
 Use assembly to retrieve the L2 cache information ... More...
 
static void GetWinNTSysInfo (SysInfo_t *sysinfo)
 Get system info for Windows NT. More...
 
static void GetWinNTCpuInfo (CpuInfo_t *cpuinfo, Int_t sampleTime)
 Get CPU stat for Window. More...
 
static void GetWinNTMemInfo (MemInfo_t *meminfo)
 Get VM stat for Windows NT. More...
 
static void GetWinNTProcInfo (ProcInfo_t *procinfo)
 Get process info for this process on Windows NT. More...
 

Variables

ULong_t gConsoleWindow = 0
 
const TCHAR c_szColonSlash [] = TEXT(":\\")
 
static char * shellMeta = "~*[]{}?$%"
 
static char * shellStuff = "(){}<>\"'"
 
static char shellEscape = '\\'
 
const Double_t gTicks = 1.0e-7
 

Macro Definition Documentation

§ BUFSIZE

#define BUFSIZE   80

Definition at line 5489 of file TWinNTSystem.cxx.

Referenced by GetWindowsVersion().

§ isin

#define isin (   address,
  start,
  length 
)    ((address)>=(start) && (address)<(start)+(length))

§ Li2Double

#define Li2Double (   x)    ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))

Definition at line 5457 of file TWinNTSystem.cxx.

Referenced by GetWinNTCpuInfo().

§ SM_SERVERR2

#define SM_SERVERR2   89

Definition at line 5490 of file TWinNTSystem.cxx.

Referenced by GetWindowsVersion().

§ SystemBasicInformation

#define SystemBasicInformation   0

Definition at line 5416 of file TWinNTSystem.cxx.

§ SystemPerformanceInformation

#define SystemPerformanceInformation   2

Definition at line 5417 of file TWinNTSystem.cxx.

Referenced by GetWinNTSysInfo().

Typedef Documentation

§ PGNSI

typedef void(WINAPI * PGNSI) (LPSYSTEM_INFO)

Definition at line 5491 of file TWinNTSystem.cxx.

§ PPROCESS_MEMORY_COUNTERS

typedef struct _PROCESS_MEMORY_COUNTERS * PPROCESS_MEMORY_COUNTERS

§ PROCESS_MEMORY_COUNTERS

typedef struct _PROCESS_MEMORY_COUNTERS PROCESS_MEMORY_COUNTERS

§ PROCNTQSI

typedef LONG(WINAPI * PROCNTQSI) (UINT, PVOID, ULONG, PULONG)

Definition at line 5455 of file TWinNTSystem.cxx.

Function Documentation

§ __cpuid()

static void __cpuid ( int *  cpuid_data,
int   
)
static

Definition at line 92 of file TWinNTSystem.cxx.

Referenced by GetL2CacheSize().

§ __rdtsc()

__int64 __rdtsc ( )

Definition at line 98 of file TWinNTSystem.cxx.

Referenced by GetCPUSpeed().

§ _ReturnAddress()

void* _ReturnAddress ( void  )

Referenced by __rdtsc().

§ DBL_BSLASH()

__inline BOOL DBL_BSLASH ( LPCTSTR  psz)

Inline function to check for a double-backslash at the beginning of a string.

Definition at line 1974 of file TWinNTSystem.cxx.

Referenced by PathIsRoot(), and PathIsUNC().

§ GetCPUSpeed()

static DWORD GetCPUSpeed ( )
static

Calculate the CPU clock speed using the 'rdtsc' instruction.

RDTSC: Read Time Stamp Counter.

Definition at line 5463 of file TWinNTSystem.cxx.

Referenced by GetWinNTSysInfo().

§ GetL2CacheSize()

static int GetL2CacheSize ( )
static

Use assembly to retrieve the L2 cache information ...

Definition at line 5720 of file TWinNTSystem.cxx.

Referenced by GetWinNTSysInfo().

§ GetWindowsVersion()

static char* GetWindowsVersion ( )
static

Definition at line 5495 of file TWinNTSystem.cxx.

Referenced by GetWinNTSysInfo().

§ GetWinNTCpuInfo()

static void GetWinNTCpuInfo ( CpuInfo_t cpuinfo,
Int_t  sampleTime 
)
static

Get CPU stat for Window.

Use sampleTime to set the interval over which the CPU load will be measured, in ms (default 1000).

Definition at line 5814 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::GetCpuInfo().

§ GetWinNTMemInfo()

static void GetWinNTMemInfo ( MemInfo_t meminfo)
static

Get VM stat for Windows NT.

Definition at line 5903 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::GetMemInfo().

§ GetWinNTProcInfo()

static void GetWinNTProcInfo ( ProcInfo_t procinfo)
static

Get process info for this process on Windows NT.

Definition at line 5932 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::GetProcInfo().

§ GetWinNTSysInfo()

static void GetWinNTSysInfo ( SysInfo_t sysinfo)
static

Get system info for Windows NT.

Definition at line 5738 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::GetSysInfo().

§ Gl_setwidth()

void Gl_setwidth ( int  width)

Referenced by __rdtsc().

§ PathIsRoot()

BOOL PathIsRoot ( LPCTSTR  pPath)

check if a path is a root

returns: TRUE for "\" "X:\" "\\foo\asdf" "\\foo\" FALSE for others

Definition at line 2009 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::OpenDirectory().

§ PathIsUNC()

BOOL PathIsUNC ( LPCTSTR  pszPath)

Returns TRUE if the given string is a UNC path.

TRUE "\\foo\bar" "\\foo" <- careful "\\" FALSE "\foo" "foo" "c:\foo"

Definition at line 1991 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::OpenDirectory().

Variable Documentation

§ c_szColonSlash

const TCHAR c_szColonSlash[] = TEXT(":\\")

Definition at line 1997 of file TWinNTSystem.cxx.

Referenced by PathIsRoot().

§ gConsoleWindow

ULong_t gConsoleWindow = 0

Definition at line 945 of file TWinNTSystem.cxx.

Referenced by __rdtsc().

§ gTicks

const Double_t gTicks = 1.0e-7

§ shellEscape

char shellEscape = '\\'
static

Definition at line 2882 of file TWinNTSystem.cxx.

§ shellMeta

char* shellMeta = "~*[]{}?$%"
static

Definition at line 2880 of file TWinNTSystem.cxx.

Referenced by TWinNTSystem::ExpandPathName().

§ shellStuff

char * shellStuff = "(){}<>\"'"
static

Definition at line 2881 of file TWinNTSystem.cxx.