R3BROOT
R3B analysis software
Toggle main menu visibility
Loading...
Searching...
No Matches
R3BNeulandJsonHeader.h
Go to the documentation of this file.
1
#pragma once
2
#include <nlohmann/json.hpp>
3
#include <nlohmann/json_fwd.hpp>
4
5
namespace
R3B::Neuland
6
{
7
template
<
typename
Option>
8
void
to_json
(nlohmann::ordered_json& json_obj,
const
Option
& option)
9
{
10
json_obj =
11
nlohmann::ordered_json{ {
"enable"
, option.enable }, {
"read"
, option.read }, {
"write"
, option.write } };
12
}
13
14
template
<
typename
Option>
15
void
from_json
(
const
nlohmann::ordered_json& json_obj,
Option
& option)
16
{
17
json_obj.at(
"enable"
).get_to(option.enable);
18
json_obj.at(
"read"
).get_to(option.read);
19
json_obj.at(
"write"
).get_to(option.write);
20
}
21
22
// template
23
}
// namespace R3B::Neuland
R3B::Option
Definition
R3BProgramOptions.h:105
R3B::Neuland
Simulation of NeuLAND Bar/Paddle.
Definition
R3BNeulandAnalysisApp.cxx:44
R3B::Neuland::from_json
void from_json(const nlohmann::ordered_json &json_obj, CalibrationBasePar &options)
Definition
R3BNeulandBaseParJson.h:21
R3B::Neuland::to_json
void to_json(nlohmann::ordered_json &json_obj, const CalibrationBasePar &options)
Definition
R3BNeulandBaseParJson.h:12
neuland
shared
R3BNeulandJsonHeader.h
Generated by
1.18.0