mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
works with hdf5
This commit is contained in:
parent
cb6cbaeeec
commit
b98eee5b9a
@ -117,7 +117,9 @@ void HDF5MasterFile::CreateMasterFile(const std::string filePath,
|
||||
Group group5(group3.createGroup("detector"));
|
||||
Group group6(group1.createGroup("sample"));
|
||||
|
||||
groupId_ = group5.getId();
|
||||
// TODO find a way to get complete group link
|
||||
attrGroupName_ = "/entry/instrument/detector";
|
||||
|
||||
attr->WriteMasterHDF5Attributes(fd_, &group5);
|
||||
fd_->close();
|
||||
|
||||
@ -137,15 +139,12 @@ void HDF5MasterFile::UpdateMasterFile(MasterAttributes *attr, bool silentMode) {
|
||||
|
||||
try {
|
||||
Exception::dontPrint(); // to handle errors
|
||||
|
||||
FileAccPropList flist;
|
||||
flist.setFcloseDegree(H5F_CLOSE_STRONG);
|
||||
fd_ = new H5File(fileName_.c_str(), H5F_ACC_RDWR,
|
||||
FileCreatPropList::DEFAULT, flist);
|
||||
|
||||
Group group(groupId_);
|
||||
|
||||
// cannot do this TODO
|
||||
Group group = fd_->openGroup(attrGroupName_.c_str());
|
||||
attr->WriteFinalHDF5Attributes(fd_, &group);
|
||||
fd_->close();
|
||||
|
||||
|
@ -25,5 +25,5 @@ class HDF5MasterFile : private virtual slsDetectorDefs, public File {
|
||||
std::mutex *hdf5Lib_;
|
||||
H5File *fd_{nullptr};
|
||||
std::string fileName_;
|
||||
hid_t groupId_{0};
|
||||
std::string attrGroupName_;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user