ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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. More...
 
const std::vector< uint32_t > & getDataWords () const
 get the data words More...
 
void setDataWords (std::vector< uint32_t > &&) noexcept
 set the data words More...
 
const std::vector< uint32_t > & getStatusWords () const
 get the status words More...
 
void setStatusWords (std::vector< uint32_t > &&) noexcept
 set the status words More...
 
std::vector< L1Topo::ErrorgetErrors () const
 get a vector of Errors found during RAW to RDO conversion; see enum and More...
 
bool checkError (L1Topo::Error) const
 check if a certain error flag has been set More...
 
void setError (L1Topo::Error)
 set a flag to record an error More...
 
uint32_t getError () const
 Return error bit vector. More...
 
uint32_t getSourceID () const
 get the source identifier, i.e. the word representing the subdet type and More...
 
void setSourceID (const uint32_t)
 set the source identifier More...
 
bool isDAQModule () const
 check the module type, derived from the source ID and the L1Topo module More...
 
bool isROIModule () const
 check the module type, derived from the source ID and the L1Topo module More...
 
const std::string dump () const
 terse printout method used by RoIBResult More...
 

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){ }

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 }

◆ 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 (auto it : L1Topo::errorText){
40  auto e = it.first;
41  if (checkError(e)){
42  errors.push_back(e);
43  }
44  }
45  return errors;
46 }

◆ 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 }

◆ 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 }

◆ 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.

63 {
64  m_sourceID=id;
65 }

◆ 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:
L1Topo::ModuleID::isDAQ
bool isDAQ() const
True if this is a DAQ module.
Definition: ModuleID.cxx:25
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
skel.it
it
Definition: skel.GENtoEVGEN.py:423
L1Topo::ModuleID::isROI
bool isROI() const
True if this is a ROI module.
Definition: ModuleID.cxx:29
L1TopoRDO::m_statusWords
std::vector< uint32_t > m_statusWords
Definition: L1TopoRDO.h:76
L1TopoRDO::checkError
bool checkError(L1Topo::Error) const
check if a certain error flag has been set
Definition: L1TopoRDO.cxx:49
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
L1Topo::ModuleID
Represents the L1Topo module ID, with decoder and encoder.
Definition: ModuleID.h:28
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
L1TopoRDO::m_dataWords
std::vector< uint32_t > m_dataWords
Definition: L1TopoRDO.h:75
L1TopoRDO::m_error
uint32_t m_error
Definition: L1TopoRDO.h:78
L1TopoRDO::m_sourceID
uint32_t m_sourceID
Definition: L1TopoRDO.h:79