Project
Loading...
Searching...
No Matches
TimeCalibParamL1Phase.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
13
14#include <fairlogger/Logger.h>
15
16#include <TH1.h>
17
18#include <iostream>
19
20using namespace o2::emcal;
21
22void TimeCalibParamL1Phase::addTimeCalibParamL1Phase(unsigned short iSM, unsigned char L1Phase)
23{
24 mTimeCalibParamsL1Phase[iSM] = L1Phase;
25}
26
27unsigned char TimeCalibParamL1Phase::getTimeCalibParamL1Phase(unsigned short iSM) const
28{
29 return mTimeCalibParamsL1Phase[iSM];
30}
31
33{
34 auto hist = new TH1C("hL1PhaseShift", "L1PhaseShift", 19, 0, 19);
35 hist->SetDirectory(nullptr);
36
37 for (std::size_t iSM{0}; iSM < mTimeCalibParamsL1Phase.size(); ++iSM) {
38 hist->SetBinContent(iSM + 1, mTimeCalibParamsL1Phase[iSM] - '0');
39 }
40
41 return hist;
42}
43
45{
46 return mTimeCalibParamsL1Phase == other.mTimeCalibParamsL1Phase;
47}
unsigned char getTimeCalibParamL1Phase(unsigned short iSM) const
Get the L1 phase for a certain SM.
bool operator==(const TimeCalibParamL1Phase &other) const
Comparison of two L1 phase shifts.
TH1 * getHistogramRepresentation() const
Convert the L1 phase shift per SM array to a histogram.
VectorOfTObjectPtrs other