mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-15 13:05:36 +02:00
d94c0d0e72
Build on RHEL9 docker image / build (push) Successful in 4m0s
Build on RHEL8 docker image / build (push) Successful in 4m54s
Build and Deploy on local RHEL9 / build (push) Successful in 2m7s
Build and Deploy on local RHEL8 / build (push) Successful in 5m4s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m18s
Run Simulator Tests on local RHEL8 / build (push) Successful in 21m52s
* removed unused function readDataFile/writeDataFile * release notes
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
#pragma once
|
|
|
|
#include "sls/sls_detector_defs.h"
|
|
|
|
#include <cstdio>
|
|
#include <fstream>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace sls {
|
|
|
|
|
|
std::vector<char> readBinaryFile(const std::string &fname,
|
|
const std::string &errorPrefix);
|
|
|
|
// mkdir -p path implemented by recursive calls
|
|
void mkdir_p(const std::string &path, std::string dir = "");
|
|
|
|
int getFileSize(std::ifstream &ifs);
|
|
ssize_t getFileSize(FILE *fd, const std::string &prependErrorString);
|
|
|
|
std::string getFileNameFromFilePath(const std::string &fpath);
|
|
|
|
std::vector<int> getChannelsFromStringList(const std::vector<std::string> list);
|
|
|
|
/** File can have # for comments.
|
|
* Channels can be separated by spaces, commas
|
|
* and ranges provided using ':', eg. 23:29
|
|
* */
|
|
std::vector<int> getChannelsFromFile(const std::string &fname);
|
|
|
|
std::string getAbsolutePathFromCurrentProcess(const std::string &fname);
|
|
|
|
} // namespace sls
|