mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-10 17:52:03 +02:00
Moved config to separate compilation unit
This commit is contained in:
+1
-1
@@ -212,7 +212,7 @@ hsize_t HDF5ChunkedWriter::prepare_storage_for_frame(size_t frame_index, size_t*
|
||||
|
||||
// Expand the dataset if needed.
|
||||
if (relative_frame_index > current_dataset_size) {
|
||||
current_dataset_size = expand_dataset(dataset, relative_frame_index, dataset_increase_step);
|
||||
current_dataset_size = expand_dataset(dataset, relative_frame_index, config::dataset_increase_step);
|
||||
}
|
||||
|
||||
// Keep track of the max index in this file - needed for shrinking the dataset at the end.
|
||||
|
||||
+1
-8
@@ -5,14 +5,7 @@
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
|
||||
namespace config
|
||||
{
|
||||
auto dataset_type = H5::PredType::NATIVE_UINT8;
|
||||
auto dataset_byte_order = H5T_ORDER_LE;
|
||||
hsize_t dataset_increase_step = 1000;
|
||||
hsize_t initial_dataset_size = 1000;
|
||||
}
|
||||
#include "config.hpp"
|
||||
|
||||
hsize_t expand_dataset(const H5::DataSet& dataset, hsize_t frame_index, hsize_t dataset_increase_step);
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#include "config.hpp"
|
||||
|
||||
namespace config {
|
||||
H5::PredType dataset_type = H5::PredType::NATIVE_UINT8;
|
||||
H5T_order_t dataset_byte_order = H5T_ORDER_LE;
|
||||
hsize_t dataset_increase_step = 1000;
|
||||
hsize_t initial_dataset_size = 1000;
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#include <H5Cpp.h>
|
||||
|
||||
#ifndef CONFIG
|
||||
#define CONFIG
|
||||
|
||||
namespace config
|
||||
{
|
||||
extern H5::PredType dataset_type;
|
||||
extern H5T_order_t dataset_byte_order;
|
||||
extern hsize_t dataset_increase_step;
|
||||
extern hsize_t initial_dataset_size;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user