ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoRDO
src
L1TopoRDO.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 "
L1TopoRDO/L1TopoRDO.h
"
6
7
#include <cstdint>
8
#include <vector>
9
#include <sstream>
10
#include <iomanip>
11
#include <string>
12
#include "
L1TopoRDO/ModuleID.h
"
13
14
15
const
std::vector<uint32_t>&
L1TopoRDO::getDataWords
()
const
16
{
17
return
m_dataWords
;
18
}
19
20
void
L1TopoRDO::setDataWords
(std::vector<uint32_t> &&dataWords)
noexcept
21
{
22
m_dataWords
= std::move(dataWords);
23
}
24
25
const
std::vector<uint32_t>&
L1TopoRDO::getStatusWords
()
const
26
{
27
return
m_statusWords
;
28
}
29
30
void
L1TopoRDO::setStatusWords
(std::vector<uint32_t> &&statusWords)
noexcept
31
{
32
m_statusWords
= std::move(statusWords);
33
}
34
35
std::vector<L1Topo::Error>
L1TopoRDO::getErrors
()
const
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
}
47
48
49
bool
L1TopoRDO::checkError
(
L1Topo::Error
e)
const
{
50
return
(
m_error
>>
static_cast<
unsigned
int
>
(e) & 1);
51
}
52
53
void
L1TopoRDO::setError
(
L1Topo::Error
e){
54
m_error
|= (1 <<
static_cast<
unsigned
int
>
(e));
55
}
56
57
uint32_t
L1TopoRDO::getSourceID
()
const
58
{
59
return
m_sourceID
;
60
}
61
62
void
L1TopoRDO::setSourceID
(
const
uint32_t
id
)
63
{
64
m_sourceID
=id;
65
}
66
67
bool
L1TopoRDO::isDAQModule
()
const
68
{
69
return
L1Topo::ModuleID
(
static_cast<
uint16_t
>
(
m_sourceID
)).
isDAQ
();
70
}
71
72
bool
L1TopoRDO::isROIModule
()
const
73
{
74
return
L1Topo::ModuleID
(
static_cast<
uint16_t
>
(
m_sourceID
)).
isROI
();
75
}
76
77
const
std::string
L1TopoRDO::dump
()
const
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
}
87
L1TopoRDO.h
ModuleID.h
L1TopoRDO::setError
void setError(L1Topo::Error)
set a flag to record an error
Definition
L1TopoRDO.cxx:53
L1TopoRDO::checkError
bool checkError(L1Topo::Error) const
check if a certain error flag has been set
Definition
L1TopoRDO.cxx:49
L1TopoRDO::setStatusWords
void setStatusWords(std::vector< uint32_t > &&) noexcept
set the status words
Definition
L1TopoRDO.cxx:30
L1TopoRDO::getErrors
std::vector< L1Topo::Error > getErrors() const
get a vector of Errors found during RAW to RDO conversion; see enum and
Definition
L1TopoRDO.cxx:35
L1TopoRDO::isDAQModule
bool isDAQModule() const
check the module type, derived from the source ID and the L1Topo module
Definition
L1TopoRDO.cxx:67
L1TopoRDO::getSourceID
uint32_t getSourceID() const
get the source identifier, i.e. the word representing the subdet type and
Definition
L1TopoRDO.cxx:57
L1TopoRDO::dump
const std::string dump() const
terse printout method used by RoIBResult
Definition
L1TopoRDO.cxx:77
L1TopoRDO::setDataWords
void setDataWords(std::vector< uint32_t > &&) noexcept
set the data words
Definition
L1TopoRDO.cxx:20
L1TopoRDO::m_sourceID
uint32_t m_sourceID
Definition
L1TopoRDO.h:79
L1TopoRDO::getStatusWords
const std::vector< uint32_t > & getStatusWords() const
get the status words
Definition
L1TopoRDO.cxx:25
L1TopoRDO::setSourceID
void setSourceID(const uint32_t)
set the source identifier
Definition
L1TopoRDO.cxx:62
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::isROIModule
bool isROIModule() const
check the module type, derived from the source ID and the L1Topo module
Definition
L1TopoRDO.cxx:72
L1TopoRDO::getDataWords
const std::vector< uint32_t > & getDataWords() const
get the data words
Definition
L1TopoRDO.cxx:15
L1TopoRDO::m_statusWords
std::vector< uint32_t > m_statusWords
Definition
L1TopoRDO.h:76
L1Topo::ModuleID
Represents the L1Topo module ID, with decoder and encoder.
Definition
ModuleID.h:28
L1Topo::ModuleID::isROI
bool isROI() const
True if this is a ROI module.
Definition
ModuleID.cxx:29
L1Topo::ModuleID::isDAQ
bool isDAQ() const
True if this is a DAQ module.
Definition
ModuleID.cxx:25
L1Topo::errorText
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
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition
Error.h:16
Generated on
for ATLAS Offline Software by
1.17.0