dev/handes trailing / in filepath (#1391)
Some checks failed
Build on RHEL9 / build (push) Successful in 3m22s
Run Simulator Tests on local RHEL9 / build (push) Failing after 3m49s
Build on local RHEL9 / build (push) Successful in 1m26s
Build on RHEL8 / build (push) Successful in 5m13s
Run Simulator Tests on local RHEL8 / build (push) Failing after 5m30s
Build on local RHEL8 / build (push) Successful in 3m33s

* member filePath in Implementation is std::filesystem::path, some refactoring

* PR Review

* adapted function signature - compiled with hdf5 on
This commit is contained in:
2026-02-17 17:11:33 +01:00
committed by GitHub
parent 26729b06cb
commit 65c8f2c7d8
11 changed files with 100 additions and 75 deletions

View File

@@ -87,8 +87,9 @@ void HDF5DataFile::CloseFile() {
}
void HDF5DataFile::CreateFirstHDF5DataFile(
const std::string &fNamePrefix, const uint64_t fIndex, const bool owEnable,
const bool sMode, const uint16_t uPortNumber, const uint32_t mFramesPerFile,
const std::filesystem::path &filePath, const std::string &fNamePrefix,
const uint64_t fIndex, const bool owEnable, const bool sMode,
const uint16_t uPortNumber, const uint32_t mFramesPerFile,
const uint64_t nImages, const uint32_t nX, const uint32_t nY,
const uint32_t dr) {
@@ -103,6 +104,7 @@ void HDF5DataFile::CreateFirstHDF5DataFile(
nPixelsY = nY;
dynamicRange = dr;
m_filePath = filePath;
fileNamePrefix = fNamePrefix;
fileIndex = fIndex;
overWriteEnable = owEnable;
@@ -129,9 +131,10 @@ void HDF5DataFile::CreateFile() {
numFramesInFile = 0;
numFilesInAcquisition++;
std::ostringstream os;
os << fileNamePrefix << "_f" << subFileIndex << '_' << fileIndex << ".h5";
fileName = os.str();
std::filesystem::path p =
m_filePath / (fileNamePrefix + "_f" + std::to_string(subFileIndex) +
'_' + std::to_string(fileIndex) + ".h5");
fileName = p.string();
std::lock_guard<std::mutex> lock(*hdf5Lib);