Project
Loading...
Searching...
No Matches
DigitD0.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_MCH_DEVIO_DIGITS_DIGIT_D0_H
13#define O2_MCH_DEVIO_DIGITS_DIGIT_D0_H
14
15#include <fstream>
16#include <vector>
17
19{
20struct DigitD0 {
21 int32_t tfTime{0};
22 uint16_t nofSamples{0};
23 int detID{0};
24 int padID{0};
25 uint32_t adc{0};
26
27 void setNofSamples(uint16_t n) { nofSamples = (nofSamples & 0x8000) + (n & 0x7FFF); }
28 uint16_t getNofSamples() const { return (nofSamples & 0x7FFF); }
29
30 void setSaturated(bool sat) { nofSamples = sat ? nofSamples | 0x8000 : nofSamples & 0x7FFF; }
31 bool isSaturated() const { return ((nofSamples & 0x8000) > 0); }
32};
33
34} // namespace o2::mch::io::impl
35
36#endif
GLdouble n
Definition glcorearb.h:1982
bool isSaturated() const
Definition DigitD0.h:31
int padID
ID of the Detection Element to which the digit corresponds to.
Definition DigitD0.h:24
uint32_t adc
PadIndex to which the digit corresponds to.
Definition DigitD0.h:25
uint16_t getNofSamples() const
Definition DigitD0.h:28
uint16_t nofSamples
time since the beginning of the time frame, in bunch crossing units
Definition DigitD0.h:22
int detID
number of samples in the signal + saturated bit
Definition DigitD0.h:23
void setNofSamples(uint16_t n)
Amplitude of signal.
Definition DigitD0.h:27
void setSaturated(bool sat)
Definition DigitD0.h:30