4#include <nlohmann/json.hpp>
5#include <nlohmann/json_fwd.hpp>
14 json_obj = nlohmann::ordered_json{ {
"expIDs", options.
get_exp_ids() },
24 auto offspill_tpat_pos = 0;
25 auto num_of_planes = 0;
26 auto exp_ids = std::string{};
29 json_obj.at(
"expIDs").get_to(exp_ids);
30 json_obj.at(
"num_of_planes").get_to(num_of_planes);
31 json_obj.at(
"offspill").get_to(offspill_tpat_pos);
37 for (
const auto& jsonEntry : json_obj.at(
"trig_mapping"))
39 const auto moduleID = jsonEntry.at(
"barID").template get<int>();
40 const auto trigID_left = jsonEntry.at(
"trigID_left").template get<int>();
41 const auto trigID_right = jsonEntry.at(
"trigID_right").template get<int>();
42 trigIDMap.insert({ moduleID, std::make_pair(trigID_left, trigID_right) });
auto get_trig_id_map() const -> const auto &
void set_trig_id_map(TrigIDMap trigIDMap)
void set_num_of_planes(int num_of_plane)
void set_offspill_tpat_pos(int pos)
std::unordered_map< unsigned int, std::pair< unsigned int, unsigned int > > TrigIDMap
auto get_num_of_planes() const -> int
void set_exp_ids(const std::string &exp_ids)
auto get_offspill_tpat_pos() const -> int
auto get_exp_ids() const -> const auto &
Simulation of NeuLAND Bar/Paddle.
void from_json(const nlohmann::ordered_json &json_obj, GeneratorFactory::Options &options)
void to_json(nlohmann::ordered_json &json_obj, const GeneratorFactory::Options &options)