ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloRdoRodInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
5
6#include <iostream>
7
8// Class mainly intended to hold information from the ROD fragment header.
9// It also contains error codes from the L1Calo ROD fragment status block
10// for the legacy Run 1 and Run 2 system.
11// Many of these are no longer relevant for Run 3 FEX/Topo ROD fragments.
12// But it still seems worth having a common ROD info class and other error
13// bits from these might be added?
14
15L1CaloRdoRodInfo::L1CaloRdoRodInfo( int system, int rod, int run, int bcnum, int triggerType, int detType, int version )
16: m_system( system )
17, m_rod( rod )
18, m_run( run )
19, m_bcnum( bcnum )
20, m_triggerType( triggerType )
21, m_detType( detType )
22, m_lvl1( 0 )
23, m_size( 0 )
24, m_status1( 0 )
25, m_status2 ( 0 )
26, m_version( version )
27, m_status( 16, 0 )
28{
29}
30
31std::string
33{
34 return std::string( "RodInfo" );
35}
36
37void
39{
40 std::cout << "RDO Object Type: " << getType();
41 std::cout << std::hex;
42 std::cout << " System Id: " << getSystemId();
43 std::cout << " ROD Id: " << getRodId() << std::endl << " ";
44 std::cout << " Run Num: " << getRunNumber();
45 std::cout << " Level-1 Id: " << getLevel1Id();
46 std::cout << " Bc Number: " << getBcNumber();
47 std::cout << " Trig Type: " << getTriggerType();
48 std::cout << " Step Number: " << getStepNumber();
49 std::cout << " Data Size: " << getDataSize();
50 std::cout << " Minor Ver: " << getMinorVersion();
51 std::cout << std::endl;
52 std::cout << std::dec;
53}
54
55int
57{
58 return ( m_version & 0xffff );
59}
60
61bool
63{
64 return ( (unsigned int)this->getMinorVersion() < s_minRun2Version );
65}
66
67bool
69{
70 return ( this->getIsRun3() || (unsigned int)this->getMinorVersion() >= s_minRun2Version );
71}
72
73bool
75{
76 // Run3 fragments have some of bits 12-15 set.
77 return ( ( this->getRodId() & 0xf000 ) != 0 );
78}
79
80int
82{
83 return m_system;
84}
85
86int
88{
89 return m_rod;
90}
91
92int
94{
95 return ( (m_system<<16) | m_rod );
96}
97
98int
100{
101 return m_run;
102}
103
104int
106{
107 return m_bcnum;
108}
109
110int
112{
113 return m_triggerType;
114}
115
116int
118{
119 return m_lvl1;
120}
121
122int
124{
125 return m_size;
126}
127
128int
130{
131 return ( (m_detType>>4) & 0xfff);
132}
133
134int
136{
137 return ( (m_detType>>16) & 0xffff);
138}
139
140bool
142{
143 return ( m_status1 & 0x1 );
144}
145
146bool
148{
149 return ( m_status1 & 0x4 );
150}
151
152bool
154{
155 return ( m_status1 & 0x8 );
156}
157
158bool
160{
161 return ( m_status1 & 0x10 );
162}
163
164bool
166{
167 return ( m_status1 & 0x10000 );
168}
169
170bool
172{
173 return ( m_status1 & 0x20000 );
174}
175
176bool
178{
179 return ( m_status1 & 0x40000 );
180}
181
182bool
184{
185 return ( m_status2 & 0x2 );
186}
187
188bool
190{
191 return ( m_status2 & 0x10000 );
192}
193
194int
195L1CaloRdoRodInfo::getModuleStatus( const int module ) const
196{
197 if ( (module < 0) || (module > 15) )
198 return 0;
199 return m_status[module];
200}
201
202void
204{
205 m_lvl1 = lvl1;
206}
207
208void
210{
211 m_size = size;
212}
213
214void
216{
217 m_status1 = status;
218}
219
220void
222{
223 m_status2 = status;
224}
225
226void
227L1CaloRdoRodInfo::setModuleStatus( int module, int status )
228{
229 m_status[module] = status;
230}
231
bool getCmmParityError() const
int getModuleStatus(const int module) const
bool getRodOverflow() const
bool getDataTransportError() const
void setStatus2(int status)
std::vector< int > m_status
bool getBcnumMismatch() const
void setStatus1(int status)
bool getGlinkError() const
static const unsigned int s_minRun2Version
void setSize(int size)
bool getTriggerTypeTimeout() const
void setModuleStatus(int module, int status)
void setLvl1Id(int lvl1)
bool getModuleLinkError() const
std::string getType() const
bool getGlinkTimeout() const
L1CaloRdoRodInfo(int system, int rod, int run, int bcnum, int triggerType, int detType, int version)
int getMinorVersion() const
bool getRoiOverflow() const
Definition run.py:1