BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
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
16
using namespace
std
;
17
18
/*
19
*
20
*/
21
void
read_tof1_inl
(
Int_t
period = 7,
Int_t
run = 4700)
22
{
23
24
// get parameter of TDC's map
25
UniDetectorParameter
* pDetectorParameter =
UniDetectorParameter::GetDetectorParameter
(
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
}
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
Double_t
double Double_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
std
Definition
json.hpp:4446
read_tof1_inl
void read_tof1_inl(Int_t period=7, Int_t run=4700)
Definition
read_tof1_inl.C:21
TdcInlValue
Definition
uni_db_structures.h:356
TdcInlValue::serial
uint32_t serial
Definition
uni_db_structures.h:357
database
examples
uni_db
TOF1
read_tof1_inl.C
Generated on
for BmnRoot by
1.17.0