BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
get_parameter_value_json.C
Go to the documentation of this file.
1// macro for getting parameter value in JSON format
3{
4 // get 'on' parameter value (boolean value)
6 "DCH1", "my_json", 1, 77); //(detector_name, parameter_name, period_number, run_number)
7 if (pDetectorParameter == nullptr) {
8 cout << "\nMacro finished with errors" << endl;
9 return;
10 }
11
12 JsonValue* json_value = (JsonValue*)pDetectorParameter->GetValue();
13 cout << "JSON value for DCH1:my_json" << endl << json_value->value.dump(4) << endl;
14
15 // clean memory after work
16 delete json_value;
17 delete pDetectorParameter;
18
19 cout << "\nMacro finished successfully" << endl;
20}
int GetValue(vector< UniValue * > &parameter_value)
get value of detector parameter presented by an array
static UniDetectorParameter * GetDetectorParameter(int value_id)
get detector parameter from the database
void get_parameter_value_json()