From 9b8a6c99de077215ccc99f8ae570671f8c020a58 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Tue, 6 Jul 2021 15:46:20 +0200 Subject: [PATCH] Detector writer config --- .../{StdDetWriterConfig.hpp => DetWriterConfig.hpp} | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) rename std-det-writer/include/{StdDetWriterConfig.hpp => DetWriterConfig.hpp} (61%) diff --git a/std-det-writer/include/StdDetWriterConfig.hpp b/std-det-writer/include/DetWriterConfig.hpp similarity index 61% rename from std-det-writer/include/StdDetWriterConfig.hpp rename to std-det-writer/include/DetWriterConfig.hpp index 847439b..c7e335a 100644 --- a/std-det-writer/include/StdDetWriterConfig.hpp +++ b/std-det-writer/include/DetWriterConfig.hpp @@ -8,8 +8,8 @@ #include #include -struct UdpRecvConfig { - static UdpRecvConfig from_json_file(const std::string& filename) { +struct DetWriterConfig { + static DetWriterConfig from_json_file(const std::string& filename) { std::ifstream ifs(filename); rapidjson::IStreamWrapper isw(ifs); rapidjson::Document config_parameters; @@ -17,16 +17,12 @@ struct UdpRecvConfig { return { config_parameters["detector_name"].GetString(), - config_parameters["detector_type"].GetString(), - config_parameters["n_modules"].GetInt(), - config_parameters["start_udp_port"].GetInt(), + config_parameters["output_folder"].GetString() }; } const std::string detector_name; - const std::string detector_type; - const int n_modules; - const int start_udp_port; + const std::string output_folder; };