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]

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().

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]

Implemented in GridImpl, and CylinderImpl.

Referenced by BLFieldMap::writeFile().


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