VAPoR  0.1
DataMgrMOM.h
Go to the documentation of this file.
1 #include <vector>
2 #include <string>
3 #include <vapor/DCReaderMOM.h>
4 #include <vapor/DataMgr.h>
5 #include <vapor/common.h>
6 
7 #ifndef _DataMgrMOM_h_
8 #define _DataMgrMOM_h_
9 
10 namespace VAPoR {
11 
12 //
19 //
21 
22 public:
23 
24  DataMgrMOM(
25  const vector <string> &files,
26  size_t mem_size
27  );
28 
29 
30  virtual ~DataMgrMOM() { };
31 
32 protected:
33 
34 
35  //
36  // Metadata methods
37  //
38 
39  virtual void _GetDim(size_t dim[3], int ) const {
40  return(DCReaderMOM::GetGridDim(dim));
41  };
42 
43  virtual void _GetBlockSize(size_t bs[3], int reflevel) const {
44  return(DCReaderMOM::GetGridDim(bs));
45  }
46 
47  virtual int _GetNumTransforms() const {
48  return(0);
49  };
50 
51  virtual string _GetGridType() const {
52  return(DCReaderMOM::GetGridType());
53  }
54 
55  virtual vector<double> _GetExtents(size_t ) const {
56  return(DCReaderMOM::GetExtents());
57  };
58 
59  virtual vector <double> _GetTSZCoords(size_t ts) const {
60  return(DCReaderMOM::GetTSZCoords(ts));
61  }
62 
63 
64  virtual long _GetNumTimeSteps() const {
66  };
67 
68  virtual string _GetMapProjection() const {
70  };
71 
72  virtual vector <string> _GetVariables3D() const {
74  };
75 
76  virtual vector <string> _GetVariables2DXY() const {
78  };
79 
80  virtual vector <string> _GetVariables2DXZ() const {
82  };
83 
84  virtual vector <string> _GetVariables2DYZ() const {
86  };
87 
88  virtual vector<long> _GetPeriodicBoundary() const {
90  };
91 
92  virtual vector<long> _GetGridPermutation() const {
94  };
95 
96  virtual double _GetTSUserTime(size_t ts) const {
97  return(DCReaderMOM::GetTSUserTime(ts));
98  };
99 
100  virtual void _GetTSUserTimeStamp(size_t ts, string &s) const {
102  }
103 
104  virtual int _VariableExists(
105  size_t ts,
106  const char *varname,
107  int reflevel = 0,
108  int lod = 0
109  ) const {
110  return (DCReaderMOM::VariableExists(ts,varname));
111  };
112 
113 
114  virtual int _OpenVariableRead(
115  size_t timestep,
116  const char *varname,
117  int,
118  int
119  ) {
120  return(DCReaderMOM::OpenVariableRead(timestep, varname));
121  };
122 
123  virtual const float *_GetDataRange() const {
124  return(NULL); // Not implemented. Let DataMgr figure it out
125  }
126 
127  virtual void _GetValidRegion(
128  size_t min[3], size_t max[3], int
129  ) const {
130  size_t dim[3]; DCReaderMOM::GetGridDim(dim);
131  min[0] = min[1] = min[2] = 0;
132  max[0] = dim[0]-1; max[1] = dim[1]-1; max[2] = dim[2]-1;
133  };
134 
135  virtual bool _GetMissingValue(string varname, float &value) const {
136  return(DCReaderMOM::GetMissingValue(varname, value));
137  };
138 
139 
140  virtual int _BlockReadRegion(
141  const size_t *, const size_t *, float *region
142  ) {
143  return(DCReaderMOM::Read(region));
144  };
145 
146  virtual int _CloseVariable() {
147  return (DCReaderMOM::CloseVariable());
148  };
149 
150 };
151 
152 };
153 
154 #endif // _DataMgrMOM_h_
void GetTSUserTimeStamp(size_t ts, string &s) const
virtual std::vector< long > GetGridPermutation() const
Definition: DCReaderMOM.h:107
virtual string _GetMapProjection() const
Definition: DataMgrMOM.h:68
double GetTSUserTime(size_t ts) const
virtual int CloseVariable()
virtual vector< double > _GetTSZCoords(size_t ts) const
Definition: DataMgrMOM.h:59
virtual vector< double > _GetExtents(size_t) const
Definition: DataMgrMOM.h:55
virtual std::vector< double > GetTSZCoords(size_t) const
Definition: DCReaderMOM.h:46
#define VDF_API
Definition: common.h:61
virtual void _GetTSUserTimeStamp(size_t ts, string &s) const
Definition: DataMgrMOM.h:100
virtual void _GetDim(size_t dim[3], int) const
Definition: DataMgrMOM.h:39
virtual string _GetGridType() const
Definition: DataMgrMOM.h:51
A cache based data reader.
Definition: DataMgr.h:39
virtual std::vector< double > GetExtents(size_t ts=0) const
Definition: DCReaderMOM.h:50
virtual vector< string > _GetVariables2DXY() const
Definition: DataMgrMOM.h:76
A cache based data reader.
Definition: DataMgrMOM.h:20
virtual bool VariableExists(size_t ts, string varname, int i0=0, int i1=0) const
Definition: DCReaderMOM.h:132
long GetNumTimeSteps() const
Definition: DCReaderMOM.h:54
virtual vector< string > _GetVariables3D() const
Definition: DataMgrMOM.h:72
virtual std::vector< string > GetVariables2DXY() const
Definition: DCReaderMOM.h:64
virtual int _BlockReadRegion(const size_t *, const size_t *, float *region)
Definition: DataMgrMOM.h:140
virtual int _OpenVariableRead(size_t timestep, const char *varname, int, int)
Definition: DataMgrMOM.h:114
virtual int Read(float *data)
virtual vector< long > _GetGridPermutation() const
Definition: DataMgrMOM.h:92
virtual double _GetTSUserTime(size_t ts) const
Definition: DataMgrMOM.h:96
virtual vector< string > _GetVariables2DYZ() const
Definition: DataMgrMOM.h:84
bool GetMissingValue(string varname, float &value) const
virtual ~DataMgrMOM()
Definition: DataMgrMOM.h:30
virtual int _VariableExists(size_t ts, const char *varname, int reflevel=0, int lod=0) const
Definition: DataMgrMOM.h:104
virtual vector< string > _GetVariables2DXZ() const
Definition: DataMgrMOM.h:80
virtual string GetMapProjection() const
virtual void _GetBlockSize(size_t bs[3], int reflevel) const
Definition: DataMgrMOM.h:43
virtual string GetGridType() const
Definition: DCReaderMOM.h:44
virtual bool _GetMissingValue(string varname, float &value) const
Definition: DataMgrMOM.h:135
virtual std::vector< string > GetVariables3D() const
Definition: DCReaderMOM.h:60
virtual long _GetNumTimeSteps() const
Definition: DataMgrMOM.h:64
virtual int _GetNumTransforms() const
Definition: DataMgrMOM.h:47
virtual void GetGridDim(size_t dim[3]) const
Definition: DCReaderMOM.h:36
virtual int _CloseVariable()
Definition: DataMgrMOM.h:146
virtual std::vector< long > GetPeriodicBoundary() const
Definition: DCReaderMOM.h:101
virtual std::vector< string > GetVariables2DYZ() const
Definition: DCReaderMOM.h:73
virtual std::vector< string > GetVariables2DXZ() const
Definition: DCReaderMOM.h:69
virtual void _GetValidRegion(size_t min[3], size_t max[3], int) const
Definition: DataMgrMOM.h:127
virtual int OpenVariableRead(size_t timestep, string varname, int reflevel=0, int lod=0)
virtual const float * _GetDataRange() const
Definition: DataMgrMOM.h:123
virtual vector< long > _GetPeriodicBoundary() const
Definition: DataMgrMOM.h:88