36#include "AbstractHdf5Access.hpp"
42 htri_t dataset_status = H5Lexists(
mFileId, rDatasetName.c_str(), H5P_DEFAULT);
43 return (dataset_status > 0);
66 hid_t attribute_type = H5Aget_type(name_attribute_id);
69 char* string_array = (
char*)malloc(
sizeof(
char) * MAX_STRING_SIZE);
70 H5Aread(name_attribute_id, attribute_type, string_array);
71 std::string name_string(&string_array[0]);
74 H5Aread(unit_attribute_id, attribute_type, string_array);
75 std::string unit_string(&string_array[0]);
79 H5Tclose(attribute_type);
80 H5Aclose(name_attribute_id);
81 H5Aclose(unit_attribute_id);
97 const std::string& rBaseName,
98 const std::string& rDatasetName,
100 : mBaseName(rBaseName),
101 mDatasetName(rDatasetName),
102 mIsDataComplete(true),
103 mIsUnlimitedDimensionSet(false)
118 const std::string& rBaseName,
119 const std::string& rDatasetName)
120 : mBaseName(rBaseName),
121 mDatasetName(rDatasetName),
122 mDirectory(rDirectory),
123 mIsDataComplete(true),
124 mIsUnlimitedDimensionSet(false)
159 hsize_t max_objects_in_chunk_cache = 12799u;
160 hsize_t max_bytes_in_cache = 128u * 1024u * 1024u;
161#if H5_VERS_MAJOR >= 1 && H5_VERS_MINOR >= 8 && H5_VERS_RELEASE >= 3
164 H5Pset_chunk_cache(dapl_id,
165 max_objects_in_chunk_cache,
167 H5D_CHUNK_CACHE_W0_DEFAULT);
170 hid_t fapl_id = H5Fget_access_plist(
mFileId);
171 H5Pset_cache(fapl_id,
173 max_objects_in_chunk_cache,
virtual ~AbstractHdf5Access()
std::string GetUnlimitedDimensionName()
void SetUnlimitedDatasetId()
bool DoesDatasetExist(const std::string &rDatasetName)
std::vector< unsigned > GetIncompleteNodeMap()
bool mIsUnlimitedDimensionSet
AbstractHdf5Access(const std::string &rDirectory, const std::string &rBaseName, const std::string &rDatasetName, bool makeAbsolute=true)
hid_t mVariablesDatasetId
std::vector< unsigned > mIncompleteNodeIndices
std::string mUnlimitedDimensionUnit
hid_t mUnlimitedDatasetId
std::string GetUnlimitedDimensionUnit()
std::string mUnlimitedDimensionName
void SetMainDatasetRawChunkCache()
virtual void SetPath(const std::string &rPath, RelativeTo::Value relativeTo)