Project
Loading...
Searching...
No Matches
DigitPos.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 AliceO2_TPC_DigitPos_H
13#define AliceO2_TPC_DigitPos_H
14
15#include "DataFormatsTPC/Defs.h"
16#include "TPCBase/CRU.h"
17#include "TPCBase/PadPos.h"
18#include "TPCBase/PadSecPos.h"
19
20namespace o2
21{
22namespace tpc
23{
24
26{
27 public:
28 DigitPos() = default;
29 DigitPos(CRU c, PadPos pad) : mCRU(c), mPadPos(pad) {}
30 const CRU& getCRU() const { return mCRU; }
31 CRU& cru() { return mCRU; }
32 PadPos getPadPos() const { return mPadPos; }
33 PadPos getGlobalPadPos() const;
34 PadSecPos getPadSecPos() const;
35
36 PadPos& padPos() { return mPadPos; }
37
38 bool isValid() const { return mPadPos.isValid(); }
39
40 bool operator==(const DigitPos& other) const { return (mCRU == other.mCRU) && (mPadPos == other.mPadPos); }
41 bool operator!=(const DigitPos& other) const { return (mCRU != other.mCRU) || (mPadPos != other.mPadPos); }
42 bool operator<(const DigitPos& other) const { return (mCRU < other.mCRU) && (mPadPos < other.mPadPos); }
43
44 private:
45 CRU mCRU{};
46 PadPos mPadPos{};
47};
48
49} // namespace tpc
50} // namespace o2
51#endif
uint32_t c
Definition RawData.h:2
const CRU & getCRU() const
Definition DigitPos.h:30
bool operator==(const DigitPos &other) const
Definition DigitPos.h:40
PadSecPos getPadSecPos() const
Definition DigitPos.cxx:28
bool isValid() const
Definition DigitPos.h:38
PadPos getGlobalPadPos() const
Definition DigitPos.cxx:20
PadPos & padPos()
Definition DigitPos.h:36
bool operator!=(const DigitPos &other) const
Definition DigitPos.h:41
bool operator<(const DigitPos &other) const
Definition DigitPos.h:42
DigitPos()=default
DigitPos(CRU c, PadPos pad)
Definition DigitPos.h:29
PadPos getPadPos() const
Definition DigitPos.h:32
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other