BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
get_parameter_value.C
Go to the documentation of this file.
1// macro for getting parameter value (if parameter exist - you could check existing parameters by
2// 'UniParameter::PrintAll()' function)
4{
5 // get 'on' parameter value (boolean value)
7 "ZDC", "on", 1, 77); //(detector_name, parameter_name, period_number, run_number)
8 if (pDetectorParameter == nullptr) {
9 cout << "\nMacro finished with errors" << endl;
10 return;
11 }
12
13 BoolValue* is_on = (BoolValue*)pDetectorParameter->GetValue();
14 if (is_on->value)
15 cout << "Detector DCH1 was turned on in run n.77" << endl;
16 else
17 cout << "Detector DCH1 was turned off in run n.77" << endl;
18
19 // clean memory after work
20 delete is_on;
21 delete pDetectorParameter;
22
23 cout << "\nMacro finished successfully" << endl;
24}
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()
STRUCTURES for parameter storing corresponding enumValueType list.