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
17#ifndef ALICEO2_MCH_BASE_DIGIT_H_
18#define ALICEO2_MCH_BASE_DIGIT_H_
19
20#include "Rtypes.h"
21#include <iosfwd>
22
23namespace o2
24{
25namespace mch
26{
27
28// \class Digit
30class Digit
31{
32 public:
33 Digit() = default;
34
35 Digit(int detid, int pad, uint32_t adc, int32_t time, uint16_t nSamples = 1, bool saturated = false);
36 ~Digit() = default;
37
38 bool operator==(const Digit&) const;
39 bool operator!=(const Digit& other) const { return !(*this == other); }
40 bool operator<(const Digit&) const;
41
42 // time in bunch crossing units, relative to the beginning of the TimeFrame
43 void setTime(int32_t t) { mTFtime = t; }
44 int32_t getTime() const { return mTFtime; }
45
46 void setNofSamples(uint16_t n);
47 uint16_t getNofSamples() const;
48
49 void setSaturated(bool sat);
50 bool isSaturated() const;
51
52 int getDetID() const { return mDetID; }
53
54 int getPadID() const { return mPadID; }
55 void setPadID(int padID) { mPadID = padID; }
56
57 uint32_t getADC() const { return mADC; }
58 void setADC(uint32_t adc) { mADC = adc; }
59
60 private:
61 int32_t mTFtime;
62 uint16_t mNofSamples;
63 bool mIsSaturated;
64 int mDetID;
65 int mPadID;
66 uint32_t mADC;
67
68 ClassDefNV(Digit, 4);
69}; // class Digit
70
71std::ostream& operator<<(std::ostream& os, const Digit& d);
72
73} // namespace mch
74} // namespace o2
75#endif // ALICEO2_MCH_DIGIT_H_
int16_t time
Definition RawEventData.h:4
MCH digit implementation.
Definition Digit.h:31
bool operator<(const Digit &) const
Definition Digit.cxx:73
int getPadID() const
Definition Digit.h:54
~Digit()=default
int getDetID() const
Definition Digit.h:52
bool operator==(const Digit &) const
Definition Digit.cxx:63
void setSaturated(bool sat)
Definition Digit.cxx:58
uint16_t getNofSamples() const
Definition Digit.cxx:39
bool isSaturated() const
Definition Digit.cxx:44
bool operator!=(const Digit &other) const
Definition Digit.h:39
int32_t getTime() const
Definition Digit.h:44
void setPadID(int padID)
Definition Digit.h:55
Digit()=default
void setNofSamples(uint16_t n)
Definition Digit.cxx:49
void setADC(uint32_t adc)
Definition Digit.h:58
uint32_t getADC() const
Definition Digit.h:57
void setTime(int32_t t)
Definition Digit.h:43
GLdouble n
Definition glcorearb.h:1982
std::ostream & operator<<(std::ostream &os, const o2::dataformats::MeanVertexObject &o)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other
ArrayADC adc