wip rewrite

This commit is contained in:
2021-06-29 20:45:52 +02:00
parent ee1a1563ba
commit d7dc1912ac
12 changed files with 481 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#include "HDF5DataFile.h"
#include "sls/logger.h"
HDF5DataFile::HDF5DataFile(int index) : File(index, HDF5) {}
HDF5DataFile::~HDF5DataFile() { CloseFile(); }
void HDF5DataFile::CloseFile() {
try {
Exception::dontPrint(); // to handle errors
if (fd_) {
fd_->close();
delete fd_;
fd_ = nullptr;
}
} catch (const Exception &error) {
LOG(logERROR) << "Could not close data HDF5 handles of index "
<< index_;
error.printErrorStack();
}
}