mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-24 01:00:45 +02:00
Implement offset for images
This commit is contained in:
@@ -136,21 +136,25 @@ void JFH5Writer::write(
|
||||
throw runtime_error("Received unexpected block for stop_pulse_id.");
|
||||
}
|
||||
|
||||
hsize_t b_i_dims[3] = {n_images_to_copy,
|
||||
hsize_t b_i_dims[3] = {BUFFER_BLOCK_SIZE,
|
||||
MODULE_Y_SIZE * n_modules_,
|
||||
MODULE_X_SIZE};
|
||||
H5::DataSpace b_i_space(3, b_i_dims);
|
||||
hsize_t b_i_count[] = {n_images_to_copy,
|
||||
MODULE_Y_SIZE * n_modules_,
|
||||
MODULE_X_SIZE};
|
||||
hsize_t b_i_start[] = {n_images_offset, 0, 0};
|
||||
b_i_space.selectHyperslab(H5S_SELECT_SET, b_i_count, b_i_start);
|
||||
|
||||
hsize_t f_i_dims[3] = {n_images_,
|
||||
MODULE_Y_SIZE * n_modules_,
|
||||
MODULE_X_SIZE};
|
||||
H5::DataSpace f_i_space(3, f_i_dims);
|
||||
|
||||
hsize_t i_count[] = {n_images_to_copy,
|
||||
MODULE_Y_SIZE * n_modules_,
|
||||
MODULE_X_SIZE};
|
||||
hsize_t i_start[] = {current_write_index_, 0, 0};
|
||||
f_i_space.selectHyperslab(H5S_SELECT_SET, i_count, i_start);
|
||||
hsize_t f_i_count[] = {n_images_to_copy,
|
||||
MODULE_Y_SIZE * n_modules_,
|
||||
MODULE_X_SIZE};
|
||||
hsize_t f_i_start[] = {current_write_index_, 0, 0};
|
||||
f_i_space.selectHyperslab(H5S_SELECT_SET, f_i_count, f_i_start);
|
||||
|
||||
image_dataset_.write(
|
||||
data, H5::PredType::NATIVE_UINT16, b_i_space, f_i_space);
|
||||
|
||||
Reference in New Issue
Block a user