Project
Loading...
Searching...
No Matches
OrbitInfo.cxx
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
16namespace o2::mch
17{
18
20
21OrbitInfo::OrbitInfo(gsl::span<const std::byte> rdhBuffer)
22{
23 auto& rdhAny = *reinterpret_cast<RDH*>(const_cast<std::byte*>(&(rdhBuffer[0])));
24 auto orbit = o2::raw::RDHUtils::getHeartBeatOrbit(rdhAny);
25 auto linkId = o2::raw::RDHUtils::getLinkID(rdhAny);
26 auto feeId = o2::raw::RDHUtils::getFEEID(rdhAny);
27
28 mOrbitInfo = orbit;
29 mOrbitInfo += ((static_cast<uint64_t>(linkId) << 32) & 0xFF00000000);
30 mOrbitInfo += ((static_cast<uint64_t>(feeId) << 40) & 0xFF0000000000);
31}
32
33bool operator==(const OrbitInfo& o1, const OrbitInfo& o2)
34{
35 return (o1.mOrbitInfo == o2.mOrbitInfo);
36}
37
38bool operator!=(const OrbitInfo& o1, const OrbitInfo& o2)
39{
40 return !(o1 == o2);
41}
42
43bool operator<(const OrbitInfo& o1, const OrbitInfo& o2)
44{
45 return (o1.mOrbitInfo < o2.mOrbitInfo);
46}
47
48} // namespace o2::mch
uint64_t orbit
Definition RawEventData.h:6
Definition of the RAW Data Header.
MCH orbit info implementation.
Definition OrbitInfo.h:32
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
bool operator!=(const observer_ptr< W1 > &p1, const observer_ptr< W2 > &p2)
bool operator<(const observer_ptr< W1 > &p1, const observer_ptr< W2 > &p2)
bool operator==(const observer_ptr< W1 > &p1, const observer_ptr< W2 > &p2)