SweepFile.h
Classes
- SweepFile -- This class is used to navigate thru DORADE sweepfiles.
TODO: - cellvector needs entire record read in
- need to verify O_RDWR when rays are modified
(full description)
Interface
- Public Members
- SweepFile(Tcl_Interp* interp)
- int AfterConfigure(Tcl_Interp* interp)
- int BeforeDelete(Tcl_Interp* interp)
- ~SweepFile()
- int Open(char *fileName, int oflag)
- int CopyVar(char *fileName, char *varname)
- int CopyVar(char *inFileName, char *outVarName, int format)
- int DumpRayHeader(char *fileName)
- int DumpVarHeader(char *fileName)
- int Parameters()
- int ScaleBias(char *name, double scale, double bias)
- int createVariable(char *name, char *desc, double scale, double bias, long badData)
- int ScaleBias(char *name, float &scale, float &bias, long &badData)
- int Dump(int varCount ,char *varName[], char *ctlVar, short ctlValue, char *outfileName)
- RayIterator& CreateIterator(void)
- RayC &AdjacentRay(const float azimuth, const int pos)
- RayC.html#RayC">RayC &Ray(const int rotTableIndex)
- int Comment(const char *comment, int reUse = TRUE)
- inline int NumGates()
- inline int NumRays()
- inline float Range(int g)
- inline int NumParams()
- int Write()
- const char *FileName(void)
- Protected Members
- inline int AngleIndexSize()
- inline int AngleIndex(const short unsigned index)
- Private Members
- void CleanUp(int removeTemp = 0)
- void init(void)
- void *FindRec(char recName[4], char *errMsg, int &index)
- int ReadRec(char recName[4])
Synopsis
This class is used to navigate thru DORADE sweepfiles.
Used by:
Member Description
SweepFile(Tcl_Interp* interp)
constructor, typically called by Objectify runtime
called by Objectify runtime after any changes are made
called by Objectify runtime before object is deleted
destructor
int Open(char *fileName, int oflag)
open (attach) a sweepfile
int CopyVar(char *fileName, char *varname)
Copy a DORADE variable
int CopyVar(char *inFileName, char *outVarName, int format)
Copy a variable from binary data file
Dump Ray Headers to the specified file
Dump Variable Headers to the specified file
Return TCL List of DORADE Parameters
int ScaleBias(char *name, double scale, double bias)
Set Scale and Bias for variable, returns TCL_ERROR if not found
int createVariable(char *name, char *desc, double scale, double bias, long badData)
int ScaleBias(char *name, float &scale, float &bias, long &badData)
return the scale & bias for a particular parameter.
returns TRUE if named parameter found, FALSE if not found
int Dump(int varCount ,char *varName[], char *ctlVar, short ctlValue, char *outfileName)
For gates having the "ctlValue" for "ctlVar",
Dump the specified variables into the output file.
Returns: TRUE all variables exist and the output file is written.
or FALSE on error
create a RayIterator object so the caller can process all rays
returns reference to RayIterator object
RayC &AdjacentRay(const float azimuth, const int pos)
Returns the neighboring RayC in the specified direction.
RayC.html#RayC">RayC &Ray(const int rotTableIndex)
return the Ray for the requested rot_table_entry index
int Comment(const char *comment, int reUse = TRUE)
add a DORADE comment to this sweepfile
if reUse == TRUE and the prefix before ':' is the same
as an existing comment, re-use the comment record.
return the number of gates in each ray
return the number of rays in this sweep
inline float Range(int g)
return the range in meters for the specified gate
return the number of DORADE parameters - e.g.: SW, DZ,
write out the modified sweepFile
const char *FileName(void)
return the current filename attached to this sweepfile
returns the size of the Rotation Angle Table
inline int AngleIndex(const short unsigned index)
void CleanUp(int removeTemp = 0)
Frees up all storage allocated for a particular sweep file.
NOTE - does NOT write back changes, which is done by the
'Write()' method
void init(void)
internal object initialization routine
void *FindRec(char recName[4], char *errMsg, int &index)
finds a DORADE record with the given name
RETURNS: pointer from recPtr array if successful, NULL if not
int ReadRec(char recName[4])
reads the next DORADE header record, returns the name.
returns ERROR on file errors, or record pointers array is full