mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-26 18:20:44 +02:00
Rename ImageMetadataBlock
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "buffer_config.hpp"
|
||||
#include "jungfrau.hpp"
|
||||
|
||||
struct ImageMetadataBuffer
|
||||
struct ImageMetadataBlock
|
||||
{
|
||||
uint64_t pulse_id[core_buffer::BUFFER_BLOCK_SIZE];
|
||||
uint64_t frame_index[core_buffer::BUFFER_BLOCK_SIZE];
|
||||
@@ -29,7 +29,7 @@ struct BufferBinaryFormat {
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
struct BufferBlock
|
||||
struct BufferBinaryBlock
|
||||
{
|
||||
BufferBinaryFormat frame[core_buffer::BUFFER_BLOCK_SIZE];
|
||||
uint64_t start_pulse_id;
|
||||
|
||||
@@ -103,7 +103,7 @@ void FastQueue<T>::release()
|
||||
read_slot_id_ %= n_slots_;
|
||||
}
|
||||
|
||||
template class FastQueue<ImageMetadataBuffer>;
|
||||
template class FastQueue<ImageMetadataBlock>;
|
||||
template class FastQueue<ReplayBuffer>;
|
||||
template class FastQueue<ModuleFrame>;
|
||||
template class FastQueue<ModuleFrameBuffer>;
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
const size_t n_images,
|
||||
const size_t n_modules);
|
||||
~JFH5Writer();
|
||||
void write(const ImageMetadataBuffer* metadata, const char* data);
|
||||
void write(const ImageMetadataBlock* metadata, const char* data);
|
||||
void close_file();
|
||||
|
||||
uint64_t* b_pulse_id_;
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
void get_next_buffer(
|
||||
const uint64_t start_pulse_id,
|
||||
ImageMetadataBuffer* i_meta,
|
||||
ImageMetadataBlock* i_meta,
|
||||
char* image_buffer);
|
||||
};
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ void JFH5Writer::close_file()
|
||||
}
|
||||
|
||||
void JFH5Writer::write(
|
||||
const ImageMetadataBuffer* metadata, const char* data)
|
||||
const ImageMetadataBlock* metadata, const char* data)
|
||||
{
|
||||
size_t n_images_to_copy = min(n_images_ - current_write_index_,
|
||||
BUFFER_BLOCK_SIZE);
|
||||
|
||||
@@ -50,7 +50,7 @@ WriterZmqReceiver::~WriterZmqReceiver()
|
||||
|
||||
void WriterZmqReceiver::get_next_buffer(
|
||||
const uint64_t start_pulse_id,
|
||||
ImageMetadataBuffer* i_meta,
|
||||
ImageMetadataBlock* i_meta,
|
||||
char* image_buffer)
|
||||
{
|
||||
auto n_images_in_buffer = WRITER_DATA_CACHE_N_IMAGES;
|
||||
|
||||
@@ -20,7 +20,7 @@ void receive_replay(
|
||||
void* ctx,
|
||||
const string ipc_prefix,
|
||||
const size_t n_modules,
|
||||
FastQueue<ImageMetadataBuffer>& queue,
|
||||
FastQueue<ImageMetadataBlock>& queue,
|
||||
const uint64_t start_pulse_id,
|
||||
const uint64_t stop_pulse_id)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
size_t n_modules = 32;
|
||||
|
||||
FastQueue<ImageMetadataBuffer> queue(
|
||||
FastQueue<ImageMetadataBlock> queue(
|
||||
MODULE_N_BYTES * n_modules * WRITER_DATA_CACHE_N_IMAGES,
|
||||
WRITER_FASTQUEUE_N_SLOTS);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ void receive_replay(
|
||||
void* ctx,
|
||||
const string ipc_prefix,
|
||||
const size_t n_modules,
|
||||
FastQueue<ImageMetadataBuffer>& queue,
|
||||
FastQueue<ImageMetadataBlock>& queue,
|
||||
const uint64_t start_pulse_id,
|
||||
const uint64_t stop_pulse_id)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
size_t n_modules = 32;
|
||||
|
||||
FastQueue<ImageMetadataBuffer> queue(
|
||||
FastQueue<ImageMetadataBlock> queue(
|
||||
MODULE_N_BYTES * n_modules * WRITER_DATA_CACHE_N_IMAGES,
|
||||
WRITER_FASTQUEUE_N_SLOTS);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ TEST(WriterH5Writer, basic_interaction)
|
||||
size_t n_frames = 5;
|
||||
|
||||
auto data = make_unique<char[]>(n_modules*MODULE_N_BYTES);
|
||||
auto metadata = make_shared<ImageMetadataBuffer>();
|
||||
auto metadata = make_shared<ImageMetadataBlock>();
|
||||
|
||||
// Needed by writer.
|
||||
metadata->data_n_bytes[0] = 500;
|
||||
|
||||
Reference in New Issue
Block a user