mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-02 10:44:15 +02:00
Add method for creating image buffer files
This commit is contained in:
@@ -11,6 +11,24 @@
|
||||
using namespace std;
|
||||
using namespace buffer_config;
|
||||
|
||||
string BufferUtils::get_image_filename(
|
||||
const std::string& detector_folder,
|
||||
const uint64_t pulse_id)
|
||||
{
|
||||
uint64_t data_folder = pulse_id / buffer_config::FOLDER_MOD;
|
||||
data_folder *= buffer_config::FOLDER_MOD;
|
||||
|
||||
uint64_t data_file = pulse_id / buffer_config::FILE_MOD;
|
||||
data_file *= buffer_config::FILE_MOD;
|
||||
|
||||
stringstream folder;
|
||||
folder << detector_folder << "/";
|
||||
folder << data_folder << "/";
|
||||
folder << data_file << buffer_config::FILE_EXTENSION;
|
||||
|
||||
return folder.str();
|
||||
}
|
||||
|
||||
string BufferUtils::get_filename(
|
||||
const std::string& detector_folder,
|
||||
const std::string& module_name,
|
||||
|
||||
Reference in New Issue
Block a user