From 02c30a54e07f43a9dada38d3dfb4a3e2261f8705 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Mon, 25 May 2020 11:30:32 +0200 Subject: [PATCH] Refactoring file format change --- core-buffer/include/formats.hpp | 13 +++++++++++++ core-buffer/include/jungfrau.hpp | 12 ------------ sf-replay/include/ReplayH5Reader.hpp | 2 +- sf-replay/src/main.cpp | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/core-buffer/include/formats.hpp b/core-buffer/include/formats.hpp index ed65c6f..14d769c 100644 --- a/core-buffer/include/formats.hpp +++ b/core-buffer/include/formats.hpp @@ -2,6 +2,7 @@ #define SF_DAQ_BUFFER_FORMATS_HPP #include "buffer_config.hpp" +#include "jungfrau.hpp" struct ImageMetadataBuffer { @@ -22,4 +23,16 @@ struct ImageMetadata uint64_t data_n_bytes; }; +#pragma pack(push) +#pragma pack(1) +struct ReplayModuleFrameBuffer { + ModuleFrame frame[core_buffer::REPLAY_READ_BUFFER_SIZE]; + bool is_frame_present[core_buffer::REPLAY_READ_BUFFER_SIZE]; + bool is_good_frame[core_buffer::REPLAY_READ_BUFFER_SIZE]; + uint16_t module_id; + uint64_t data_n_bytes; + uint16_t n_frames; +}; +#pragma pack(pop) + #endif //SF_DAQ_BUFFER_FORMATS_HPP diff --git a/core-buffer/include/jungfrau.hpp b/core-buffer/include/jungfrau.hpp index 806e40d..4fb0bf2 100644 --- a/core-buffer/include/jungfrau.hpp +++ b/core-buffer/include/jungfrau.hpp @@ -51,18 +51,6 @@ struct ModuleFrame { }; #pragma pack(pop) -#pragma pack(push) -#pragma pack(1) -struct ReplayModuleFrameBuffer { - ModuleFrame frame[core_buffer::REPLAY_READ_BUFFER_SIZE]; - bool is_frame_present[core_buffer::REPLAY_READ_BUFFER_SIZE]; - bool is_good_frame[core_buffer::REPLAY_READ_BUFFER_SIZE]; - uint16_t module_id; - uint64_t data_n_bytes; - uint16_t n_frames; -}; -#pragma pack(pop) - struct ModuleFrameBuffer { ModuleFrame module[JUNGFRAU_N_MODULES]; }; diff --git a/sf-replay/include/ReplayH5Reader.hpp b/sf-replay/include/ReplayH5Reader.hpp index b9e9943..5972989 100644 --- a/sf-replay/include/ReplayH5Reader.hpp +++ b/sf-replay/include/ReplayH5Reader.hpp @@ -2,7 +2,7 @@ #define SF_DAQ_BUFFER_REPLAYH5READER_HPP #include -#include "jungfrau.hpp" +#include "formats.hpp" #include #include #include "buffer_config.hpp" diff --git a/sf-replay/src/main.cpp b/sf-replay/src/main.cpp index cca230d..11268bd 100644 --- a/sf-replay/src/main.cpp +++ b/sf-replay/src/main.cpp @@ -3,10 +3,10 @@ #include #include #include +#include #include #include "buffer_config.hpp" -#include "jungfrau.hpp" using namespace std; using namespace core_buffer;