SweepFile.h

Classes

SweepFile -- This class is used to navigate thru DORADE sweepfiles.
TODO: (full description)

class SweepFile

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])

Description

Synopsis

This class is used to navigate thru DORADE sweepfiles.
Used by:

Member Description

SweepFile(Tcl_Interp* interp)

constructor, typically called by Objectify runtime

int AfterConfigure(Tcl_Interp* interp)

called by Objectify runtime after any changes are made

int BeforeDelete(Tcl_Interp* interp)

called by Objectify runtime before object is deleted

~SweepFile()

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

int DumpRayHeader(char *fileName)

Dump Ray Headers to the specified file

int DumpVarHeader(char *fileName)

Dump Variable Headers to the specified file

int Parameters()

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

RayIterator& CreateIterator(void)

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.

inline int NumGates()

return the number of gates in each ray

inline int NumRays()

return the number of rays in this sweep

inline float Range(int g)

return the range in meters for the specified gate

inline int NumParams()

return the number of DORADE parameters - e.g.: SW, DZ,

int Write()

write out the modified sweepFile

const char *FileName(void)

return the current filename attached to this sweepfile

inline int AngleIndexSize()

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