ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoRDO
src
Status.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <iostream>
6
#include "
L1TopoRDO/Status.h
"
7
#include "
L1TopoRDO/Helpers.h
"
8
#include "
L1TopoRDO/BlockTypes.h
"
9
10
namespace
L1Topo
{
11
12
Status::Status
(
const
uint32_t
overflow
,
const
uint32_t
crc
)
13
:
m_overflow
(
overflow
),
m_crc
(
crc
),
m_word
(0) {
14
this->
encode
();
15
}
16
17
Status::Status
(
const
uint32_t
word
)
18
:
m_overflow
(0),
m_crc
(0),
m_word
(
word
) {
19
this->
decode
();
20
}
21
22
void
Status::encode
(){
23
m_word
=
static_cast<
uint32_t
>
(
L1Topo::BlockTypes::STATUS
) << 28;
24
m_word
|= (
m_overflow
& 0x1) << 27;
25
m_word
|= (
m_crc
& 0x1) << 26;
26
}
27
28
void
Status::decode
(){
29
m_overflow
= (
m_word
>> 27) & 0x1;
30
m_crc
= (
m_word
>> 26) & 0x1;
31
}
32
33
uint32_t
Status::word
()
const
{
34
return
m_word
;
35
}
36
37
uint32_t
Status::overflow
()
const
{
38
return
m_overflow
;
39
}
40
41
uint32_t
Status::crc
()
const
{
42
return
m_crc
;
43
}
44
std::ostream&
operator<<
(std::ostream& os,
const
Status
& s) {
45
os <<
" Status: overflow "
<< s.overflow() <<
" crc mismatch "
<< s.crc();
46
return
os;
47
}
48
49
}
// namespace L1Topo
50
BlockTypes.h
Status.h
Helpers.h
L1Topo::Status
Represents the L1Topo status word of the L1Topo DAQ header, with decoder and encoder.
Definition
Status.h:19
L1Topo::Status::crc
uint32_t crc() const
access method
Definition
Status.cxx:41
L1Topo::Status::m_crc
uint32_t m_crc
CRC mismatch flag.
Definition
Status.h:40
L1Topo::Status::m_overflow
uint32_t m_overflow
overflow flag
Definition
Status.h:38
L1Topo::Status::encode
void encode()
method used by constructor to encode word
Definition
Status.cxx:22
L1Topo::Status::word
uint32_t word() const
access method
Definition
Status.cxx:33
L1Topo::Status::Status
Status(const uint32_t overflow, const uint32_t crc)
Construct from contents and encode word.
Definition
Status.cxx:12
L1Topo::Status::m_word
uint32_t m_word
The raw data representation.
Definition
Status.h:42
L1Topo::Status::decode
void decode()
method used by constructor to decode word
Definition
Status.cxx:28
L1Topo::Status::overflow
uint32_t overflow() const
access method
Definition
Status.cxx:37
L1Topo
Definition
BlockTypes.h:11
L1Topo::BlockTypes::STATUS
@ STATUS
Definition
BlockTypes.h:17
L1Topo::operator<<
std::ostream & operator<<(std::ostream &, const Error)
Helper to print errors as text rather than numbers.
Definition
Error.cxx:8
Generated on
for ATLAS Offline Software by
1.17.0