Project
Loading...
Searching...
No Matches
Digits.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
15
16#ifndef _CTP_DIGITS_H_
17#define _CTP_DIGITS_H_
20#include <bitset>
21#include <iosfwd>
22
23namespace o2
24{
25namespace ctp
26{
28static constexpr int CRUPageAlignment = 16;
29static constexpr uint32_t GBTLinkIDIntRec = 0;
30static constexpr uint32_t NIntRecPayload = 48 + 12;
31static constexpr uint32_t GBTLinkIDClassRec = 1;
32static constexpr uint32_t NClassPayload = 64 + 12;
33static constexpr uint32_t NGBT = 80;
34static constexpr std::uint32_t NumOfHBInTF = 128;
35static constexpr uint32_t NRUNS = 16;
36typedef std::bitset<NGBT> gbtword80_t;
37typedef std::bitset<128> gbtword128_t;
38//
39static constexpr std::uint32_t CTP_NINPUTS = 48;
40static constexpr std::uint32_t CTP_NCLASSES = 64;
41static constexpr std::uint32_t CTP_MAXTRIGINPPERDET = 5;
50struct CTPDigit {
52 std::bitset<CTP_NINPUTS> CTPInputMask;
53 std::bitset<CTP_NCLASSES> CTPClassMask;
54 void printStream(std::ostream& stream) const;
57 bool isInputEmpty() const { return CTPInputMask.count() == 0; }
58 bool isClassEmpty() const { return CTPClassMask.count() == 0; }
59 bool isEmpty() const { return isInputEmpty() && isClassEmpty(); }
60 bool operator==(const CTPDigit& d) const
61 {
63 }
64
66};
67
68std::ostream& operator<<(std::ostream& os, const CTPDigit& d);
69
72 std::bitset<CTP_MAXTRIGINPPERDET> inputsMask;
74 ClassDefNV(CTPInputDigit, 1)
75};
76} // namespace ctp
77
78namespace framework
79{
80template <typename T>
81struct is_messageable;
82template <>
83struct is_messageable<o2::ctp::CTPDigit> : std::true_type {
84};
85} // namespace framework
86
87} // namespace o2
88#endif //_CTP_DIGITS_H
GLuint GLuint stream
Definition glcorearb.h:1806
GLint GLuint mask
Definition glcorearb.h:291
std::bitset< NGBT > gbtword80_t
Definition Digits.h:36
std::ostream & operator<<(std::ostream &in, const CTPConfiguration &conf)
std::bitset< 128 > gbtword128_t
Definition Digits.h:37
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ClassDefNV(CTPDigit, 3)
std::bitset< CTP_NCLASSES > CTPClassMask
Definition Digits.h:53
o2::InteractionRecord intRecord
Definition Digits.h:51
bool operator==(const CTPDigit &d) const
Definition Digits.h:60
void setInputMask(gbtword80_t mask)
Definition Digits.cxx:31
bool isInputEmpty() const
Definition Digits.h:57
std::bitset< CTP_NINPUTS > CTPInputMask
Definition Digits.h:52
bool isClassEmpty() const
Definition Digits.h:58
bool isEmpty() const
Definition Digits.h:59
void printStream(std::ostream &stream) const
Definition Digits.cxx:26
void setClassMask(gbtword80_t mask)
Definition Digits.cxx:37
o2::detectors::DetID::ID detector
Definition Digits.h:73
o2::InteractionRecord intRecord
Definition Digits.h:71
std::bitset< CTP_MAXTRIGINPPERDET > inputsMask
Definition Digits.h:72