FieldMapImpl Class Reference

Inheritance diagram for FieldMapImpl:

CylinderImpl GridImpl

List of all members.


Detailed Description

class FieldMapImpl -- base class for a FieldMap implementation

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

Constructor & Destructor Documentation

FieldMapImpl::FieldMapImpl (  )  [inline]

00086 { }

virtual FieldMapImpl::~FieldMapImpl (  )  [inline, virtual]

00087 { }


Member Function Documentation

virtual void FieldMapImpl::getFieldValue ( const G4double  local[4],
G4double  field[6] 
) const [pure virtual]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::getFieldValue().

virtual bool FieldMapImpl::handleCommand ( InputFile in,
BLArgumentVector argv,
BLArgumentMap namedArgs 
) [pure virtual]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::readFile().

virtual void FieldMapImpl::getBoundingPoint ( int  i,
G4double  point[4] 
) [pure virtual]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::getBoundingPoint().

virtual bool FieldMapImpl::hasB (  )  [pure virtual]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::hasB().

virtual bool FieldMapImpl::hasE (  )  [pure virtual]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::hasE().

bool FieldMapImpl::readBlock ( InputFile in,
float *  values,
int  nRows,
int  nCols,
G4double  units 
)

References InputFile::getline().

Referenced by CylinderImpl::handleCommand().

00408 {
00409         while(nRows-- > 0) {
00410                 char *line = in.getline();
00411                 if(!line) return false;
00412                 char *p=line;
00413                 for(int i=0; i<nCols; ++i) {
00414                         while(isspace(*p)) ++p;
00415                         if(*p == '\0') return false;
00416                         *values++ = strtod(p,&p) * units;
00417                         if(*p == ',') ++p;
00418                 }
00419         }
00420         return true;
00421 }

virtual bool FieldMapImpl::writeFile ( FILE *  f  )  [pure virtual]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::writeFile().


The documentation for this class was generated from the following file:
g4beamline