mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-21 05:24:36 +02:00
34 lines
791 B
C++
34 lines
791 B
C++
#ifndef BUFFER_UTILS_HPP
|
|
#define BUFFER_UTILS_HPP
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace BufferUtils
|
|
{
|
|
std::string get_filename(
|
|
std::string root_folder,
|
|
std::string device_name,
|
|
uint64_t pulse_id);
|
|
|
|
std::size_t get_file_frame_index(uint64_t pulse_id);
|
|
|
|
void update_latest_file(
|
|
const std::string& latest_filename,
|
|
const std::string& filename_to_write);
|
|
|
|
std::string get_latest_file(const std::string& latest_filename);
|
|
|
|
struct path_sufix {
|
|
uint64_t start_pulse_id;
|
|
uint64_t stop_pulse_id;
|
|
std::string path;
|
|
};
|
|
|
|
std::vector<path_sufix> get_path_suffixes(
|
|
const uint64_t start_pulse_id,
|
|
const uint64_t stop_pulse_id);
|
|
}
|
|
|
|
#endif //BUFFER_UTILS_HPP
|