#include <G4LatticeReader.hh>
Definition at line 43 of file G4LatticeReader.hh.
G4LatticeReader::G4LatticeReader |
( |
G4int |
vb = 0 | ) |
|
Definition at line 55 of file G4LatticeReader.cc.
56 : verboseLevel(vb), psLatfile(0), pLattice(0), fMapPath(
""),
57 fToken(
""), fValue(0.), fMap(
""), fsPol(
""), fPol(-1), fNX(0), fNY(0) {;}
G4LatticeReader::~G4LatticeReader |
( |
| ) |
|
void G4LatticeReader::CloseFile |
( |
| ) |
|
|
protected |
Definition at line 66 of file G4LatticeReader.cc.
67 if (verboseLevel)
G4cout <<
"G4LatticeReader " << filename <<
G4endl;
71 msg <<
"Unable to open " << filename;
72 G4Exception(
"G4LatticeReader::MakeLattice",
"Lattice001",
80 while (!psLatfile->eof()) {
87 msg <<
"Error reading lattice from " << filename;
88 G4Exception(
"G4LatticeReader::MakeLattice",
"Lattice002",
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool OpenFile(const G4String &filepath)
Definition at line 100 of file G4LatticeReader.cc.
102 G4cout <<
"G4LatticeReader::OpenFile " << filename <<
G4endl;
105 psLatfile =
new std::ifstream(filepath);
106 if (!psLatfile->good()) {
107 filepath = fDataDir +
"/" + filename;
108 psLatfile->open(filepath);
109 if (!psLatfile->good()) {
113 if (verboseLevel>1)
G4cout <<
" Found file " << filepath <<
G4endl;
117 size_t lastdir = filepath.
last(
'/');
118 if (lastdir == std::string::npos) fMapPath =
".";
119 else fMapPath = filepath(0,lastdir);
G4GLOB_DLL std::ostream G4cout
G4bool G4LatticeReader::ProcessConstants |
( |
| ) |
|
|
protected |
Definition at line 185 of file G4LatticeReader.cc.
187 *psLatfile >> beta >> gamma >>
lambda >> mu;
189 G4cout <<
" ProcessConstants " << beta <<
" " << gamma
193 return psLatfile->good();
G4GLOB_DLL std::ostream G4cout
void SetDynamicalConstants(G4double Beta, G4double Gamma, G4double Lambda, G4double Mu)
G4bool G4LatticeReader::ProcessMap |
( |
| ) |
|
|
protected |
Definition at line 232 of file G4LatticeReader.cc.
234 G4cerr <<
"G4LatticeReader: Unable to process mapfile directive." <<
G4endl;
238 return pLattice->
LoadMap(fNX, fNY, fPol, fMap);
G4bool LoadMap(G4int, G4int, G4int, G4String)
G4GLOB_DLL std::ostream G4cerr
G4bool G4LatticeReader::ProcessNMap |
( |
| ) |
|
|
protected |
Definition at line 241 of file G4LatticeReader.cc.
243 G4cerr <<
"G4LatticeReader: Unable to process mapfile directive." <<
G4endl;
247 return pLattice->
Load_NMap(fNX, fNY, fPol, fMap);
G4bool Load_NMap(G4int, G4int, G4int, G4String)
G4GLOB_DLL std::ostream G4cerr
G4bool G4LatticeReader::ProcessToken |
( |
| ) |
|
|
protected |
Definition at line 135 of file G4LatticeReader.cc.
137 *psLatfile >> fToken;
138 if (fToken.empty() || psLatfile->eof())
return true;
140 if (verboseLevel>1)
G4cout <<
" ProcessToken " << fToken <<
G4endl;
G4bool ProcessConstants()
G4GLOB_DLL std::ostream G4cout
G4bool ProcessValue(const G4String &name)
Definition at line 159 of file G4LatticeReader.cc.
160 *psLatfile >> fValue;
161 if (verboseLevel>1)
G4cout <<
" ProcessValue " << fValue <<
G4endl;
174 else if (name ==
"ldos") pLattice->
SetLDOS(fValue);
175 else if (name ==
"stdos") pLattice->
SetSTDOS(fValue);
176 else if (name ==
"ftdos") pLattice->
SetFTDOS(fValue);
178 G4cerr <<
"G4LatticeReader: Unrecognized token " << name <<
G4endl;
void SetFTDOS(G4double FTDOS)
G4GLOB_DLL std::ostream G4cout
void SetAnhDecConstant(G4double a)
void SetScatteringConstant(G4double b)
void SetLDOS(G4double LDOS)
void SetSTDOS(G4double STDOS)
G4GLOB_DLL std::ostream G4cerr
G4bool G4LatticeReader::ReadMapInfo |
( |
| ) |
|
|
protected |
Definition at line 198 of file G4LatticeReader.cc.
199 *psLatfile >> fMap >> fsPol >> fNX >> fNY;
201 G4cout <<
" ReadMapInfo " << fMap <<
" " << fsPol
202 <<
" " << fNX <<
" " << fNY <<
G4endl;
205 G4cerr <<
"G4LatticeReader: Invalid map theta dimension " << fNX <<
G4endl;
210 G4cerr <<
"G4LatticeReader: Invalid map phi dimension " << fNY <<
G4endl;
215 fMap = fMapPath +
"/" + fMap;
219 fPol = ( (fsPol==
"l") ? 0 :
224 if (fPol<0 || fPol>2) {
225 G4cerr <<
"G4LatticeReader: Invalid polarization code " << fsPol <<
G4endl;
G4GLOB_DLL std::ostream G4cout
G4GLOB_DLL std::ostream G4cerr
void G4LatticeReader::SetVerboseLevel |
( |
G4int |
vb | ) |
|
|
inline |
G4bool G4LatticeReader::SkipComments |
( |
| ) |
|
|
protected |
Definition at line 152 of file G4LatticeReader.cc.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
The documentation for this class was generated from the following files: