VAPoR  0.1
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
VAPoR::VDFIOBase Class Referenceabstract

Abstract base class for performing data IO to a VDC. More...

#include <VDFIOBase.h>

Inheritance diagram for VAPoR::VDFIOBase:
VAPoR::MetadataVDC VAPoR::Metadata VetsUtil::MyBase VAPoR::ParsedXml VAPoR::AMRIO VAPoR::WaveCodecIO VAPoR::WaveletBlockIOBase VAPoR::DataMgrAMR VAPoR::DataMgrWC VAPoR::WaveletBlock3DReader VAPoR::WaveletBlock3DRegionReader VAPoR::WaveletBlock3DRegionWriter VAPoR::WaveletBlock3DWriter VAPoR::WaveletBlock3DBufReader VAPoR::DataMgrWB VAPoR::WaveletBlock3DBufWriter

Classes

class  BitMask
 

Public Member Functions

 VDFIOBase (const MetadataVDC &metadata)
 
 VDFIOBase (const string &metafile)
 
virtual ~VDFIOBase ()
 
double GetReadTimer () const
 
double GetSeekTimer () const
 
void SeekTimerReset ()
 
void SeekTimerStart ()
 
void SeekTimerStop ()
 
double GetWriteTimer () const
 
double GetXFormTimer () const
 
virtual int OpenVariableRead (size_t timestep, const char *varname, int reflevel=0, int lod=0)
 
virtual int BlockReadRegion (const size_t bmin[3], const size_t bmax[3], float *region, bool unblock=true)=0
 
virtual int ReadRegion (const size_t min[3], const size_t max[3], float *region)=0
 
virtual int ReadRegion (float *region)=0
 
virtual int ReadSlice (float *slice)=0
 
virtual int OpenVariableWrite (size_t timestep, const char *varname, int reflevel=0, int lod=0)
 
virtual int BlockWriteRegion (const float *region, const size_t bmin[3], const size_t bmax[3], bool block=true)=0
 
virtual int WriteRegion (const float *region, const size_t min[3], const size_t max[3])=0
 
virtual int WriteRegion (const float *region)=0
 
virtual int WriteSlice (const float *slice)=0
 
virtual int CloseVariable ()
 
virtual const float * GetDataRange () const =0
 
- Public Member Functions inherited from VAPoR::MetadataVDC
 MetadataVDC (const size_t dim[3], size_t numTransforms, const size_t bs[3], int nFilterCoef=1, int nLiftingCoef=1, int msbFirst=1, int vdfVersion=VDF_VERSION)
 
 MetadataVDC (const size_t dim[3], const size_t bs[3], const vector< size_t > &cratios, string wname, string wmode)
 
 MetadataVDC (const string &metafile)
 
 MetadataVDC (const MetadataVDC &node)
 
virtual ~MetadataVDC ()
 
int Merge (const MetadataVDC &metadata, size_t ts=0)
 
int Merge (const string &path, size_t ts=0)
 
int MakeCurrent () const
 
const string & GetParentDir () const
 
const string & GetMetafileName () const
 
const string & GetDataDirName () const
 
int ConstructFullVBase (size_t ts, const string &var, string *path) const
 
int ConstructFullAuxBase (size_t ts, string *path) const
 
int Write (const string &path, int relative_path=1)
 
virtual const size_t * GetBlockSize () const
 
virtual void GetBlockSize (size_t bs[3], int) const
 
virtual void GetGridDim (size_t dim[3]) const
 
const size_t * GetDimension () const
 
int GetFilterCoef () const
 
int GetLiftingCoef () const
 
virtual int GetNumTransforms () const
 
int GetMSBFirst () const
 
int GetVDFVersion () const
 
string GetWaveName () const
 
string GetBoundaryMode () const
 
virtual vector< size_t > GetCRatios () const
 
int GetVDCType () const
 
int SetGridType (const string &value)
 
string GetGridType () const
 
int IsValidGridType (const string &value) const
 
int SetCoordSystemType (const string &value)
 
string GetCoordSystemType () const
 
int IsValidCoordSystemType (const string &value) const
 
int SetExtents (const vector< double > &value)
 
vector< double > GetExtents (size_t ts=0) const
 
int IsValidExtents (const vector< double > &value) const
 
int SetNumTimeSteps (long value)
 
long GetNumTimeSteps () const
 
int IsValidTimeStep (long value) const
 
int SetVariableNames (const vector< string > &value)
 
int SetVariables3D (const vector< string > &value)
 
vector< string > GetVariables3D () const
 
vector< string > GetCoordinateVariables () const
 
int SetCoordinateVariables (const vector< string > &value)
 
int SetVariables2DXY (const vector< string > &value)
 
int SetVariables2DXZ (const vector< string > &value)
 
int SetVariables2DYZ (const vector< string > &value)
 
vector< string > GetVariables2DXY () const
 
vector< string > GetVariables2DXZ () const
 
vector< string > GetVariables2DYZ () const
 
int SetComment (const string &value)
 
string GetComment () const
 
int SetPeriodicBoundary (const vector< long > &value)
 
vector< long > GetPeriodicBoundary () const
 
int SetGridPermutation (const vector< long > &value)
 
int SetMissingValue (double value)
 
int SetMissingValue ()
 
vector< double > GetMissingValue () const
 
vector< long > GetGridPermutation () const
 
int SetMapProjection (const string &value)
 
virtual string GetMapProjection () const
 
int SetTSUserTime (size_t ts, const vector< double > &value)
 
double GetTSUserTime (size_t ts) const
 
int SetTSUserTimeStamp (size_t ts, const string &s)
 
void GetTSUserTimeStamp (size_t ts, string &s) const
 
string GetTSAuxBasePath (size_t ts) const
 
int HasTSUserTime (size_t ts) const
 
int IsValidUserTime (const vector< double > &value) const
 
int SetTSXCoords (size_t ts, const vector< double > &value)
 
vector< double > GetTSXCoords (size_t ts) const
 
int SetTSYCoords (size_t ts, const vector< double > &value)
 
vector< double > GetTSYCoords (size_t ts) const
 
int SetTSZCoords (size_t ts, const vector< double > &value)
 
vector< double > GetTSZCoords (size_t ts) const
 
int SetTSComment (size_t ts, const string &value)
 Set a comment for the time step indicated by ts. More...
 
string GetTSComment (size_t ts) const
 Return the comment for the indicated time step, ts, if it exists. More...
 
int SetTSExtents (size_t ts, const vector< double > &value)
 
vector< double > GetTSExtents (size_t ts) const
 
int SetTSMissingValue (size_t ts, double v)
 
vector< double > GetTSMissingValue (size_t ts) const
 Returns the time-varying missing value, if any. More...
 
int SetVComment (size_t ts, const string &var, const string &value)
 
string GetVComment (size_t ts, const string &var) const
 
string GetVBasePath (size_t ts, const string &var) const
 
int SetVBasePath (size_t ts, const string &var, const string &value)
 
int SetVDataRange (size_t ts, const string &var, const vector< double > &value)
 
vector< double > GetVDataRange (size_t ts, const string &var) const
 
int IsValidVDataRange (const vector< double > &value) const
 
int SetVMissingValue (size_t ts, const string &var, double v)
 
vector< double > GetVMissingValue (size_t ts, const string &var) const
 
vector< string > GetUserDataLongTags () const
 
int SetUserDataLong (const string &tag, const vector< long > &value)
 
vector< long > GetUserDataLong (const string &tag) const
 
vector< string > GetUserDataDoubleTags () const
 
int SetUserDataDouble (const string &tag, const vector< double > &value)
 
vector< double > GetUserDataDouble (const string &tag) const
 
vector< string > GetUserDataStringTags () const
 
int SetUserDataString (const string &tag, const string &value)
 
string GetUserDataString (const string &tag) const
 
int SetUserDataStringVec (const string &tag, const vector< string > &value)
 
vector< string > GetUserDataStringVec (const string &tag) const
 
vector< string > GetTSUserDataLongTags () const
 
int SetTSUserDataLong (size_t ts, const string &tag, const vector< long > &value)
 
vector< long > GetTSUserDataLong (size_t ts, const string &tag) const
 
int SetTSUserDataDouble (size_t ts, const string &tag, const vector< double > &value)
 
vector< double > GetTSUserDataDouble (size_t ts, const string &tag) const
 
vector< string > GetTSUserDataDoubleTags () const
 
int SetTSUserDataString (size_t ts, const string &tag, const string &value)
 
string GetTSUserDataString (size_t ts, const string &tag) const
 
vector< string > GetTSUserDataStringTags () const
 
vector< string > GetVUserDataLongTags () const
 
int SetVUserDataLong (size_t ts, const string &var, const string &tag, const vector< long > &value)
 
vector< long > GetVUserDataLong (size_t ts, const string &var, const string &tag) const
 
vector< string > GetVUserDataDoubleTags () const
 
int SetVUserDataDouble (size_t ts, const string &var, const string &tag, const vector< double > &value)
 
vector< double > GetVUserDataDouble (size_t ts, const string &var, const string &tag) const
 
int SetVUserDataString (size_t ts, const string &var, const string &tag, const string &value)
 
string GetVUserDataString (size_t ts, const string &var, const string &tag) const
 
vector< string > GetVUserDataStringTags () const
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 
- Public Member Functions inherited from VAPoR::ParsedXml
virtual ~ParsedXml ()
 
virtual bool charHandler (ExpatParseMgr *, const XML_Char *, int)
 

Protected Member Functions

void _ReadTimerReset ()
 
void _ReadTimerStart ()
 
void _ReadTimerStop ()
 
void _WriteTimerReset ()
 
void _WriteTimerStart ()
 
void _WriteTimerStop ()
 
void _XFormTimerReset ()
 
void _XFormTimerStart ()
 
void _XFormTimerStop ()
 
int _MaskOpenWrite (size_t timestep, string varname, int reflevel)
 
int _MaskOpenRead (size_t timestep, string varname, int reflevel)
 
int _MaskClose ()
 
int _MaskWrite (const float *srcblk, const size_t bmin_p[3], const size_t bmax_p[3], bool block)
 
int _MaskRead (const size_t bmin_p[3], const size_t bmax_p[3])
 
void _MaskRemove (float *blk, bool &valid_data) const
 
void _MaskReplace (size_t bx, size_t by, size_t bz, float *blk) const
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

Static Protected Member Functions

static void _UnpackCoord (VarType_T vtype, const size_t src[3], size_t dst[3], size_t fill)
 
static void _PackCoord (VarType_T vtype, const size_t src[3], size_t dst[3], size_t fill)
 
static void _FillPackedCoord (VarType_T vtype, const size_t src[3], size_t dst[3], size_t fill)
 

Additional Inherited Members

- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message. More...
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 
- Static Public Attributes inherited from VetsUtil::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 
- Static Protected Attributes inherited from VAPoR::ParsedXml
static const string _stringType
 
static const string _longType
 
static const string _doubleType
 
static const string _typeAttr
 

Detailed Description

Abstract base class for performing data IO to a VDC.

Author
John Clyne
Version
$Revision$
Date
$Date$

This class provides an API for performing low-level IO to/from a Vapor Data Collection (VDC)

Definition at line 27 of file VDFIOBase.h.

Constructor & Destructor Documentation

VAPoR::VDFIOBase::VDFIOBase ( const MetadataVDC metadata)

Constructor for the VDFIOBase class.

Parameters
[in]metadataPointer to a metadata class object for which all future class operations will apply
Note
The success or failure of this constructor can be checked with the GetErrCode() method.
See also
Metadata, GetErrCode(),
VAPoR::VDFIOBase::VDFIOBase ( const string &  metafile)

Constructor for the VDFIOBase class.

Parameters
[in]metafilePath to a metadata file for which all future class operations will apply
Note
The success or failure of this constructor can be checked with the GetErrCode() method.
See also
Metadata, GetErrCode(),
virtual VAPoR::VDFIOBase::~VDFIOBase ( )
virtual

Member Function Documentation

static void VAPoR::VDFIOBase::_FillPackedCoord ( VarType_T  vtype,
const size_t  src[3],
size_t  dst[3],
size_t  fill 
)
staticprotected
int VAPoR::VDFIOBase::_MaskClose ( )
protected
int VAPoR::VDFIOBase::_MaskOpenRead ( size_t  timestep,
string  varname,
int  reflevel 
)
protected
int VAPoR::VDFIOBase::_MaskOpenWrite ( size_t  timestep,
string  varname,
int  reflevel 
)
protected
int VAPoR::VDFIOBase::_MaskRead ( const size_t  bmin_p[3],
const size_t  bmax_p[3] 
)
protected
void VAPoR::VDFIOBase::_MaskRemove ( float *  blk,
bool &  valid_data 
) const
protected
void VAPoR::VDFIOBase::_MaskReplace ( size_t  bx,
size_t  by,
size_t  bz,
float *  blk 
) const
protected
int VAPoR::VDFIOBase::_MaskWrite ( const float *  srcblk,
const size_t  bmin_p[3],
const size_t  bmax_p[3],
bool  block 
)
protected
static void VAPoR::VDFIOBase::_PackCoord ( VarType_T  vtype,
const size_t  src[3],
size_t  dst[3],
size_t  fill 
)
staticprotected
void VAPoR::VDFIOBase::_ReadTimerReset ( )
inlineprotected

Definition at line 186 of file VDFIOBase.h.

