Project
Loading...
Searching...
No Matches
HeartBeatPacket.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_HEARTBEATPACKET_H_
18#define O2_MCH_BASE_HEARTBEATPACKET_H_
19
20#include "Rtypes.h"
21
22namespace o2
23{
24namespace mch
25{
26
27// \class HeartBeatPacket
30{
31 public:
32 HeartBeatPacket() = default;
33
34 HeartBeatPacket(int solarid, int dsid, int chip, uint32_t bc) : mSolarID(solarid), mChipID(dsid * 2 + (chip % 2)), mBunchCrossing(bc) {}
35 ~HeartBeatPacket() = default;
36
37 uint16_t getSolarID() const { return mSolarID; }
38 uint8_t getDsID() const { return mChipID / 2; }
39 uint8_t getChip() const { return mChipID % 2; }
40
41 uint32_t getBunchCrossing() const { return mBunchCrossing; }
42
43 private:
44 uint16_t mSolarID{0};
45 uint8_t mChipID{0};
46 uint32_t mBunchCrossing{0};
47
48 ClassDefNV(HeartBeatPacket, 1);
49}; //class HeartBeatPacket
50
51} //namespace mch
52} //namespace o2
53#endif // O2_MCH_BASE_HEARTBEATPACKET_H_
uint64_t bc
Definition RawEventData.h:5
MCH heart-beat packet implementation.
uint16_t getSolarID() const
uint32_t getBunchCrossing() const
HeartBeatPacket(int solarid, int dsid, int chip, uint32_t bc)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...