Public Member Functions | |
FieldMapImpl () | |
virtual | ~FieldMapImpl () |
virtual void | getFieldValue (const G4double local[4], G4double field[6]) const =0 |
virtual bool | handleCommand (InputFile &in, MyBLArgumentVector &argv, MyBLArgumentMap &namedArgs)=0 |
virtual void | getBoundingPoint (int i, G4double point[4])=0 |
virtual bool | hasB ()=0 |
virtual bool | hasE ()=0 |
bool | readBlock (InputFile &in, float *values, int nRows, int nCols, G4double units) |
virtual bool | writeFile (FILE *f)=0 |
class FieldMapImpl -- base class for a FieldMap implementation
Definition at line 87 of file MyBLFieldMap.cc.
FieldMapImpl::FieldMapImpl | ( | ) | [inline] |
Definition at line 89 of file MyBLFieldMap.cc.
virtual FieldMapImpl::~FieldMapImpl | ( | ) | [inline, virtual] |
Definition at line 90 of file MyBLFieldMap.cc.
virtual void FieldMapImpl::getBoundingPoint | ( | int | i, | |
G4double | point[4] | |||
) | [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by MyBLFieldMap::getBoundingPoint().
virtual void FieldMapImpl::getFieldValue | ( | const G4double | local[4], | |
G4double | field[6] | |||
) | const [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by MyBLFieldMap::getFieldValue().
virtual bool FieldMapImpl::handleCommand | ( | InputFile & | in, | |
MyBLArgumentVector & | argv, | |||
MyBLArgumentMap & | namedArgs | |||
) | [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by MyBLFieldMap::readFile().
virtual bool FieldMapImpl::hasB | ( | ) | [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by MyBLFieldMap::hasB().
virtual bool FieldMapImpl::hasE | ( | ) | [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by MyBLFieldMap::hasE().
bool FieldMapImpl::readBlock | ( | InputFile & | in, | |
float * | values, | |||
int | nRows, | |||
int | nCols, | |||
G4double | units | |||
) |
Definition at line 414 of file MyBLFieldMap.cc.
References InputFile::getline().
Referenced by CylinderImpl::handleCommand().
00415 { 00416 while(nRows-- > 0) { 00417 char *line = in.getline(); 00418 if(!line) return false; 00419 char *p=line; 00420 for(int i=0; i<nCols; ++i) { 00421 while(isspace(*p)) ++p; 00422 if(*p == '\0') return false; 00423 *values++ = strtod(p,&p) * units; 00424 if(*p == ',') ++p; 00425 } 00426 } 00427 return true; 00428 }
virtual bool FieldMapImpl::writeFile | ( | FILE * | f | ) | [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by MyBLFieldMap::writeFile().