28 template<
class T>
int ReadRegion(std::string varname,
size_t ts,
const std::vector<size_t> &min,
const std::vector<size_t> &max, T region);
31 std::string _currentFilePath;
34 std::vector<float> _times;
35 std::string _dataFile;
36 std::vector<std::string> _dataFiles;
37 std::array<size_t, 3> _gridSize;
39 std::string _variable;
40 std::vector<std::string> _variables;
41 std::array<double, 3> _brickOrigin;
42 std::array<double, 3> _brickSize;
47 std::string _dataEndian;
48 std::string _centering;
50 std::array<size_t, 3> _dataBricklets;
56 std::array<double, 3> _tmpBrickOrigin;
57 std::array<double, 3> _tmpBrickSize;
58 size_t _tmpByteOffset;
80 std::array<int, 3> _tmpGridSize;
82 bool _gridSizeAssigned;
84 bool _brickOriginAssigned;
85 bool _brickSizeAssigned;
86 bool _byteOffsetAssigned;
90 std::map<std::string, std::map<float, std::string>> _dataFileMap;
92 std::array<std::string, 3> _spatialDimensions;
93 int _validateParsedValues();
94 std::string _timeDimension;
96 int _parseHeader(std::ifstream &header);
97 int _populateDataFileMap();
99 template<
typename T>
int _findToken(
const std::string &token, std::string &line, T &value,
bool verbose =
false);
100 template<
typename T>
int _findToken(
const std::string &token, std::string &line, std::array<T, 3> &value,
bool verbose =
false);
102 void _findTokenValue(std::string &line)
const;
106 int _invalidVarNameError()
const;
107 int _invalidFileSizeError(
size_t numElements)
const;
108 int _invalidFileError()
const;
109 int _invalidDimensionError(
const std::string &token)
const;
110 int _invalidFormatError(
const std::string &token)
const;
111 int _failureToReadError(
const std::string &token)
const;
112 int _inconsistentValueError(
const std::string &token)
const;
113 int _invalidValueError(
const std::string &token)
const;
114 int _missingValueError(
const std::string &token)
const;
116 static const std::string TIME_TOKEN;
117 static const std::string DATA_FILE_TOKEN;
118 static const std::string GRID_SIZE_TOKEN;
119 static const std::string FORMAT_TOKEN;
120 static const std::string VARIABLE_TOKEN;
121 static const std::string ORIGIN_TOKEN;
122 static const std::string BRICK_SIZE_TOKEN;
123 static const std::string OFFSET_TOKEN;
126 static const std::string ENDIAN_TOKEN;
127 static const std::string CENTERING_TOKEN;
128 static const std::string DIVIDE_BRICK_TOKEN;
129 static const std::string DATA_BRICKLETS_TOKEN;
130 static const std::string DATA_COMPONENTS_TOKEN;
132 static const double _defaultTime;
133 static const std::string _defaultFile;
135 static const std::string _defaultVar;
136 static const size_t _defaultByteOffset;
137 static const std::array<double, 3> _defaultOrigin;
138 static const std::array<double, 3> _defaultBrickSize;
139 static const std::array<size_t, 3> _defaultGridSize;
142 static const std::string _defaultEndian;
143 static const std::string _defaultCentering;
144 static const bool _defaultDivBrick;
145 static const std::array<size_t, 3> _defaultBricklets;
146 static const size_t _defaultComponents;
148 static const std::string _xDim;
149 static const std::string _yDim;
150 static const std::string _zDim;
151 static const std::string _timeDim;
153 static const std::string _byteFormatString;
154 static const std::string _shortFormatString;
155 static const std::string _intFormatString;
156 static const std::string _floatFormatString;
157 static const std::string _doubleFormatString;
162template<>
int BOVCollection::_findToken<DC::XType>(
const std::string &token, std::string &line,
DC::XType &value,
bool verbose);
std::vector< std::string > GetDataVariableNames() const
std::vector< float > GetUserTimes() const
int ReadRegion(std::string varname, size_t ts, const std::vector< size_t > &min, const std::vector< size_t > &max, T region)
std::array< std::string, 3 > GetSpatialDimensions() const
DC::XType GetDataFormat() const
std::array< double, 3 > GetBrickOrigin() const
std::array< double, 3 > GetBrickSize() const
int Initialize(const std::vector< std::string > &paths)
float GetUserTime(size_t ts) const
std::string GetTimeDimension() const
std::array< size_t, 3 > GetDataSize() const
XType
External storage types for primitive data.