ATLAS Offline Software
Loading...
Searching...
No Matches
L1TopoROD.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <ostream>
7#include "L1TopoRDO/Helpers.h"
8
9namespace L1Topo {
10
11 L1TopoROD::L1TopoROD(const uint32_t trailer1, const uint32_t trailer2)
12 :m_rodTrailer1(trailer1), m_rodTrailer2(trailer2) {
13 this->decode();
14 }
15
21
23 m_linkErrs = (L1Topo::decode(m_rodTrailer2,8,4) & 0xf) != 0;
24 m_ct = (L1Topo::decode(m_rodTrailer2,6,1) & 0xf) != 0;
25 m_pc = (L1Topo::decode(m_rodTrailer2,5,1) & 0xf) != 0;
26 m_hc = (L1Topo::decode(m_rodTrailer2,4,1) & 0xf) != 0;
27 m_pe = (L1Topo::decode(m_rodTrailer2,3,1) & 0xf) != 0;
28 m_lm = (L1Topo::decode(m_rodTrailer2,2,1) & 0xf) != 0;
29 m_hm = (L1Topo::decode(m_rodTrailer2,1,1) & 0xf) != 0;
30 m_pt = (L1Topo::decode(m_rodTrailer2,0,1) & 0xf) != 0;
31 }
32
33 uint32_t L1TopoROD::rodTrailer1() const{
34 return m_rodTrailer1;
35 }
36
37 uint32_t L1TopoROD::rodTrailer2() const{
38 return m_rodTrailer2;
39 }
40
41 uint32_t L1TopoROD::shelf() const{
42 return m_shelf;
43 }
44
45 uint32_t L1TopoROD::rod() const{
46 return m_rod;
47 }
48
49 uint32_t L1TopoROD::linkErrMap() const{
50 return m_linkErrMap;
51 }
52
53 uint32_t L1TopoROD::payloadLength() const{
54 return m_payloadLength;
55 }
56
57 uint32_t L1TopoROD::crc() const{
58 return m_crc;
59 }
60
61 bool L1TopoROD::linkErrs() const{
62 return m_linkErrs;
63 }
64
65 bool L1TopoROD::ct() const{
66 return m_ct;
67 }
68
69 bool L1TopoROD::pc() const{
70 return m_pc;
71 }
72
73 bool L1TopoROD::hc() const{
74 return m_hc;
75 }
76
77 bool L1TopoROD::pe() const{
78 return m_pe;
79 }
80
81 bool L1TopoROD::lm() const{
82 return m_lm;
83 }
84
85 bool L1TopoROD::hm() const{
86 return m_hm;
87 }
88
89 bool L1TopoROD::pt() const{
90 return m_pt;
91 }
92
93 std::ostream& operator<<(std::ostream& os, const L1TopoROD& s) {
94 os << std::hex << std::showbase << s.rodTrailer1() << std::dec <<
95 " Shelf= " << s.shelf() << " ROD= " << s.rod() <<
96 " Link error map= " << s.linkErrMap() << " Payload length= " << s.payloadLength() <<
97 "\n" <<
98 std::hex << std::showbase << s.rodTrailer2() << std::dec <<
99 " CRC= " << s.crc() << " Link errors= " << s.linkErrs() <<
100 " ROD errors: CT= " << s.ct() << " pc= " << s.pc() << " hc= " << s.hc() <<
101 " pe= " <<s.pe() << " lm= " << s.lm() << " hm= " << s.hm() << " pt= " << s.pt() <<
102 std::dec << "\n";
103 return os;
104 }
105
106} // namespace L1Topo
107
uint32_t shelf() const
Definition L1TopoROD.cxx:41
bool hm() const
Definition L1TopoROD.cxx:85
bool pc() const
Definition L1TopoROD.cxx:69
uint32_t crc() const
Definition L1TopoROD.cxx:57
uint32_t payloadLength() const
Definition L1TopoROD.cxx:53
L1TopoROD(const uint32_t trailer1, const uint32_t trailer2)
Construct from contents and decode trailers.
Definition L1TopoROD.cxx:11
void decode()
method used by constructor to decode word
Definition L1TopoROD.cxx:16
bool ct() const
Definition L1TopoROD.cxx:65
uint32_t rod() const
Definition L1TopoROD.cxx:45
uint32_t m_payloadLength
Definition L1TopoROD.h:46
bool pt() const
Definition L1TopoROD.cxx:89
uint32_t m_linkErrMap
Definition L1TopoROD.h:45
uint32_t m_rodTrailer1
variables
Definition L1TopoROD.h:40
bool pe() const
Definition L1TopoROD.cxx:77
uint32_t linkErrMap() const
Definition L1TopoROD.cxx:49
uint32_t rodTrailer2() const
Definition L1TopoROD.cxx:37
uint32_t rodTrailer1() const
access methods
Definition L1TopoROD.cxx:33
bool lm() const
Definition L1TopoROD.cxx:81
bool hc() const
Definition L1TopoROD.cxx:73
bool linkErrs() const
Definition L1TopoROD.cxx:61
uint32_t m_shelf
Definition L1TopoROD.h:43
uint32_t m_rodTrailer2
Definition L1TopoROD.h:41
uint32_t decode(const uint32_t &word, const uint32_t &offset, const uint32_t &size)
Helper function to decode word based on offset and size.
std::ostream & operator<<(std::ostream &, const Error)
Helper to print errors as text rather than numbers.
Definition Error.cxx:8