ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1CaloFEX
L1CaloFEXByteStream
src
bytestreamDecoder
src
L1CaloRdo.cxx
Go to the documentation of this file.
1
2
#include "
bytestreamDecoder/L1CaloRdo.h
"
3
4
#include "
bytestreamDecoder/L1CaloRdoRodInfo.h
"
5
6
#include <iostream>
7
25
26
L1CaloRdo::L1CaloRdo
(
int
crate,
int
module,
int
eta
,
int
phi
,
27
int
layer,
int
numSlices
)
28
:
m_crate
( crate )
29
,
m_module
( module )
30
,
m_eta
(
eta
)
31
,
m_phi
(
phi
)
32
,
m_layer
( layer )
33
,
m_vals
(
numSlices
, 0 )
34
,
m_flags
(
numSlices
, 0 )
35
,
m_l1aPos
(
numSlices
/2 )
36
#ifdef OFFLINE_DECODER
37
, m_word0s(
numSlices
,0),m_word1s(
numSlices
,0)
38
#endif
39
{
40
// std::cout << "Object Created" << std::endl;
41
}
42
43
L1CaloRdo::~L1CaloRdo
( )
44
{
45
// std::cout << "Object Deleted" << std::endl;
46
}
47
48
bool
49
operator<
(
const
L1CaloRdo
& lhs,
const
L1CaloRdo
& rhs )
50
{
51
if
( lhs.
getCrate
() < rhs.
getCrate
() )
52
return
true
;
53
if
( lhs.
getCrate
() > rhs.
getCrate
() )
54
return
false
;
55
if
( lhs.
getModule
() < rhs.
getModule
() )
56
return
true
;
57
if
( lhs.
getModule
() > rhs.
getModule
() )
58
return
false
;
59
if
( lhs.
getEta
() < rhs.
getEta
() )
60
return
true
;
61
if
( lhs.
getEta
() > rhs.
getEta
() )
62
return
false
;
63
if
( lhs.
getPhi
() < rhs.
getPhi
() )
64
return
true
;
65
if
( lhs.
getPhi
() > rhs.
getPhi
() )
66
return
false
;
67
if
( lhs.
getLayer
() < rhs.
getLayer
() )
68
return
true
;
69
return
false
;
70
}
71
72
int
73
L1CaloRdo::getCrate
( )
const
74
{
75
return
m_crate
;
76
}
77
78
int
79
L1CaloRdo::getModule
( )
const
80
{
81
return
m_module
;
82
}
83
84
int
85
L1CaloRdo::getEta
( )
const
86
{
87
return
m_eta
;
88
}
89
90
int
91
L1CaloRdo::getPhi
( )
const
92
{
93
return
m_phi
;
94
}
95
96
int
97
L1CaloRdo::getLayer
( )
const
98
{
99
return
m_layer
;
100
}
101
102
int
103
L1CaloRdo::getValue
(
size_t
slice )
const
104
{
105
if
( slice <
m_vals
.size() )
106
return
m_vals
[slice];
107
return
0;
108
}
109
110
int
111
L1CaloRdo::getValue
( )
const
112
{
113
return
getValue
(
getL1aPos
() );
114
}
115
116
int
117
L1CaloRdo::getFlag
(
size_t
slice )
const
118
{
119
if
( slice <
m_flags
.size() )
120
return
m_flags
[slice];
121
return
0;
122
}
123
124
int
125
L1CaloRdo::getFlag
( )
const
126
{
127
return
getFlag
(
getL1aPos
() );
128
}
129
130
int
131
L1CaloRdo::getL1aPos
( )
const
132
{
133
return
m_l1aPos
;
134
}
135
136
L1CaloDetectorRegion
137
L1CaloRdo::getRegion
( )
const
138
{
139
return
m_region
;
140
}
141
142
143
const
std::list<L1CaloRdoRodInfo>::const_iterator&
144
L1CaloRdo::getRodInfo
( )
const
145
{
146
return
m_rodInfo
;
147
}
148
149
int
150
L1CaloRdo::getModuleStatus
( )
const
151
{
152
return
m_rodInfo
->getModuleStatus(
getModule
() );
153
}
154
155
bool
156
L1CaloRdo::getModuleErrorGlinkParity
( )
const
157
{
158
return
getModuleStatus
( ) & 0x01 ;
159
}
160
161
bool
162
L1CaloRdo::getModuleErrorGlinkProtocol
( )
const
163
{
164
return
getModuleStatus
( ) & 0x02 ;
165
}
166
167
bool
168
L1CaloRdo::getModuleErrorBcnMismatch
( )
const
169
{
170
return
getModuleStatus
( ) & 0x04 ;
171
}
172
173
bool
174
L1CaloRdo::getModuleErrorFifoOverflow
( )
const
175
{
176
return
getModuleStatus
( ) & 0x08 ;
177
}
178
179
bool
180
L1CaloRdo::getModuleErrorSpecific
( )
const
181
{
182
return
getModuleStatus
( ) & 0x10 ;
183
}
184
185
bool
186
L1CaloRdo::getModuleErrorUnused
( )
const
187
{
188
return
getModuleStatus
( ) & 0x20 ;
189
}
190
191
bool
192
L1CaloRdo::getModuleErrorGlinkTimeout
( )
const
193
{
194
return
getModuleStatus
( ) & 0x40 ;
195
}
196
197
bool
198
L1CaloRdo::getModuleErrorGlinkDown
( )
const
199
{
200
return
getModuleStatus
( ) & 0x80 ;
201
}
202
203
size_t
204
L1CaloRdo::numSlices
( )
const
205
{
206
return
m_vals
.size();
207
}
208
209
bool
210
L1CaloRdo::sameDatum
(
const
L1CaloRdo
& rhs )
const
211
{
212
if
(
m_crate
!= rhs.
m_crate
)
213
return
false
;
214
if
(
m_module
!= rhs.
m_module
)
215
return
false
;
216
if
(
m_eta
!= rhs.
m_eta
)
217
return
false
;
218
if
(
m_phi
!= rhs.
m_phi
)
219
return
false
;
220
if
(
m_layer
!= rhs.
m_layer
)
221
return
false
;
222
return
true
;
223
}
224
225
void
226
L1CaloRdo::setValue
(
int
val,
size_t
slice )
227
{
228
if
( slice <
m_vals
.size() )
229
m_vals
[slice] = val;
230
}
231
232
void
233
L1CaloRdo::setValue
(
int
val )
234
{
235
setValue
( val,
getL1aPos
() );
236
}
237
238
void
239
L1CaloRdo::setFlag
(
int
flag,
size_t
slice )
240
{
241
if
( slice <
m_flags
.size() )
242
m_flags
[slice] = flag;
243
}
244
245
void
246
L1CaloRdo::setFlag
(
int
flag )
247
{
248
setFlag
( flag,
getL1aPos
() );
249
}
250
251
void
252
L1CaloRdo::setRodInfo
( std::list<L1CaloRdoRodInfo>::const_iterator& rodInfo )
253
{
254
m_rodInfo
= rodInfo;
255
}
256
257
void
258
L1CaloRdo::info
( )
const
259
{
260
std::cout <<
"RDO Object Type: "
<<
getType
()
261
<<
" Crate: "
<<
getCrate
()
262
<<
" Module: "
<<
getModule
()
263
<<
" Eta: "
<<
getEta
()
264
<<
" Phi: "
<<
getPhi
()
265
<<
" Layer: "
<<
getLayer
() << std::endl;
266
std::cout <<
" Values: "
<< std::hex;
267
for
(
size_t
i = 0 ; i <
m_vals
.size() ; ++i )
268
std::cout <<
getValue
(i) <<
" "
;
269
std::cout <<
" Flags: "
;
270
for
(
size_t
i = 0 ; i <
m_flags
.size() ; ++i )
271
std::cout <<
getFlag
(i) <<
" "
;
272
std::cout << std::endl << std::dec;
273
infoSpecific
();
274
}
275
276
void
277
L1CaloRdo::infoSpecific
( )
const
278
{
279
}
280
281
282
void
283
L1CaloRdo::setRegion
(
const
L1CaloDetectorRegion
& region )
284
{
285
m_region
= region;
286
}
287
288
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
L1CaloRdoRodInfo.h
operator<
bool operator<(const L1CaloRdo &lhs, const L1CaloRdo &rhs)
Definition
L1CaloRdo.cxx:49
L1CaloRdo.h
L1CaloDetectorRegion
Simple class to mainly store eta/phi information (indices, granularity, trigger tower coordinates) as...
Definition
L1CaloDetectorRegion.h:8
L1CaloRdo
Abstract base class for L1Calo "Raw Data Objects" (RDOs).
Definition
L1CaloRdo.h:17
L1CaloRdo::getEta
int getEta() const
Definition
L1CaloRdo.cxx:85
L1CaloRdo::m_module
int m_module
Definition
L1CaloRdo.h:74
L1CaloRdo::m_eta
int m_eta
Definition
L1CaloRdo.h:75
L1CaloRdo::getModuleErrorFifoOverflow
bool getModuleErrorFifoOverflow() const
Definition
L1CaloRdo.cxx:174
L1CaloRdo::getModuleStatus
int getModuleStatus() const
Definition
L1CaloRdo.cxx:150
L1CaloRdo::m_vals
std::vector< int > m_vals
Definition
L1CaloRdo.h:78
L1CaloRdo::L1CaloRdo
L1CaloRdo(int crate, int module, int eta, int phi, int layer, int numSlices)
Definition
L1CaloRdo.cxx:26
L1CaloRdo::infoSpecific
virtual void infoSpecific() const
Definition
L1CaloRdo.cxx:277
L1CaloRdo::getModuleErrorGlinkProtocol
bool getModuleErrorGlinkProtocol() const
Definition
L1CaloRdo.cxx:162
L1CaloRdo::getFlag
int getFlag() const
Definition
L1CaloRdo.cxx:125
L1CaloRdo::getModule
int getModule() const
Definition
L1CaloRdo.cxx:79
L1CaloRdo::m_l1aPos
int m_l1aPos
Definition
L1CaloRdo.h:80
L1CaloRdo::getRodInfo
const std::list< L1CaloRdoRodInfo >::const_iterator & getRodInfo() const
Definition
L1CaloRdo.cxx:144
L1CaloRdo::setRodInfo
void setRodInfo(std::list< L1CaloRdoRodInfo >::const_iterator &rodInfo)
Definition
L1CaloRdo.cxx:252
L1CaloRdo::m_layer
int m_layer
Definition
L1CaloRdo.h:77
L1CaloRdo::getModuleErrorBcnMismatch
bool getModuleErrorBcnMismatch() const
Definition
L1CaloRdo.cxx:168
L1CaloRdo::getPhi
int getPhi() const
Definition
L1CaloRdo.cxx:91
L1CaloRdo::numSlices
size_t numSlices() const
Definition
L1CaloRdo.cxx:204
L1CaloRdo::getLayer
int getLayer() const
Definition
L1CaloRdo.cxx:97
L1CaloRdo::setRegion
void setRegion(const L1CaloDetectorRegion ®ion)
Definition
L1CaloRdo.cxx:283
L1CaloRdo::setFlag
void setFlag(int flag, size_t slice)
Definition
L1CaloRdo.cxx:239
L1CaloRdo::getCrate
int getCrate() const
Definition
L1CaloRdo.cxx:73
L1CaloRdo::getModuleErrorUnused
bool getModuleErrorUnused() const
Definition
L1CaloRdo.cxx:186
L1CaloRdo::getModuleErrorGlinkDown
bool getModuleErrorGlinkDown() const
Definition
L1CaloRdo.cxx:198
L1CaloRdo::m_flags
std::vector< int > m_flags
Definition
L1CaloRdo.h:79
L1CaloRdo::m_crate
int m_crate
Definition
L1CaloRdo.h:73
L1CaloRdo::getType
virtual std::string getType() const =0
L1CaloRdo::getModuleErrorGlinkParity
bool getModuleErrorGlinkParity() const
Definition
L1CaloRdo.cxx:156
L1CaloRdo::m_phi
int m_phi
Definition
L1CaloRdo.h:76
L1CaloRdo::setValue
void setValue(int val, size_t slice)
Definition
L1CaloRdo.cxx:226
L1CaloRdo::sameDatum
bool sameDatum(const L1CaloRdo &rhs) const
Definition
L1CaloRdo.cxx:210
L1CaloRdo::L1CaloRdo
L1CaloRdo()
L1CaloRdo::getRegion
L1CaloDetectorRegion getRegion() const
Definition
L1CaloRdo.cxx:137
L1CaloRdo::info
void info() const
Definition
L1CaloRdo.cxx:258
L1CaloRdo::m_region
L1CaloDetectorRegion m_region
Definition
L1CaloRdo.h:82
L1CaloRdo::getValue
int getValue() const
Definition
L1CaloRdo.cxx:111
L1CaloRdo::getL1aPos
int getL1aPos() const
Definition
L1CaloRdo.cxx:131
L1CaloRdo::getModuleErrorSpecific
bool getModuleErrorSpecific() const
Definition
L1CaloRdo.cxx:180
L1CaloRdo::getModuleErrorGlinkTimeout
bool getModuleErrorGlinkTimeout() const
Definition
L1CaloRdo.cxx:192
L1CaloRdo::m_rodInfo
std::list< L1CaloRdoRodInfo >::const_iterator m_rodInfo
Definition
L1CaloRdo.h:86
L1CaloRdo::~L1CaloRdo
virtual ~L1CaloRdo()
Definition
L1CaloRdo.cxx:43
Generated on
for ATLAS Offline Software by
1.17.0