From 8ebe6bd17b11779c262f72d5e4dccc332a41984d Mon Sep 17 00:00:00 2001 From: lhdamiani Date: Thu, 19 Aug 2021 12:08:46 +0200 Subject: [PATCH] using default json reader instead --- std-stream-send/include/StreamSendConfig.hpp | 33 -------------------- 1 file changed, 33 deletions(-) delete mode 100644 std-stream-send/include/StreamSendConfig.hpp diff --git a/std-stream-send/include/StreamSendConfig.hpp b/std-stream-send/include/StreamSendConfig.hpp deleted file mode 100644 index 28bdf6e..0000000 --- a/std-stream-send/include/StreamSendConfig.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef SF_DAQ_BUFFER_UDPRECVCONFIG_HPP -#define SF_DAQ_BUFFER_UDPRECVCONFIG_HPP - - -#include -#include -#include -#include -#include - -struct StreamSendConfig { - static StreamSendConfig from_json_file(const std::string& filename) { - std::ifstream ifs(filename); - rapidjson::IStreamWrapper isw(ifs); - rapidjson::Document config_parameters; - config_parameters.ParseStream(isw); - - return { - config_parameters["detector_name"].GetString(), - config_parameters["n_modules"].GetInt(), - config_parameters["image_height"].GetInt(), - config_parameters["image_width"].GetInt(), - }; - } - - const std::string detector_name; - const int n_modules; - const int image_height; - const int image_width; -}; - - -#endif //SF_DAQ_BUFFER_UDPRECVCONFIG_HPP