Project
Loading...
Searching...
No Matches
PadCalibrations.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
12#ifndef O2_TRD_PADCALIBRATIONS_H
13#define O2_TRD_PADCALIBRATIONS_H
14
16// //
17// TRD calibration class for parameters which are stored pad wise (1.2M entries) //
18// 2019 - Ported from various bits of AliRoot (SHTM) //
19// Similar CalPad //
21
22#include <array>
23
26
27namespace o2
28{
29namespace trd
30{
31
32template <class T>
34{
35 public:
37 ~PadCalibrations() = default;
38 //
39 const PadParameters<T>& getChamberPads(int roc) { return mReadoutChamber[roc]; }
40 T getValue(int roc, int col, int row) const { return mReadoutChamber[roc].getValue(col, row); }
41 void setPadValue(int roc, int col, int row, T value) { mReadoutChamber[roc].setValue(col, row, value); }
42 void setPadValue(int roc, int channel, T value) { mReadoutChamber[roc].setValue(channel, value); }
43
44 private:
45 std::array<PadParameters<T>, constants::MAXCHAMBER> mReadoutChamber;
46 ClassDefNV(PadCalibrations, 1);
47};
48
49template <class T>
51{
52 //
53 // CalPadStatus constructor
54 //
55 int chamberindex = 0;
56 for (auto& roc : mReadoutChamber) { // Range-for!
57 roc.init(chamberindex++);
58 }
59}
60
61} // namespace trd
62} // namespace o2
63#endif
Global TRD definitions and constants.
uint32_t roc
Definition RawData.h:3
uint32_t col
Definition RawData.h:4
void setPadValue(int roc, int col, int row, T value)
T getValue(int roc, int col, int row) const
const PadParameters< T > & getChamberPads(int roc)
void setPadValue(int roc, int channel, T value)
GLsizei const GLfloat * value
Definition glcorearb.h:819
constexpr int MAXCHAMBER
the maximum number of installed chambers
Definition Constants.h:30
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< int > row