mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-03 06:04:13 +02:00
cleanup eiger assembler
This commit is contained in:
@@ -17,7 +17,7 @@ EigerAssembler::EigerAssembler(const int n_modules, const int bit_depth):
|
||||
n_eiger_modules_(n_modules/4),
|
||||
bit_depth_(bit_depth),
|
||||
n_bytes_per_frame_(MODULE_N_PIXELS * bit_depth / 8),
|
||||
n_bytes_per_frame_line_(N_BYTES_PER_MODULE_LINE(bit_depth)),
|
||||
n_bytes_per_frame_line_(MODULE_X_SIZE * bit_depth) / 8),
|
||||
n_packets_per_frame_(n_bytes_per_frame_ / DATA_BYTES_PER_PACKET),
|
||||
n_bytes_per_x_gap_(GAP_X_MODULE_PIXELS * bit_depth / 8),
|
||||
n_bytes_per_y_gap_(GAP_Y_MODULE_PIXELS * bit_depth / 8),
|
||||
@@ -127,13 +127,41 @@ void EigerAssembler::assemble_image(const char* src_meta,
|
||||
(char*)(src_data + source_offset),
|
||||
n_bytes_per_frame_line_
|
||||
);
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
// verifies the addresses for
|
||||
// beginning and end of each frame
|
||||
if (counter < 5 || counter > 508){
|
||||
cout << " [" << std::chrono::system_clock::now();
|
||||
cout << "] [MODULE " << i_module;
|
||||
cout << "] (row " << i_module_row;
|
||||
cout << ",column " << i_module_column;
|
||||
cout << ") source_offset" << source_offset;
|
||||
cout << " || dest_offset " << dest_offset;
|
||||
cout << " || frame_line " << frame_line;
|
||||
cout << " || COUNTER " << counter;
|
||||
cout << endl;
|
||||
}
|
||||
#endif
|
||||
counter += 1;
|
||||
source_offset += reverse * n_bytes_per_module_line_;
|
||||
source_offset += reverse * n_bytes_per_frame_line_;
|
||||
dest_offset += reverse * n_bytes_per_image_line_;
|
||||
}
|
||||
line_number += n_lines_per_frame_;
|
||||
dest_module_line = line_number + n_lines_per_frame_ - 1;
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
// if (i_module == 0){
|
||||
cout << " [" << std::chrono::system_clock::now();
|
||||
cout << "] [MODULE " << i_module;
|
||||
cout << "] (row " << i_module_row;
|
||||
cout << " , column" << i_module_column;
|
||||
cout << ") || reverse_factor" << reverse_factor;
|
||||
cout << " || line_number" << line_number;
|
||||
cout << " || N_RECV_PACKETS" << frame_meta->n_recv_packets;
|
||||
cout << endl;
|
||||
// }
|
||||
#endif
|
||||
|
||||
// last module sets the last_image_status_
|
||||
if (i_module == n_modules_ - 1){
|
||||
|
||||
Reference in New Issue
Block a user