#include <fstream>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "G4ElectroMagneticField.hh"
#include "MyBLFieldMap.hh"
#include "MyBLFuncs.hh"
#include "BTSpline1D.hh"
Go to the source code of this file.
Classes | |
class | InputFile |
class | FieldMapImpl |
class | GridImpl |
class | CylinderImpl |
class | TimeImpl |
Defines | |
#define | COMPONENT(C) |
Functions | |
static void | argDouble (G4double &var, const char *name, MyBLArgumentMap &namedArgs) |
argDouble handles an argument with a value of G4double | |
static void | argInt (G4int &var, const char *name, MyBLArgumentMap &namedArgs) |
argInt handles an argument with a value of G4int | |
static G4String | d2string (G4double v) |
d2string converts a double to a G4String | |
static G4String | i2string (int v) |
i2string converts an int to a G4String |
#define COMPONENT | ( | C | ) |
G4double C = 0.0; \
if(map##C) C = map##C[m]*f0 + map##C[m+1]*f1 + \
map##C[m+nX]*f2 + map##C[m+nX+1]*f3 + \
map##C[m+nY*nX]*f4 + map##C[m+nY*nX+1]*f5 + \
map##C[m+nY*nX+nX]*f6 + map##C[m+nY*nX+nX+1]*f7;
Referenced by GridImpl::getFieldValue().
static void argDouble | ( | G4double & | var, | |
const char * | name, | |||
MyBLArgumentMap & | namedArgs | |||
) | [static] |
argDouble handles an argument with a value of G4double
Definition at line 221 of file MyBLFieldMap.cc.
Referenced by CylinderImpl::CylinderImpl(), GridImpl::GridImpl(), MyBLFieldMap::readFile(), and TimeImpl::readTime().
00221 { 00222 if(namedArgs.count(name) == 0) return; 00223 char *q; 00224 const char *p=namedArgs[name].c_str(); 00225 G4double v = strtod(p,&q); 00226 if(p == q || *q != '\0') { 00227 G4cerr << "Invalid value for "<< name<<" in MyBLFieldMap" 00228 << G4endl; 00229 00230 return; 00231 } 00232 var = v; 00233 }
static void argInt | ( | G4int & | var, | |
const char * | name, | |||
MyBLArgumentMap & | namedArgs | |||
) | [static] |
argInt handles an argument with a value of G4int
Definition at line 237 of file MyBLFieldMap.cc.
Referenced by CylinderImpl::CylinderImpl(), GridImpl::GridImpl(), and MyBLFieldMap::readFile().
00237 { 00238 if(namedArgs.count(name) == 0) return; 00239 char *q; 00240 const char *p=namedArgs[name].c_str(); 00241 G4int v = strtol(p,&q,0); 00242 if(p == q || *q != '\0') { 00243 G4cerr << "Invalid value for "<< name<<" in MyBLFieldMap" 00244 << G4endl; 00245 return; 00246 } 00247 var = v; 00248 }
static G4String d2string | ( | G4double | v | ) | [static] |
d2string converts a double to a G4String
Definition at line 252 of file MyBLFieldMap.cc.
Referenced by MyBLFieldMap::createCylinderMap(), and MyBLFieldMap::createGridMap().
static G4String i2string | ( | int | v | ) | [static] |
i2string converts an int to a G4String
Definition at line 260 of file MyBLFieldMap.cc.
Referenced by MyBLFieldMap::createCylinderMap(), and MyBLFieldMap::createGridMap().