BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
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)
3
void
get_parameter_value
()
4
{
5
// get 'on' parameter value (boolean value)
6
UniDetectorParameter
* pDetectorParameter =
UniDetectorParameter::GetDetectorParameter
(
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
}
UniDetectorParameter
Definition
UniDetectorParameter.h:23
UniDetectorParameter::GetValue
int GetValue(vector< UniValue * > ¶meter_value)
get value of detector parameter presented by an array
Definition
UniDetectorParameter.cxx:1109
UniDetectorParameter::GetDetectorParameter
static UniDetectorParameter * GetDetectorParameter(int value_id)
get detector parameter from the database
Definition
UniDetectorParameter.cxx:165
get_parameter_value
void get_parameter_value()
Definition
get_parameter_value.C:3
BoolValue
STRUCTURES for parameter storing corresponding enumValueType list.
Definition
uni_db_structures.h:60
BoolValue::value
uint8_t value
Definition
uni_db_structures.h:61
install
database
uni_db
examples
get_parameter_value.C
Generated on
for BmnRoot by
1.17.0