Project
Loading...
Searching...
No Matches
TempCalibParamSM.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 TempCalibParamSM::addTempCalibParamPerSM(unsigned short iSM, float ParamSM)
23{
24 mTempCalibParamsPerSM[iSM] = ParamSM;
25}
26
27float TempCalibParamSM::getTempCalibParamPerSM(unsigned short iSM) const
28{
29 return mTempCalibParamsPerSM[iSM];
30}
31
33{
34 auto hist = new TH1F("TempCalibParamSM", "Temp Calibration Params per SM", 19, 0, 19);
35 hist->SetDirectory(nullptr);
36
37 for (std::size_t iSM{0}; iSM < mTempCalibParamsPerSM.size(); ++iSM) {
38 hist->SetBinContent(iSM + 1, mTempCalibParamsPerSM[iSM]);
39 }
40
41 return hist;
42}
43
45{
46 return mTempCalibParamsPerSM == other.mTempCalibParamsPerSM;
47}
float getTempCalibParamPerSM(unsigned short iSM) const
Get the temperature calibration coefficient for a certain SM.
bool operator==(const TempCalibParamSM &other) const
Comparison of two temperature calibration coefficients per SM.
TH1 * getHistogramRepresentation() const
Convert the temperature calibration coefficient per SM arrays to histograms.
VectorOfTObjectPtrs other