Public Member Functions | |
FieldMapImpl () | |
virtual | ~FieldMapImpl () |
virtual void | getFieldValue (const G4double local[4], G4double field[6]) const =0 |
virtual bool | handleCommand (InputFile &in, BLArgumentVector &argv, BLArgumentMap &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 |
virtual void FieldMapImpl::getFieldValue | ( | const G4double | local[4], | |
G4double | field[6] | |||
) | const [pure virtual] |
Implemented in GridImpl, and CylinderImpl.
Referenced by BLFieldMap::getFieldValue(), and BLFieldMap::getFieldValueNoTimeNoScale().
virtual bool FieldMapImpl::handleCommand | ( | InputFile & | in, | |
BLArgumentVector & | argv, | |||
BLArgumentMap & | namedArgs | |||
) | [pure virtual] |
virtual void FieldMapImpl::getBoundingPoint | ( | int | i, | |
G4double | point[4] | |||
) | [pure virtual] |
virtual bool FieldMapImpl::hasB | ( | ) | [pure virtual] |
virtual bool FieldMapImpl::hasE | ( | ) | [pure virtual] |
bool FieldMapImpl::readBlock | ( | InputFile & | in, | |
float * | values, | |||
int | nRows, | |||
int | nCols, | |||
G4double | units | |||
) |
References InputFile::getline().
Referenced by CylinderImpl::handleCommand().
00418 { 00419 while(nRows-- > 0) { 00420 char *line = in.getline(); 00421 if(!line) return false; 00422 char *p=line; 00423 for(int i=0; i<nCols; ++i) { 00424 while(isspace(*p)) ++p; 00425 if(*p == '\0') return false; 00426 *values++ = strtod(p,&p) * units; 00427 if(*p == ',') ++p; 00428 } 00429 } 00430 return true; 00431 }
virtual bool FieldMapImpl::writeFile | ( | FILE * | f | ) | [pure virtual] |