ATLAS Offline Software
Loading...
Searching...
No Matches
L1Topo::Header Class Reference

Represents the L1Topo header word of the L1Topo DAQ data, with decoder and encoder. More...

#include <Header.h>

Collaboration diagram for L1Topo::Header:

Public Member Functions

 Header (const uint32_t version, const uint32_t active_fibres, const uint32_t payload_crc, const uint32_t fpga, const uint32_t last_block, const uint32_t bcn_sign, const uint32_t bcn_offset)
 Construct from contents and encode word.
 Header (uint32_t word)
 Construct with word and decode contents.
uint32_t version () const
 access method
uint32_t active_fibres () const
 access method
uint32_t payload_crc () const
 access method
uint32_t fpga () const
 access method
uint32_t last_block () const
 access method
uint32_t bcn_sign () const
 access method
uint32_t bcn_offset () const
 access method
int bcn () const
 access method
uint32_t word () const
 access method

Protected Member Functions

void decode ()
 method used by constructor to decode word
void encode ()
 method used by constructor to encode word

Private Attributes

uint32_t m_version
uint32_t m_active_fibres
uint32_t m_payload_crc
uint32_t m_fpga
uint32_t m_last_block
uint32_t m_bcn_sign
uint32_t m_bcn_offset
int m_bcn
uint32_t m_word

Detailed Description

Represents the L1Topo header word of the L1Topo DAQ data, with decoder and encoder.

Used to decode/encode the 32-bit word which contents include bunch crossing, FPGA, last block, active fibres and CRC.

Definition at line 18 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

Constructor & Destructor Documentation

◆ Header() [1/2]

L1Topo::Header::Header ( const uint32_t version,
const uint32_t active_fibres,
const uint32_t payload_crc,
const uint32_t fpga,
const uint32_t last_block,
const uint32_t bcn_sign,
const uint32_t bcn_offset )

Construct from contents and encode word.

Definition at line 12 of file L1Topo/L1TopoRDO/src/Header.cxx.

15 this->encode();
17 }
uint32_t payload_crc() const
access method
uint32_t fpga() const
access method
uint32_t active_fibres() const
access method
void encode()
method used by constructor to encode word
uint32_t bcn_offset() const
access method
uint32_t last_block() const
access method
uint32_t version() const
access method
uint32_t bcn_sign() const
access method
int signedBCN(const uint32_t sign, uint32_t offset)
helper function to return a relative bunch crossing as a signed integer, given the sign bit and offse...

◆ Header() [2/2]

L1Topo::Header::Header ( uint32_t word)

Construct with word and decode contents.

Definition at line 19 of file L1Topo/L1TopoRDO/src/Header.cxx.

20 : m_word(word){
21 this->decode();
23 }
uint32_t word() const
access method
void decode()
method used by constructor to decode word

Member Function Documentation

◆ active_fibres()

uint32_t L1Topo::Header::active_fibres ( ) const

access method

Definition at line 54 of file L1Topo/L1TopoRDO/src/Header.cxx.

54 {
55 return m_active_fibres;
56 }

◆ bcn()

int L1Topo::Header::bcn ( ) const

access method

Definition at line 72 of file L1Topo/L1TopoRDO/src/Header.cxx.

72 {
73 return m_bcn;
74 }

◆ bcn_offset()

uint32_t L1Topo::Header::bcn_offset ( ) const

access method

Definition at line 69 of file L1Topo/L1TopoRDO/src/Header.cxx.

69 {
70 return m_bcn_offset;
71 }

◆ bcn_sign()

uint32_t L1Topo::Header::bcn_sign ( ) const

access method

Definition at line 66 of file L1Topo/L1TopoRDO/src/Header.cxx.

66 {
67 return m_bcn_sign;
68 }

◆ decode()

void L1Topo::Header::decode ( )
protected

method used by constructor to decode word

Definition at line 27 of file L1Topo/L1TopoRDO/src/Header.cxx.

27 {
28 // assert (L1Topo::blockType(m_word)==L1Topo::BlockTypes::HEADER);
29 m_bcn_offset = m_word & 0x7;
30 m_bcn_sign = (m_word>>3) & 0x1;
31 m_last_block = (m_word>>4) & 0x1;
32 m_fpga = (m_word >> 5 ) & 0x1;
33 m_payload_crc = (m_word>>8) & 0xff;
34 m_active_fibres = (m_word>>16) & 0xff;
35 m_version = (m_word>>24) & 0xf;
36 return;
37 }

◆ encode()

void L1Topo::Header::encode ( )
protected

method used by constructor to encode word

Definition at line 39 of file L1Topo/L1TopoRDO/src/Header.cxx.

39 {
40 m_word = static_cast<uint32_t>(L1Topo::BlockTypes::HEADER) << 28;
41 m_word |= (m_bcn_offset & 0x7);
42 m_word |= (m_bcn_sign & 0x1) << 3;
43 m_word |= (m_last_block & 0x1) << 4;
44 m_word |= (m_fpga & 0x1) << 5;
45 m_word |= (m_payload_crc & 0xff) << 8;
46 m_word |= (m_active_fibres & 0xff) << 16;
47 m_word |= (m_version & 0xf) << 24;
48 return;
49 }
setEventNumber uint32_t

◆ fpga()

uint32_t L1Topo::Header::fpga ( ) const

access method

Definition at line 60 of file L1Topo/L1TopoRDO/src/Header.cxx.

60 {
61 return m_fpga;
62 }

◆ last_block()

uint32_t L1Topo::Header::last_block ( ) const

access method

Definition at line 63 of file L1Topo/L1TopoRDO/src/Header.cxx.

63 {
64 return m_last_block;
65 }

◆ payload_crc()

uint32_t L1Topo::Header::payload_crc ( ) const

access method

Definition at line 57 of file L1Topo/L1TopoRDO/src/Header.cxx.

57 {
58 return m_payload_crc;
59 }

◆ version()

uint32_t L1Topo::Header::version ( ) const

access method

Definition at line 51 of file L1Topo/L1TopoRDO/src/Header.cxx.

51 {
52 return m_version;
53 }

◆ word()

uint32_t L1Topo::Header::word ( ) const

access method

Definition at line 75 of file L1Topo/L1TopoRDO/src/Header.cxx.

75 {
76 return m_word;
77 }

Member Data Documentation

◆ m_active_fibres

uint32_t L1Topo::Header::m_active_fibres
private

Definition at line 49 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_bcn

int L1Topo::Header::m_bcn
private

Definition at line 55 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_bcn_offset

uint32_t L1Topo::Header::m_bcn_offset
private

Definition at line 54 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_bcn_sign

uint32_t L1Topo::Header::m_bcn_sign
private

Definition at line 53 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_fpga

uint32_t L1Topo::Header::m_fpga
private

Definition at line 51 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_last_block

uint32_t L1Topo::Header::m_last_block
private

Definition at line 52 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_payload_crc

uint32_t L1Topo::Header::m_payload_crc
private

Definition at line 50 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_version

uint32_t L1Topo::Header::m_version
private

Definition at line 48 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.

◆ m_word

uint32_t L1Topo::Header::m_word
private

Definition at line 56 of file L1Topo/L1TopoRDO/L1TopoRDO/Header.h.


The documentation for this class was generated from the following files: