Project
Loading...
Searching...
No Matches
Digit.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
15
16#ifndef ALICEO2_TPC_DIGIT_H_
17#define ALICEO2_TPC_DIGIT_H_
18
19#include "GPUCommonRtypes.h"
20#include "GPUCommonDef.h"
22#ifndef GPUCA_GPUCODE_DEVICE
23#include <climits>
24#endif
25
26namespace o2
27{
28namespace tpc
29{
35class Digit : public DigitBase
36{
37 public:
39 GPUdDefault() Digit() = default;
40
46 GPUdi() Digit(int cru, float charge, int row, int pad, int time);
47
49 GPUdDefault() ~Digit() = default;
50
54 GPUdi() int getCharge() const { return static_cast<int>(mCharge); }
55
58 GPUdi() float getChargeFloat() const { return mCharge; }
59
60 GPUdi() void setCharge(float q) { mCharge = q; }
61
64 GPUdi() int getCRU() const { return mCRU; }
65
68 GPUdi() int getRow() const { return mRow; }
69
72 GPUdi() int getPad() const { return mPad; }
73
74 protected:
75 float mCharge = 0.f;
76 unsigned short mCRU = USHRT_MAX;
77 unsigned char mRow = UCHAR_MAX;
78 unsigned char mPad = UCHAR_MAX;
79
81};
82
83GPUdi() Digit::Digit(int cru, float charge, int row, int pad, int time)
84 : DigitBase(time),
85 mCharge(charge),
86 mCRU(cru),
87 mRow(row),
88 mPad(pad)
89{
90}
91
92} // namespace tpc
93} // namespace o2
94
95#endif // ALICEO2_TPC_DIGIT_H_
int16_t charge
Definition RawEventData.h:5
int16_t time
Definition RawEventData.h:4
GPUdDefault() Digit()=default
Default constructor.
GPUdi() void setCharge(float q)
Definition Digit.h:60
float int int pad
Definition Digit.h:46
float int row
Definition Digit.h:46
GPUdi() float getChargeFloat() const
Definition Digit.h:58
unsigned short mCRU
CRU of the Digit.
Definition Digit.h:76
ClassDefNV(Digit, 1)
unsigned char mPad
Pad of the Digit.
Definition Digit.h:78
float mCharge
ADC value of the Digit.
Definition Digit.h:75
GPUdi() int getCRU() const
Definition Digit.h:64
float charge
Definition Digit.h:46
unsigned char mRow
Global pad row of the Digit.
Definition Digit.h:77
GPUdi() Digit(int cru
GPUdi() int getRow() const
Definition Digit.h:68
float int int int time
Definition Digit.h:46
GPUdi() int getPad() const
Definition Digit.h:72
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GPUdi() T BetheBlochAleph(T bg
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< int > row