BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
read_tof1_inl.C
Go to the documentation of this file.
1/*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6
7/*
8 * File: read_tof1_inl.C
9 * Author: mikhailr
10 *
11 * Created on August 31, 2021, 3:06 PM
12 */
13
14#include <cstdlib>
15
16using namespace std;
17
18/*
19 *
20 */
21void read_tof1_inl(Int_t period = 7, Int_t run = 4700)
22{
23
24 // get parameter of TDC's map
26 "TOF1", "inl_test", period, run); //(detector_name, parameter_name, period_number, run_number)
27 if (pDetectorParameter == nullptr) {
28 cout << "\nMacro finished with errors" << endl;
29 return;
30 }
31
32 // Print parameters
33 vector<UniValue*> pValues;
34 pDetectorParameter->GetValue(pValues);
35 TdcInlValue* tempInl = new TdcInlValue;
36 Double_t SumInl;
37 for (int i = 0; i < pValues.size(); i++) {
38 tempInl = (TdcInlValue*)pValues.at(i);
39 cout << std::hex << tempInl->serial << std::dec << endl;
40 // for (Int_t i = 0; i < 72; i++){
41 // SumInl = 0;
42 // for (Int_t j = 0; j < 1024; j++){
43 // SumInl += tempInl->inl[i][j];
44 // }
45 // cout << " read " << i << " channel. InlSum = " << SumInl << endl;
46 // }
47 }
48
49 // clean memory after work
50 for (int i = 0; i < pValues.size(); i++)
51 delete pValues[i];
52 if (pDetectorParameter)
53 delete pDetectorParameter;
54
55 return;
56}
int i
Definition P4_F32vec4.h:22
int Int_t
double Double_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
Definition json.hpp:4446
void read_tof1_inl(Int_t period=7, Int_t run=4700)