BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
get_lorShift.C
Go to the documentation of this file.
1void 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}
int i
Definition P4_F32vec4.h:22
int Int_t
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_lorShift(Int_t runPeriod=6, Int_t runNumber=1217)
Definition get_lorShift.C:1