mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-28 09:28:41 +01:00
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
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:
@@ -19,16 +19,15 @@ void BinaryDataFile::CloseFile() {
|
||||
fd = nullptr;
|
||||
}
|
||||
|
||||
void BinaryDataFile::CreateFirstBinaryDataFile(const std::string &fNamePrefix,
|
||||
const uint64_t fIndex,
|
||||
const bool ovEnable,
|
||||
const bool sMode,
|
||||
const uint16_t uPortNumber,
|
||||
const uint32_t mFramesPerFile) {
|
||||
void BinaryDataFile::CreateFirstBinaryDataFile(
|
||||
const std::filesystem::path &filePath, const std::string &fNamePrefix,
|
||||
const uint64_t fIndex, const bool ovEnable, const bool sMode,
|
||||
const uint16_t uPortNumber, const uint32_t mFramesPerFile) {
|
||||
|
||||
subFileIndex = 0;
|
||||
numFramesInFile = 0;
|
||||
|
||||
m_filePath = filePath;
|
||||
fileNamePrefix = fNamePrefix;
|
||||
fileIndex = fIndex;
|
||||
overWriteEnable = ovEnable;
|
||||
@@ -42,9 +41,10 @@ void BinaryDataFile::CreateFirstBinaryDataFile(const std::string &fNamePrefix,
|
||||
void BinaryDataFile::CreateFile() {
|
||||
numFramesInFile = 0;
|
||||
|
||||
std::ostringstream os;
|
||||
os << fileNamePrefix << "_f" << subFileIndex << '_' << fileIndex << ".raw";
|
||||
fileName = os.str();
|
||||
std::filesystem::path p =
|
||||
m_filePath / (fileNamePrefix + "_f" + std::to_string(subFileIndex) +
|
||||
'_' + std::to_string(fileIndex) + ".raw");
|
||||
fileName = p.string();
|
||||
|
||||
if (!overWriteEnable) {
|
||||
if (nullptr == (fd = fopen(fileName.c_str(), "wx"))) {
|
||||
|
||||
Reference in New Issue
Block a user