BmnRoot
Loading...
Searching...
No Matches
DigiRunHeader.cxx
Go to the documentation of this file.
1#include "DigiRunHeader.h"
2
3#include "FairLogger.h"
4
6 : fPeriodId(0)
7 , fRunId(0)
8 , fEventCnt(0)
9{}
10
11DigiRunHeader::DigiRunHeader(UInt_t period_id, UInt_t run_id, TTimeStamp run_start_time, TTimeStamp run_end_time)
12 : fPeriodId(period_id)
13 , fRunId(run_id)
14 , fEventCnt(0)
15 , fRunStartTime(run_start_time)
16 , fRunEndTime(run_end_time)
17{}
18
20
21ULong64_t DigiRunHeader::GetScaler(string name)
22{
23 auto it = scalers_name2index_map.find(name);
24 if (it == scalers_name2index_map.end()) {
25 LOG(error) << "Scaler " << name << " not found\n";
26 return 0;
27 }
28 return fScalersVec[it->second];
29}
30
31ULong64_t DigiRunHeader::GetRawT0Counter(string name, UInt_t ch)
32{
33 auto it = fT0Map.find(make_pair(name, ch));
34 if (it == fT0Map.end()) {
35 printf("T0 counter %s.%02u not found!", name.c_str(), ch);
36 return 0;
37 } else {
38 return rawt0_cntrs[it->second];
39 }
40}
41
42// ULong64_t DigiRunHeader::GetTrcCounter(string name)
43//{
44// auto it = fTrigBitsMap.find(name);
45// if (it == fTrigBitsMap.end()) {
46// printf("TRC counter %s not found!", name.c_str());
47// return 0;
48// } else {
49// return counters[it->second];
50// }
51// }
ULong64_t GetScaler(string name)
ULong64_t GetRawT0Counter(string name, UInt_t ch=0)
virtual ~DigiRunHeader()