Project
Loading...
Searching...
No Matches
TDCCalibData.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include "Framework/Logger.h"
14
15using namespace o2::zdc;
16
18{
19 for (int i = 0; i < NTDC; i++) {
20 LOGF(info, "%s entries: %d", CTDC[i], entries[i]);
21 }
22}
23
25{
26
27 for (int32_t ih = 0; ih < NTDC; ih++) {
28 entries[ih] = entries[ih] + other.entries[ih];
29 }
30
31 if (mCTimeBeg == 0 || other.mCTimeBeg < mCTimeBeg) {
32 mCTimeBeg = other.mCTimeBeg;
33 }
34 if (other.mCTimeEnd > mCTimeEnd) {
35 mCTimeEnd = other.mCTimeEnd;
36 }
37#ifdef O2_ZDC_DEBUG
38 LOGF(info, "TDCCalibData [%llu : %llu]: %s=%d %s=%d %s=%d %s=%d %s=%d %s=%d %s=%d %s=%d %s=%d %s=%d", mCTimeBeg, mCTimeEnd, CTDC[0], getEntries(0), CTDC[1], getEntries(1),
39 CTDC[2], getEntries(2), CTDC[3], getEntries(3), CTDC[4], getEntries(4), CTDC[5], getEntries(5), CTDC[6], getEntries(6), CTDC[7], getEntries(7),
40 CTDC[8], getEntries(8), CTDC[9], getEntries(9));
41#endif
42 return *this;
43}
44
46{
47 mCTimeBeg = ctime;
48 mCTimeEnd = ctime;
49#ifdef O2_ZDC_DEBUG
50 LOGF(info, "TDCCalibData::setCreationTime %llu", ctime);
51#endif
52}
53
54int TDCCalibData::getEntries(int ih) const
55{
56 if (ih < 0 || ih >= NTDC) {
57 LOGF(error, "TDCCalibData::getEntries ih = %d is out of range", ih);
58 return 0;
59 }
60 return entries[ih];
61}
int32_t i
TDC calibration intermediate data.
uint64_t mCTimeBeg
ZNAC, ZNAS, ZPAC, ZPAS, ZEM1, ZEM2, ZNCC, ZNCS, ZPCC, ZPCS.
TDCCalibData & operator+=(const TDCCalibData &other)
int getEntries(int ih) const
uint64_t mCTimeEnd
Time of processed time frame.
void setCreationTime(uint64_t ctime)
static constexpr const char * CTDC[NTDC]
Time of processed time frame.
static constexpr int NTDC
VectorOfTObjectPtrs other