EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
Typedefs | Enumerations | Functions | Variables
egs_functions.h File Reference

Global egspp functions header file. More...

#include "egs_libconfig.h"
#include <iostream>
#include <string>

Go to the source code of this file.

Typedefs

typedef void(* EGS_InfoFunction )(const char *,...)
 Defines a function printf-like prototype for functions to be used to report info, warnings, or errors.
 

Enumerations

enum  EGS_InfoType { Information, Warning, Fatal }
 

Functions

bool EGS_EXPORT egsStoreI64 (ostream &data, EGS_I64 n)
 Writes the 64 bit integer n to the output stream data and returns true on success, false on failure. More...
 
bool EGS_EXPORT egsGetI64 (istream &data, EGS_I64 &n)
 Reads a 64 bit integer from the stream data and assigns it to n. Returns true on success, false on failure. More...
 
EGS_InfoFunction EGS_EXPORT egsSetInfoFunction (EGS_InfoType t, EGS_InfoFunction func)
 Set a function to be used for outputing information, warning messages or reporting fatal errors. More...
 
void EGS_EXPORT egsSetDefaultIOFunctions ()
 Reset I/O functions to their defaults.
 
string EGS_EXPORT egsSimplifyCVSKey (const string &key)
 Remove the $'s from a CVS key. More...
 
void EGS_EXPORT egsSwapBytes (int *)
 Swap the bytes of 32 bit integers.
 
void EGS_EXPORT egsSwapBytes (short *)
 Swap the bytes of 16 bit integers.
 
void EGS_EXPORT egsSwapBytes (float *)
 Swap the bytes of 32 bit reals.
 
string EGS_EXPORT egsJoinPath (const string &first, const string &second)
 Join two path variables (or a path and a file name) using the platform specific directory separator and return the result.
 
string EGS_EXPORT egsStripPath (const string &fname)
 Strip the path from a file name and return the result.
 
string EGS_EXPORT egsExpandPath (const string &fname)
 Expands first environment variable found in a file name. More...
 
string EGS_EXPORT egsHostName ()
 Get the name of the host the program is running on.
 
int EGS_EXPORT egsGetPid ()
 Get the process id.
 
int EGS_EXPORT egsGetEndian ()
 Get the endianess of the machine. More...
 
bool EGS_EXPORT egsIsAbsolutePath (const string &path)
 Does the string path represent an absolute path name?
 
bool EGS_EXPORT egsEquivStr (const string &a, const string &b)
 

Variables

const EGS_Float epsilon = 1.0/(1ULL<<50)
 The epsilon constant for floating point comparisons. More...
 
const EGS_Float distanceEpsilon = 1.0/(1ULL<<32)
 The distanceEpsilon constant for physical distance comparisons. More...
 
const EGS_I64 loopMax = 1e10
 The maximum number of iterations for near-infinite loops. More...
 
const EGS_Float veryFar = 1e30
 A very large float. More...
 
EGS_EXPORT EGS_InfoFunction egsInformation
 Always use this function for reporting the progress of a simulation and any other type of information. More...
 
EGS_EXPORT EGS_InfoFunction egsWarning
 Always use this function for reporting warnings. More...
 
EGS_EXPORT EGS_InfoFunction egsFatal
 Always use this function for reporting fatal errors. More...
 

Detailed Description

Global egspp functions header file.

Author
Iwan Kawrakow, NRC

Definition in file egs_functions.h.