19 m_errorcellsThisEvent(0),
20 m_errorCounterThisEvent(0),
21 m_errorcellsPreviousEvent(0),
22 m_errorCounterPreviousEvent(0),
23 m_numberOfEventsWithThisErrorState(0),
56 return StatusCode::FAILURE;
72 ATH_MSG_DEBUG (
"======== LArCablingChecker initialize successfully ========" );
73 return StatusCode::SUCCESS;
77 const EventContext& ctx = Gaudi::Hive::currentContext();
78 unsigned eventNb = ctx.eventID().event_number();
80 ATH_MSG_INFO (
"======== executing event "<< eventNb <<
" ========" );
95 return StatusCode::FAILURE;
101 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping" );
102 return StatusCode::FAILURE;
109 return StatusCode::FAILURE;
121 int cellsCounter = 0;
123 int inconsistencyCounter = 0;
124 int disconnectedCounter = 0;
125 int badChannelCounter = 0;
133 std::ostringstream ErrorList;
148 if (!
cabling->isOnlineConnected(online_id)) {
150 disconnectedCounter++;
152 disconnected =
false;
157 bool noOffline_id =
false;
159 offline_id =
cabling->cnvToIdentifier(online_id);
167 const int max = *max_element(
digit->samples().begin(),
digit->samples().end());
169 signalPresent =
true;
171 signalPresent =
false;
177 std::ostringstream PulserList;
178 const std::vector<HWIdentifier>& calibChannelIDs=clCont->calibSlotLine(online_id);
182 bool isPulsed=calibParams->
isPulsed(eventNb, hwid);
184 int DACvalue_temp = calibParams->
DAC(eventNb, hwid);
185 if (DACvalue_temp > DACvalue)
186 DACvalue = DACvalue_temp;
190 PulserList << std::hex << hwid.get_compact() << std::dec <<
" " << slot <<
" " <<
line <<
" ";
196 bool DACOverThreshold;
213 if (bcCont->offlineStatus(offline_id).good()) {
225 bool inconsistency = (signalPresent != pulsed) && DACOverThreshold;
227 inconsistencyCounter++;
229 bool errorInCell = inconsistency || badChannel;
233 std::ostringstream CellData;
234 CellData <<
"0x" << std::hex << std::setw(8) << febid.
get_compact() << std::dec
237 << std::setw(5) << chNb;
239 CellData << std::setw(5);
245 CellData << std::setw(5);
251 CellData << std::setw(5);
257 CellData << std::setw(7) <<
max;
259 CellData << std::setw(7) << DACvalue;
261 CellData << std::setw(7) <<
"-";
266 ErrorList << CellData.str() << std::endl;
292 ErrorList << CellData.str();
295 ErrorList <<
" " << PulserList.str();
297 ErrorList << std::endl;
302 ErrorList << std::endl;
305 ErrorList <<
"Examined " << cellsCounter <<
" cells in event " << eventNb <<
". Found:" << std::endl;
306 ErrorList << std::left << std::setw(25) <<
"Inconsistencies: "
307 << std::right << std::setw(4) << inconsistencyCounter << std::endl;
308 ErrorList << std::left << std::setw(25) <<
"Bad cells: "
309 << std::right << std::setw(4) << badChannelCounter << std::endl;
310 ErrorList << std::left << std::setw(25) <<
"Sum errors: "
312 ErrorList << std::left << std::setw(25) <<
"Disconnected cells: "
313 << std::right << std::setw(4) << disconnectedCounter << std::endl;
314 ErrorList << std::endl;
330 m_outfile <<
"Error in event "<< std::setw(7) << eventNb
331 <<
" ==========================================================================" << std::endl;
332 m_outfile <<
"I=Inconsistency P=Pulsed S=Signal B=Bad D=Disconnected" << std::endl;
334 << std::left << std::setw(10) <<
"FEB"
335 << std::right << std::setw(5) <<
"FT"
336 << std::setw(5) <<
"SL"
337 << std::setw(5) <<
"CH"
338 << std::setw(5) <<
"Smpl"
339 << std::setw(5) <<
"Eta"
340 << std::setw(5) <<
"Phi"
341 << std::setw(7) <<
"ADC"
342 << std::setw(7) <<
"DAC"
343 <<
" Pulsed by calibchannel slot line"
353 m_outfile <<
"Status of event "<< std::setw(7) << eventNb
354 <<
" ==========================================================================" << std::endl;
355 m_outfile <<
"I=Inconsistency P=Pulsed S=Signal B=Bad D=Disconnected" << std::endl;
357 << std::left << std::setw(10) <<
"FEB"
358 << std::right << std::setw(5) <<
"FT"
359 << std::setw(5) <<
"SL"
360 << std::setw(5) <<
"CH"
361 << std::setw(5) <<
"Smpl"
362 << std::setw(5) <<
"Eta"
363 << std::setw(5) <<
"Phi"
364 << std::setw(7) <<
"ADC"
365 << std::setw(7) <<
"DAC"
366 <<
" Pulsed by slot line"
372 return StatusCode::SUCCESS;
384 return StatusCode::SUCCESS;