Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TWinNTSystem.cxx File Reference
#include "Windows4Root.h"
#include "ROOT/FoundationUtils.hxx"
#include "TWinNTSystem.h"
#include "TROOT.h"
#include "TError.h"
#include "TOrdCollection.h"
#include "TRegexp.h"
#include "TException.h"
#include "TEnv.h"
#include "TApplication.h"
#include "TBrowser.h"
#include "TWin32SplashThread.h"
#include "Win32Constants.h"
#include "TInterpreter.h"
#include "TVirtualX.h"
#include "TUrl.h"
#include "ThreadLocalStorage.h"
#include "snprintf.h"
#include "strlcpy.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 <time.h>
#include <bcrypt.h>
#include <chrono>
#include <thread>
Include dependency graph for TWinNTSystem.cxx:

Classes

struct  _PROCESS_MEMORY_COUNTERS
 
struct  FindFileData_t
 Struct used to pass information between OpenDirectory and GetDirEntry in a thread safe way (each thread creates a new instance of it). More...
 
struct  SYSTEM_BASIC_INFORMATION
 
struct  SYSTEM_PERFORMANCE_INFORMATION
 
class  TFdSet
 

Namespaces

namespace  ROOT
 tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tbb::task_arena without forward declaring tbb::interface7
 

Macros

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

Typedefs

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

Functions

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

Variables

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

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   80

Definition at line 5623 of file TWinNTSystem.cxx.

◆ 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 5591 of file TWinNTSystem.cxx.

◆ SM_SERVERR2

#define SM_SERVERR2   89

Definition at line 5624 of file TWinNTSystem.cxx.

◆ SystemBasicInformation

#define SystemBasicInformation   0

Definition at line 5550 of file TWinNTSystem.cxx.

◆ SystemPerformanceInformation

#define SystemPerformanceInformation   2

Definition at line 5551 of file TWinNTSystem.cxx.

Typedef Documentation

◆ PGNSI

typedef void(WINAPI * PGNSI) (LPSYSTEM_INFO)

Definition at line 5625 of file TWinNTSystem.cxx.

◆ PPROCESS_MEMORY_COUNTERS

◆ PROCESS_MEMORY_COUNTERS

◆ PROCNTQSI

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

Definition at line 5589 of file TWinNTSystem.cxx.

Function Documentation

◆ __cpuid()

static void __cpuid ( int cpuid_data,
int   
)
static

Definition at line 99 of file TWinNTSystem.cxx.

◆ __rdtsc()

__int64 __rdtsc ( )

Definition at line 105 of file TWinNTSystem.cxx.

◆ _ReturnAddress()

void * _ReturnAddress ( void  )

◆ 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 1998 of file TWinNTSystem.cxx.

◆ GetCPUSpeed()

static DWORD GetCPUSpeed ( )
static

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

RDTSC: Read Time Stamp Counter.

Definition at line 5597 of file TWinNTSystem.cxx.

◆ GetL2CacheSize()

static int GetL2CacheSize ( )
static

Use assembly to retrieve the L2 cache information ...

Definition at line 5854 of file TWinNTSystem.cxx.

◆ GetWindowsVersion()

static const char * GetWindowsVersion ( )
static

Definition at line 5629 of file TWinNTSystem.cxx.

◆ 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 5948 of file TWinNTSystem.cxx.

◆ GetWinNTMemInfo()

static void GetWinNTMemInfo ( MemInfo_t meminfo)
static

Get VM stat for Windows NT.

Definition at line 6037 of file TWinNTSystem.cxx.

◆ GetWinNTProcInfo()

static void GetWinNTProcInfo ( ProcInfo_t procinfo)
static

Get process info for this process on Windows NT.

Definition at line 6066 of file TWinNTSystem.cxx.

◆ GetWinNTSysInfo()

static void GetWinNTSysInfo ( SysInfo_t sysinfo)
static

Get system info for Windows NT.

Definition at line 5872 of file TWinNTSystem.cxx.

◆ Gl_setwidth()

void Gl_setwidth ( int  width)

◆ 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 2033 of file TWinNTSystem.cxx.

◆ 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 2015 of file TWinNTSystem.cxx.

Variable Documentation

◆ c_szColonSlash

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

Definition at line 2021 of file TWinNTSystem.cxx.

◆ gConsoleWindow

ULongptr_t gConsoleWindow = 0

Definition at line 960 of file TWinNTSystem.cxx.

◆ gTicks

const Double_t gTicks = 1.0e-7

Definition at line 4483 of file TWinNTSystem.cxx.

◆ shellEscape

const char shellEscape = '\\'
static

Definition at line 2935 of file TWinNTSystem.cxx.

◆ shellMeta

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

Definition at line 2933 of file TWinNTSystem.cxx.

◆ shellStuff

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

Definition at line 2934 of file TWinNTSystem.cxx.