BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
get_lorShift.C
Go to the documentation of this file.
1
void
get_lorShift
(
Int_t
runPeriod = 6,
Int_t
runNumber = 1217)
2
{
3
bool
return_error =
false
;
4
5
UniDetectorParameter
* pDetectorParameter =
6
UniDetectorParameter::GetDetectorParameter
(
"GEM"
,
"lorentz_shift"
, runPeriod, runNumber);
7
if
(pDetectorParameter ==
nullptr
)
8
return_error =
true
;
9
10
vector<UniValue*> shifts;
11
pDetectorParameter->
GetValue
(shifts);
12
13
for
(
int
i
= 0;
i
< shifts.size();
i
++) {
14
LorentzShiftValue
* pValue = (
LorentzShiftValue
*)shifts[
i
];
15
cout <<
"Stat. number: "
<< pValue->
number
<< endl;
16
for
(
int
j = 0; j < 3; j++)
17
cout << pValue->
ls
[j] << endl;
18
}
19
20
// clean memory
21
for
(
int
i
= 0;
i
< shifts.size();
i
++)
22
delete
shifts[
i
];
23
if
(pDetectorParameter)
24
delete
pDetectorParameter;
25
26
if
(return_error)
27
cout <<
"\nMacro finished with errors"
<< endl;
28
else
29
cout <<
"\nMacro finished successfully"
<< endl;
30
}
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
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_lorShift
void get_lorShift(Int_t runPeriod=6, Int_t runNumber=1217)
Definition
get_lorShift.C:1
LorentzShiftValue
Definition
uni_db_structures.h:315
LorentzShiftValue::number
int32_t number
Definition
uni_db_structures.h:316
LorentzShiftValue::ls
double ls[3]
Definition
uni_db_structures.h:317
database
examples
uni_db
GEM
get_lorShift.C
Generated on
for BmnRoot by
1.17.0