ATLAS Offline Software
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 
15 L1CaloRdoRodInfo::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 
31 std::string
33 {
34  return std::string( "RodInfo" );
35 }
36 
37 void
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 
55 int
57 {
58  return ( m_version & 0xffff );
59 }
60 
61 bool
63 {
64  return ( (unsigned int)this->getMinorVersion() < s_minRun2Version );
65 }
66 
67 bool
69 {
70  return ( this->getIsRun3() || (unsigned int)this->getMinorVersion() >= s_minRun2Version );
71 }
72 
73 bool
75 {
76  // Run3 fragments have some of bits 12-15 set.
77  return ( ( this->getRodId() & 0xf000 ) != 0 );
78 }
79 
80 int
82 {
83  return m_system;
84 }
85 
86 int
88 {
89  return m_rod;
90 }
91 
92 int
94 {
95  return ( (m_system<<16) | m_rod );
96 }
97 
98 int
100 {
101  return m_run;
102 }
103 
104 int
106 {
107  return m_bcnum;
108 }
109 
110 int
112 {
113  return m_triggerType;
114 }
115 
116 int
118 {
119  return m_lvl1;
120 }
121 
122 int
124 {
125  return m_size;
126 }
127 
128 int
130 {
131  return ( (m_detType>>4) & 0xfff);
132 }
133 
134 int
136 {
137  return ( (m_detType>>16) & 0xffff);
138 }
139 
140 bool
142 {
143  return ( m_status1 & 0x1 );
144 }
145 
146 bool
148 {
149  return ( m_status1 & 0x4 );
150 }
151 
152 bool
154 {
155  return ( m_status1 & 0x8 );
156 }
157 
158 bool
160 {
161  return ( m_status1 & 0x10 );
162 }
163 
164 bool
166 {
167  return ( m_status1 & 0x10000 );
168 }
169 
170 bool
172 {
173  return ( m_status1 & 0x20000 );
174 }
175 
176 bool
178 {
179  return ( m_status1 & 0x40000 );
180 }
181 
182 bool
184 {
185  return ( m_status2 & 0x2 );
186 }
187 
188 bool
190 {
191  return ( m_status2 & 0x10000 );
192 }
193 
194 int
196 {
197  if ( (module < 0) || (module > 15) )
198  return 0;
199  return m_status[module];
200 }
201 
202 void
204 {
205  m_lvl1 = lvl1;
206 }
207 
208 void
210 {
211  m_size = size;
212 }
213 
214 void
216 {
217  m_status1 = status;
218 }
219 
220 void
222 {
223  m_status2 = status;
224 }
225 
226 void
228 {
230 }
231 
L1CaloRdoRodInfo::m_status
std::vector< int > m_status
Definition: L1CaloRdoRodInfo.h:69
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
L1CaloRdoRodInfo::getCmmParityError
bool getCmmParityError() const
Definition: L1CaloRdoRodInfo.cxx:171
L1CaloRdoRodInfo::getIsRun2
bool getIsRun2() const
Definition: L1CaloRdoRodInfo.cxx:68
L1CaloRdoRodInfo::getGlinkTimeout
bool getGlinkTimeout() const
Definition: L1CaloRdoRodInfo.cxx:147
L1CaloRdoRodInfo::getIsRun1
bool getIsRun1() const
Definition: L1CaloRdoRodInfo.cxx:62
L1CaloRdoRodInfo::m_version
int m_version
Definition: L1CaloRdoRodInfo.h:68
L1CaloRdoRodInfo::getGlinkError
bool getGlinkError() const
Definition: L1CaloRdoRodInfo.cxx:177
L1CaloRdoRodInfo::m_run
int m_run
Definition: L1CaloRdoRodInfo.h:60
L1CaloRdoRodInfo::m_size
int m_size
Definition: L1CaloRdoRodInfo.h:65
L1CaloRdoRodInfo::getBcnumMismatch
bool getBcnumMismatch() const
Definition: L1CaloRdoRodInfo.cxx:141
L1CaloRdoRodInfo::s_minRun2Version
static const unsigned int s_minRun2Version
Definition: L1CaloRdoRodInfo.h:55
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
L1CaloRdoRodInfo::getIsRun3
bool getIsRun3() const
Definition: L1CaloRdoRodInfo.cxx:74
L1CaloRdoRodInfo::m_lvl1
int m_lvl1
Definition: L1CaloRdoRodInfo.h:64
L1CaloRdoRodInfo::L1CaloRdoRodInfo
L1CaloRdoRodInfo(int system, int rod, int run, int bcnum, int triggerType, int detType, int version)
Definition: L1CaloRdoRodInfo.cxx:15
L1CaloRdoRodInfo::m_status2
int m_status2
Definition: L1CaloRdoRodInfo.h:67
L1CaloRdoRodInfo::setLvl1Id
void setLvl1Id(int lvl1)
Definition: L1CaloRdoRodInfo.cxx:203
L1CaloRdoRodInfo::m_bcnum
int m_bcnum
Definition: L1CaloRdoRodInfo.h:61
L1CaloRdoRodInfo::m_rod
int m_rod
Definition: L1CaloRdoRodInfo.h:59
L1CaloRdoRodInfo::getDataTransportError
bool getDataTransportError() const
Definition: L1CaloRdoRodInfo.cxx:153
L1CaloRdoRodInfo::getStepNumber
int getStepNumber() const
Definition: L1CaloRdoRodInfo.cxx:129
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.PyAthena.module
module
Definition: PyAthena.py:131
L1CaloRdoRodInfo::getRunNumber
int getRunNumber() const
Definition: L1CaloRdoRodInfo.cxx:99
L1CaloRdoRodInfo::getTriggerType
int getTriggerType() const
Definition: L1CaloRdoRodInfo.cxx:111
L1CaloRdoRodInfo::getRoiOverflow
bool getRoiOverflow() const
Definition: L1CaloRdoRodInfo.cxx:183
L1CaloRdoRodInfo::getSourceId
int getSourceId() const
Definition: L1CaloRdoRodInfo.cxx:93
L1CaloRdoRodInfo::getType
std::string getType() const
Definition: L1CaloRdoRodInfo.cxx:32
run
Definition: run.py:1
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
L1CaloRdoRodInfo::m_status1
int m_status1
Definition: L1CaloRdoRodInfo.h:66
L1CaloRdoRodInfo::getRodOverflow
bool getRodOverflow() const
Definition: L1CaloRdoRodInfo.cxx:159
L1CaloRdoRodInfo::getTriggerTypeTimeout
bool getTriggerTypeTimeout() const
Definition: L1CaloRdoRodInfo.cxx:189
L1CaloRdoRodInfo::getModuleStatus
int getModuleStatus(const int module) const
Definition: L1CaloRdoRodInfo.cxx:195
L1CaloRdoRodInfo::getOrbitCount
int getOrbitCount() const
Definition: L1CaloRdoRodInfo.cxx:135
L1CaloRdoRodInfo::m_triggerType
int m_triggerType
Definition: L1CaloRdoRodInfo.h:62
L1CaloRdoRodInfo::m_detType
int m_detType
Definition: L1CaloRdoRodInfo.h:63
L1CaloRdoRodInfo::getBcNumber
int getBcNumber() const
Definition: L1CaloRdoRodInfo.cxx:105
L1CaloRdoRodInfo::info
void info() const
Definition: L1CaloRdoRodInfo.cxx:38
get_generator_info.version
version
Definition: get_generator_info.py:33
L1CaloRdoRodInfo.h
L1CaloRdoRodInfo::getDataSize
int getDataSize() const
Definition: L1CaloRdoRodInfo.cxx:123
L1CaloRdoRodInfo::m_system
int m_system
Definition: L1CaloRdoRodInfo.h:58
L1CaloRdoRodInfo::setStatus2
void setStatus2(int status)
Definition: L1CaloRdoRodInfo.cxx:221
L1CaloRdoRodInfo::getLevel1Id
int getLevel1Id() const
Definition: L1CaloRdoRodInfo.cxx:117
L1CaloRdoRodInfo::setSize
void setSize(int size)
Definition: L1CaloRdoRodInfo.cxx:209
L1CaloRdoRodInfo::getRodId
int getRodId() const
Definition: L1CaloRdoRodInfo.cxx:87
RunTileMonitoring.triggerType
triggerType
Definition: RunTileMonitoring.py:162
merge.status
status
Definition: merge.py:17
L1CaloRdoRodInfo::getMinorVersion
int getMinorVersion() const
Definition: L1CaloRdoRodInfo.cxx:56
L1CaloRdoRodInfo::setStatus1
void setStatus1(int status)
Definition: L1CaloRdoRodInfo.cxx:215
L1CaloRdoRodInfo::getModuleLinkError
bool getModuleLinkError() const
Definition: L1CaloRdoRodInfo.cxx:165
L1CaloRdoRodInfo::getSystemId
int getSystemId() const
Definition: L1CaloRdoRodInfo.cxx:81
L1CaloRdoRodInfo::setModuleStatus
void setModuleStatus(int module, int status)
Definition: L1CaloRdoRodInfo.cxx:227