mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-06-06 10:38:41 +02:00
eiger image assemble routine.
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
size_t meta_n_bytes,
|
||||
size_t data_n_bytes,
|
||||
int n_modules,
|
||||
int n_slots=buffer_config::RAM_BUFFER_N_SLOTS);
|
||||
int n_slots);
|
||||
|
||||
~RamBuffer();
|
||||
|
||||
@@ -43,7 +43,6 @@ public:
|
||||
const uint64_t image_id, const uint64_t module_id) const;
|
||||
char* get_slot_meta(const uint64_t image_id) const;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define EIGER_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdint.h>
|
||||
|
||||
#define N_MODULES 1
|
||||
#define BYTES_PER_PACKET 4144
|
||||
@@ -27,6 +28,9 @@
|
||||
|
||||
|
||||
#define N_BYTES_PER_MODULE_LINE(bit_depth) ((MODULE_X_SIZE * bit_depth) / 8)
|
||||
#define N_BYTES_PER_MODULE_FRAME(bit_depth) ((131072 * bit_depth) / 8)
|
||||
|
||||
|
||||
// #define N_BYTES_PER_IMAGE_LINE(bit_depth, n_submodules) ((n_submodules / 2 * MODULE_X_SIZE * bit_depth) / 8)
|
||||
|
||||
// DR 16
|
||||
|
||||
@@ -17,7 +17,7 @@ using namespace buffer_config;
|
||||
RamBuffer::RamBuffer(const string& buffer_name,
|
||||
const size_t meta_n_bytes,
|
||||
const size_t data_n_bytes,
|
||||
const int n_modules = 1,
|
||||
const int n_modules,
|
||||
const int n_slots) :
|
||||
buffer_name_(buffer_name),
|
||||
n_modules_(n_modules),
|
||||
@@ -66,8 +66,8 @@ RamBuffer::~RamBuffer()
|
||||
char* RamBuffer::_get_meta_buffer(
|
||||
int slot_n,
|
||||
uint64_t module_id) const
|
||||
{
|
||||
return buffer_ + (slot_n * slot_bytes_) +
|
||||
{
|
||||
return buffer_ + (slot_n * slot_bytes_) +
|
||||
(module_id * meta_bytes_);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ void RamBuffer::write_frame(
|
||||
cout << " || src_meta.n_recv_packets " << src_meta.n_recv_packets;
|
||||
cout << " || src_meta.daq_rec " << src_meta.daq_rec;
|
||||
cout << " || src_meta.module_id " << src_meta.module_id;
|
||||
cout << " || dst_meta " << &dst_meta;
|
||||
cout << endl;
|
||||
#endif
|
||||
|
||||
@@ -127,4 +128,4 @@ char* RamBuffer::get_frame_data(
|
||||
char* RamBuffer::get_slot_data(const uint64_t image_id) const
|
||||
{
|
||||
return get_frame_data(image_id, 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user