Project
Loading...
Searching...
No Matches
OrbitInfo.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 O2_MCH_BASE_ORBITINFO_H_
18#define O2_MCH_BASE_ORBITINFO_H_
19
20#include <gsl/span>
21
22#include "Rtypes.h"
23
24namespace o2
25{
26namespace mch
27{
28
29// \class OrbitInfo
32{
33 public:
34 OrbitInfo() = default;
35
36 OrbitInfo(gsl::span<const std::byte> rdhBuffer);
37 ~OrbitInfo() = default;
38
39 uint64_t get() const { return mOrbitInfo; }
40 uint32_t getOrbit() const { return (mOrbitInfo & 0xFFFFFFFF); }
41 uint8_t getLinkID() const { return ((mOrbitInfo >> 32) & 0xFF); }
42 uint16_t getFeeID() const { return ((mOrbitInfo >> 40) & 0xFF); }
43
44 friend bool operator==(const OrbitInfo& o1, const OrbitInfo& o2);
45 friend bool operator!=(const OrbitInfo& o1, const OrbitInfo& o2);
46 friend bool operator<(const OrbitInfo& o1, const OrbitInfo& o2);
47
48 private:
49 uint64_t mOrbitInfo = {0};
50
51 ClassDefNV(OrbitInfo, 1);
52}; //class OrbitInfo
53
54bool operator==(const OrbitInfo& o1, const OrbitInfo& o2);
55bool operator!=(const OrbitInfo& o1, const OrbitInfo& o2);
56bool operator<(const OrbitInfo& o1, const OrbitInfo& o2);
57
58} //namespace mch
59} //namespace o2
60#endif // O2_MCH_BASE_ORBITINFO_H_
MCH orbit info implementation.
Definition OrbitInfo.h:32
friend bool operator==(const OrbitInfo &o1, const OrbitInfo &o2)
Definition OrbitInfo.cxx:33
uint64_t get() const
Definition OrbitInfo.h:39
uint32_t getOrbit() const
Definition OrbitInfo.h:40
~OrbitInfo()=default
uint8_t getLinkID() const
Definition OrbitInfo.h:41
friend bool operator<(const OrbitInfo &o1, const OrbitInfo &o2)
Definition OrbitInfo.cxx:43
uint16_t getFeeID() const
Definition OrbitInfo.h:42
friend bool operator!=(const OrbitInfo &o1, const OrbitInfo &o2)
Definition OrbitInfo.cxx:38
bool operator==(const DsChannelId &a, const DsChannelId &b)
Definition DsChannelId.h:65
bool operator<(const DsChannelId &a, const DsChannelId &b)
Definition DsChannelId.h:67
bool operator!=(const DsChannelId &a, const DsChannelId &b)
Definition DsChannelId.h:66
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...