Project
Loading...
Searching...
No Matches
CalibParams.h
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
18
19#ifndef CPV_CALIBPARAMS_H
20#define CPV_CALIBPARAMS_H
21
22#include <array>
23#include "TObject.h"
24#include "CPVBase/Geometry.h"
25
26class TH2;
27
28namespace o2
29{
30
31namespace cpv
32{
33
35{
36 public:
38 CalibParams() = default;
39
41 CalibParams(short test);
42
44 ~CalibParams() = default;
45
49 float getGain(unsigned short cellID) const { return mGainCalib[cellID]; }
50
54 void setGain(unsigned short cellID, float c)
55 {
56 if (cellID < o2::cpv::Geometry::kNCHANNELS) {
57 mGainCalib[cellID] = c;
58 }
59 }
60
65 bool setGain(TH2* h, short module);
66
67 private:
68 static constexpr short NCHANNELS = 23040;
69 std::array<float, NCHANNELS> mGainCalib;
70 ClassDefNV(CalibParams, 2);
71};
72
73} // namespace cpv
74
75} // namespace o2
76#endif
uint32_t c
Definition RawData.h:2
Class for time synchronization of RawReader instances.
~CalibParams()=default
Destructor.
void setGain(unsigned short cellID, float c)
Set High Gain energy calibration coefficient.
Definition CalibParams.h:54
float getGain(unsigned short cellID) const
Get High Gain energy calibration coefficients.
Definition CalibParams.h:49
CalibParams()=default
Constructor.
static constexpr short kNCHANNELS
Definition Geometry.h:30
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
FIXME: do not use data model tables.