ATLAS Offline Software
Loading...
Searching...
No Matches
L1TopoRDO Class Reference

The class that represents the raw data received from an L1Topo board. More...

#include <L1TopoRDO.h>

Collaboration diagram for L1TopoRDO:

Public Member Functions

 L1TopoRDO ()
 Constructor.
const std::vector< uint32_t > & getDataWords () const
 get the data words
void setDataWords (std::vector< uint32_t > &&) noexcept
 set the data words
const std::vector< uint32_t > & getStatusWords () const
 get the status words
void setStatusWords (std::vector< uint32_t > &&) noexcept
 set the status words
std::vector< L1Topo::ErrorgetErrors () const
 get a vector of Errors found during RAW to RDO conversion; see enum and
bool checkError (L1Topo::Error) const
 check if a certain error flag has been set
void setError (L1Topo::Error)
 set a flag to record an error
uint32_t getError () const
 Return error bit vector.
uint32_t getSourceID () const
 get the source identifier, i.e. the word representing the subdet type and
void setSourceID (const uint32_t)
 set the source identifier
bool isDAQModule () const
 check the module type, derived from the source ID and the L1Topo module
bool isROIModule () const
 check the module type, derived from the source ID and the L1Topo module
const std::string dump () const
 terse printout method used by RoIBResult

Private Attributes

std::vector< uint32_t > m_dataWords
std::vector< uint32_t > m_statusWords
uint32_t m_error
uint32_t m_sourceID

Detailed Description

The class that represents the raw data received from an L1Topo board.

This class encapsulated the status and data words received from an L1Topo board via its DAQ or ROI readout.

It is also used in the RoIBResult:

See also
L1TopoResult

For help decoding the data words,

See also
L1Topo::Header
L1Topo::L1TopoTOB
Author
Simon George

Definition at line 29 of file L1TopoRDO.h.

Constructor & Destructor Documentation

◆ L1TopoRDO()

L1TopoRDO::L1TopoRDO ( )
inline

Constructor.

Definition at line 32 of file L1TopoRDO.h.

32 :
33 m_error(0),
34 m_sourceID(0){ }
uint32_t m_sourceID
Definition L1TopoRDO.h:79
uint32_t m_error
Definition L1TopoRDO.h:78

Member Function Documentation

◆ checkError()

bool L1TopoRDO::checkError ( L1Topo::Error e) const

check if a certain error flag has been set

Definition at line 49 of file L1TopoRDO.cxx.

49 {
50 return (m_error>>static_cast<unsigned int>(e) & 1);
51}

◆ dump()

const std::string L1TopoRDO::dump ( ) const

terse printout method used by RoIBResult

Definition at line 77 of file L1TopoRDO.cxx.

78{
79 std::ostringstream s;
80 s << " ";
81 for (auto & word: m_dataWords){
82 s << std::hex << std::showbase << std::setfill('0') << std::setw(8)
83 << word << " " << std::dec << std::noshowbase;
84 }
85 return s.str();
86}
std::vector< uint32_t > m_dataWords
Definition L1TopoRDO.h:75

◆ getDataWords()

const std::vector< uint32_t > & L1TopoRDO::getDataWords ( ) const

get the data words

Definition at line 15 of file L1TopoRDO.cxx.

16{
17 return m_dataWords;
18}

◆ getError()

uint32_t L1TopoRDO::getError ( ) const
inline

Return error bit vector.

Definition at line 55 of file L1TopoRDO.h.

55{ return m_error; }

◆ getErrors()

std::vector< L1Topo::Error > L1TopoRDO::getErrors ( ) const

get a vector of Errors found during RAW to RDO conversion; see enum and

Definition at line 35 of file L1TopoRDO.cxx.

36{
37 std::vector<L1Topo::Error> errors;
38 // bit of a hack: use the map of error enum to string as a way to iterate over all the errors that are defined
39 for (const auto & it : L1Topo::errorText){
40 auto e = it.first;
41 if (checkError(e)){
42 errors.push_back(e);
43 }
44 }
45 return errors;
46}
bool checkError(L1Topo::Error) const
check if a certain error flag has been set
Definition L1TopoRDO.cxx:49
static const std::map< Error, std::string > errorText
Define the text to print for each error type above - bad design to put it in the header file?
Definition Error.h:18

◆ getSourceID()

uint32_t L1TopoRDO::getSourceID ( ) const

get the source identifier, i.e. the word representing the subdet type and

Definition at line 57 of file L1TopoRDO.cxx.

58{
59 return m_sourceID;
60}

◆ getStatusWords()

const std::vector< uint32_t > & L1TopoRDO::getStatusWords ( ) const

get the status words

Definition at line 25 of file L1TopoRDO.cxx.

26{
27 return m_statusWords;
28}
std::vector< uint32_t > m_statusWords
Definition L1TopoRDO.h:76

◆ isDAQModule()

bool L1TopoRDO::isDAQModule ( ) const

check the module type, derived from the source ID and the L1Topo module

Definition at line 67 of file L1TopoRDO.cxx.

68{
69 return L1Topo::ModuleID(static_cast<uint16_t>(m_sourceID)).isDAQ();
70}
setWord1 uint16_t

◆ isROIModule()

bool L1TopoRDO::isROIModule ( ) const

check the module type, derived from the source ID and the L1Topo module

Definition at line 72 of file L1TopoRDO.cxx.

73{
74 return L1Topo::ModuleID(static_cast<uint16_t>(m_sourceID)).isROI();
75}

◆ setDataWords()

void L1TopoRDO::setDataWords ( std::vector< uint32_t > && dataWords)
noexcept

set the data words

Definition at line 20 of file L1TopoRDO.cxx.

21{
22 m_dataWords = std::move(dataWords);
23}

◆ setError()

void L1TopoRDO::setError ( L1Topo::Error e)

set a flag to record an error

Definition at line 53 of file L1TopoRDO.cxx.

53 {
54 m_error |= (1 << static_cast<unsigned int>(e));
55}

◆ setSourceID()

void L1TopoRDO::setSourceID ( const uint32_t id)

set the source identifier

Definition at line 62 of file L1TopoRDO.cxx.

◆ setStatusWords()

void L1TopoRDO::setStatusWords ( std::vector< uint32_t > && statusWords)
noexcept

set the status words

Definition at line 30 of file L1TopoRDO.cxx.

31{
32 m_statusWords = std::move(statusWords);
33}

Member Data Documentation

◆ m_dataWords

std::vector<uint32_t> L1TopoRDO::m_dataWords
private

Definition at line 75 of file L1TopoRDO.h.

◆ m_error

uint32_t L1TopoRDO::m_error
private

Definition at line 78 of file L1TopoRDO.h.

◆ m_sourceID

uint32_t L1TopoRDO::m_sourceID
private

Definition at line 79 of file L1TopoRDO.h.

◆ m_statusWords

std::vector<uint32_t> L1TopoRDO::m_statusWords
private

Definition at line 76 of file L1TopoRDO.h.


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