R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandAppOptionJson.h
Go to the documentation of this file.
1#pragma once
2
5#include <R3BNeulandSimApp.h>
6
8{
9 using json = nlohmann::ordered_json;
10 void to_json(json& json_obj, const Params& param);
11
12 void from_json(const json& json_obj, Params& param);
13
14} // namespace R3B::Digitizing::Neuland::Tamex
15namespace R3B::Neuland
16{
17 template <typename Option>
18 void to_json(nlohmann::ordered_json& json_obj, const Option& option)
19 {
20 json_obj =
21 nlohmann::ordered_json{ { "enable", option.enable }, { "read", option.read }, { "write", option.write } };
22 }
23
24 template <typename Option>
25 void from_json(const nlohmann::ordered_json& json_obj, Option& option)
26 {
27 json_obj.at("enable").get_to(option.enable);
28 json_obj.at("read").get_to(option.read);
29 json_obj.at("write").get_to(option.write);
30 }
31
32 // =============================================================================================
33 // general options:
34 template <>
35 void to_json(nlohmann::ordered_json& json_obj, const Application::Options& option);
36
37 template <>
38 void from_json(const nlohmann::ordered_json& json_obj, Application::Options& option);
39
40 template <>
41 void to_json(nlohmann::ordered_json& json_obj, const Application::Options::Input& option);
42
43 template <>
44 void from_json(const nlohmann::ordered_json& json_obj, Application::Options::Input& option);
45
46 template <>
47 void to_json(nlohmann::ordered_json& json_obj, const Application::Options::Output& option);
48
49 template <>
50 void from_json(const nlohmann::ordered_json& json_obj, Application::Options::Output& option);
51
52 // =============================================================================================
53 // Anaysis options:
54 template <>
55 void to_json(nlohmann::ordered_json& json_obj, const AnalysisApplication::Options& option);
56
57 template <>
58 void from_json(const nlohmann::ordered_json& json_obj, AnalysisApplication::Options& option);
59
60 template <>
61 void to_json(nlohmann::ordered_json& json_obj, const AnalysisApplication::Options::Tasks& option);
62
63 template <>
64 void from_json(const nlohmann::ordered_json& json_obj, AnalysisApplication::Options::Tasks& option);
65
66 // =============================================================================================
67 // tasks specialization:
68 template <>
69 void to_json(nlohmann::ordered_json& json_obj, const AnalysisApplication::Options::Tasks::Digi& option);
70
71 template <>
72 void from_json(const nlohmann::ordered_json& json_obj, AnalysisApplication::Options::Tasks::Digi& option);
73
74 template <>
75 void to_json(nlohmann::ordered_json& json_obj, const AnalysisApplication::Options::Tasks::MultiTrain& option);
76
77 template <>
78 void from_json(const nlohmann::ordered_json& json_obj, AnalysisApplication::Options::Tasks::MultiTrain& option);
79
80 template <>
81 void to_json(nlohmann::ordered_json& json_obj, const AnalysisApplication::Options::Tasks::NeutronRValue& option);
82
83 template <>
84 void from_json(const nlohmann::ordered_json& json_obj, AnalysisApplication::Options::Tasks::NeutronRValue& option);
85
86 template <>
87 void to_json(nlohmann::ordered_json& json_obj, const AnalysisApplication::Options::Tasks::Cal2HitParTask& option);
88
89 template <>
90 void from_json(const nlohmann::ordered_json& json_obj, AnalysisApplication::Options::Tasks::Cal2HitParTask& option);
91
92 // =============================================================================================
93 // Simuation options:
94 template <>
95 void to_json(nlohmann::ordered_json& json_obj, const SimulationApplication::Options& option);
96
97 template <>
98 void from_json(const nlohmann::ordered_json& json_obj, SimulationApplication::Options& option);
99
100 template <>
101 void to_json(nlohmann::ordered_json& json_obj, const SimulationApplication::Options::Simulation& option);
102
103 template <>
104 void from_json(const nlohmann::ordered_json& json_obj, SimulationApplication::Options::Simulation& option);
105
106 template <>
107 void to_json(nlohmann::ordered_json& json_obj, const SimulationApplication::Options::Simulation::Generator& option);
108
109 template <>
110 void from_json(const nlohmann::ordered_json& json_obj,
111 SimulationApplication::Options::Simulation::Generator& option);
112
113 template <>
114 void to_json(nlohmann::ordered_json& json_obj, const SimulationApplication::Options::Detector& option);
115
116 template <>
117 void from_json(const nlohmann::ordered_json& json_obj, SimulationApplication::Options::Detector& option);
118
119 // =============================================================================================
120 // Detector options:
121
122 template <>
123 void to_json(nlohmann::ordered_json& json_obj, const SimulationApplication::Options::Detector::Cave& option);
124
125 template <>
126 void from_json(const nlohmann::ordered_json& json_obj, SimulationApplication::Options::Detector::Cave& option);
127
128 template <>
129 void to_json(nlohmann::ordered_json& json_obj, const SimulationApplication::Options::Detector::Neuland& option);
130
131 template <>
132 void from_json(const nlohmann::ordered_json& json_obj, SimulationApplication::Options::Detector::Neuland& option);
133} // namespace R3B::Neuland
void from_json(const json &json_obj, Params &param)
void to_json(json &json_obj, const Params &param)
Simulation of NeuLAND Bar/Paddle.
void from_json(const nlohmann::ordered_json &json_obj, MinimizerLimVar &option)
void to_json(nlohmann::ordered_json &json_obj, const MinimizerLimVar &option)