void VAPoR::VDFIOBase::_ReadTimerStart ( )
inlineprotected

Definition at line 187 of file VDFIOBase.h.

References VetsUtil::GetTime().

void VAPoR::VDFIOBase::_ReadTimerStop ( )
inlineprotected

Definition at line 188 of file VDFIOBase.h.

References VetsUtil::GetTime().

static void VAPoR::VDFIOBase::_UnpackCoord ( VarType_T  vtype,
const size_t  src[3],
size_t  dst[3],
size_t  fill 
)
staticprotected
void VAPoR::VDFIOBase::_WriteTimerReset ( )
inlineprotected

Definition at line 190 of file VDFIOBase.h.

void VAPoR::VDFIOBase::_WriteTimerStart ( )
inlineprotected

Definition at line 191 of file VDFIOBase.h.

References VetsUtil::GetTime().

void VAPoR::VDFIOBase::_WriteTimerStop ( )
inlineprotected

Definition at line 192 of file VDFIOBase.h.

References VetsUtil::GetTime().

void VAPoR::VDFIOBase::_XFormTimerReset ( )
inlineprotected

Definition at line 194 of file VDFIOBase.h.

void VAPoR::VDFIOBase::_XFormTimerStart ( )
inlineprotected

Definition at line 195 of file VDFIOBase.h.

References VetsUtil::GetTime().

void VAPoR::VDFIOBase::_XFormTimerStop ( )
inlineprotected

Definition at line 196 of file VDFIOBase.h.

References VetsUtil::GetTime().

virtual int VAPoR::VDFIOBase::BlockReadRegion ( const size_t  bmin[3],
const size_t  bmax[3],
float *  region,
bool  unblock = true 
)
pure virtual
virtual int VAPoR::VDFIOBase::BlockWriteRegion ( const float *  region,
const size_t  bmin[3],
const size_t  bmax[3],
bool  block = true 
)
pure virtual
virtual int VAPoR::VDFIOBase::CloseVariable ( )
inlinevirtual
virtual const float* VAPoR::VDFIOBase::GetDataRange ( ) const
pure virtual
double VAPoR::VDFIOBase::GetReadTimer ( ) const
inline

Return the read timer

This method returns the accumulated clock time, in seconds, spent reading data from files.

Definition at line 62 of file VDFIOBase.h.

double VAPoR::VDFIOBase::GetSeekTimer ( ) const
inline

Return the seek timer

This method returns the accumulated clock time, in seconds, spent performing file seeks (in general this is zero)

Definition at line 69 of file VDFIOBase.h.

double VAPoR::VDFIOBase::GetWriteTimer ( ) const
inline

Return the write timer

This method returns the accumulated clock time, in seconds, spent writing data to files.

Definition at line 79 of file VDFIOBase.h.

double VAPoR::VDFIOBase::GetXFormTimer ( ) const
inline

Return the transform timer

This method returns the accumulated clock time, in seconds, spent transforming data.

Definition at line 86 of file VDFIOBase.h.

virtual int VAPoR::VDFIOBase::OpenVariableRead ( size_t  timestep,
const char *  varname,
int  reflevel = 0,
int  lod = 0 
)
inlinevirtual
virtual int VAPoR::VDFIOBase::OpenVariableWrite ( size_t  timestep,
const char *  varname,
int  reflevel = 0,
int  lod = 0 
)
inlinevirtual
virtual int VAPoR::VDFIOBase::ReadRegion ( const size_t  min[3],
const size_t  max[3],
float *  region 
)
pure virtual
virtual int VAPoR::VDFIOBase::ReadRegion ( float *  region)
pure virtual
virtual int VAPoR::VDFIOBase::ReadSlice ( float *  slice)
pure virtual
void VAPoR::VDFIOBase::SeekTimerReset ( )
inline

Definition at line 70 of file VDFIOBase.h.

void VAPoR::VDFIOBase::SeekTimerStart ( )
inline

Definition at line 71 of file VDFIOBase.h.

References VetsUtil::GetTime().

void VAPoR::VDFIOBase::SeekTimerStop ( )
inline

Definition at line 72 of file VDFIOBase.h.

References VetsUtil::GetTime().

virtual int VAPoR::VDFIOBase::WriteRegion ( const float *  region,
const size_t  min[3],
const size_t  max[3] 
)
pure virtual
virtual int VAPoR::VDFIOBase::WriteRegion ( const float *  region)
pure virtual
virtual int VAPoR::VDFIOBase::WriteSlice ( const float *  slice)
pure virtual

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