ATLAS Offline Software
TileDigitsMonitorAlgorithm.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 #include "StoreGate/ReadHandle.h"
11 
13 
14  ATH_MSG_DEBUG("in initialize()");
15 
16  // initialize superclass
18 
22 
24  if (m_tileInfo->ADCmax() == 4095) {
25  m_is12bit = true;
26  }
27 
28  using Tile = TileCalibUtils;
29  using namespace Monitored;
30 
31 
33  m_errorsGroups = buildToolMap<std::vector<std::vector<int>>>(m_tools, "TileDigitsErrors",
34  Tile::MAX_ROS - 1, Tile::MAX_DRAWER,
35  Tile::MAX_GAIN);
36 
37  m_bcidGroups = buildToolMap<std::vector<std::vector<int>>>(m_tools, "TileDigitsBCID",
38  Tile::MAX_ROS - 1, Tile::MAX_DRAWER,
39  Tile::MAX_GAIN);
40 
41  m_bcidErrGroups = buildToolMap<std::vector<std::vector<int>>>(m_tools, "TileDigitsBCIDErrors",
42  Tile::MAX_ROS - 1, Tile::MAX_DRAWER,
43  Tile::MAX_GAIN);
44 
45  m_crcErrGroups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsCRCErrors",
46  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
47 
48  m_crcGlobalGroups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsGlobalCRC",
49  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
50 
51  }
52 
54  m_meanSampleGroups = buildToolMap<int>(m_tools, "TileDigitsMeanSample", Tile::MAX_GAIN);
55  m_meanSampleProdGroups = buildToolMap<int>(m_tools, "TileDigitsMeanSampleProd", Tile::MAX_GAIN);
56  }
57 
59  m_pedGroups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsSample0",
60  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
61  }
62 
64  m_hfnGroups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsMeanRMS",
65  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
66  }
67 
69  m_samplesGroups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsSamples",
70  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
71  }
72 
74  m_profGroups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsProfile",
75  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
76  }
77 
79  m_evtMod32Groups = buildToolMap<std::vector<int>>(m_tools, "TileDigitsEvtMod32",
80  Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
81  }
82 
83  return StatusCode::SUCCESS;
84 }
85 
86 
87 StatusCode TileDigitsMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
88 
89  using Tile = TileCalibUtils;
90 
91  // In case you want to measure the execution time
92  auto timer = Monitored::Timer("TIME_execute");
93 
94  std::vector<float> meanSample[Tile::MAX_GAIN];
95  std::vector<float> meanSampleChannel[Tile::MAX_GAIN];
96 
97  std::vector<float> meanSampleProd[Tile::MAX_GAIN];
98  std::vector<float> meanSampleProdChannel1[Tile::MAX_GAIN];
99  std::vector<float> meanSampleProdChannel2[Tile::MAX_GAIN];
100 
101  const TileDQstatus* dqStatus = SG::makeHandle (m_dqStatusKey, ctx).get();
102 
103  // array of CIS parameters
104  const uint32_t* cispar = dqStatus->cispar();
105 
107  ATH_CHECK( digitsContainer.isValid() );
108 
109  for (const TileDigitsCollection* digitsCollection : *digitsContainer) {
110  if (digitsCollection->empty() ) continue;
111 
112  HWIdentifier adc_id = digitsCollection->front()->adc_HWID();
113  int ros = m_tileHWID->ros(adc_id);
114  int drawer = m_tileHWID->drawer(adc_id);
115  unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
116  int partition = ros - 1;
117 
118  const std::vector<uint32_t>& headerWordsLow = digitsCollection->getFragChipHeaderWords();
119  const std::vector<uint32_t>& headerWordsHigh = digitsCollection->getFragChipHeaderWordsHigh();
120  std::vector<std::reference_wrapper<const std::vector<uint32_t>>> headerWordsAll{headerWordsLow};
121  if (headerWordsHigh.empty()) {
122  // For mono gain run fill the plots with the same info for high gain
123  headerWordsAll.push_back(headerWordsLow);
124  } else {
125  headerWordsAll.push_back(headerWordsHigh);
126  }
127 
128  std::vector<std::vector<bool>> corruptedData(Tile::MAX_GAIN, std::vector<bool>(MAX_DMU));
129  uint32_t fragStatus = digitsCollection->getFragStatus();
130  if (checkCorruptedData(headerWordsAll, fragStatus, ros, drawer, corruptedData)) {
131  continue; // Dummy fragment or no fragment => nothing to check
132  }
133 
135  uint32_t rodBCID = digitsCollection->getRODBCID();
136  checkBCID(headerWordsAll, rodBCID, ros, drawer);
137 
138  bool isCalibMode = (dqStatus->calibMode() == 1);
139  if (isCalibMode) {
140  // global and DMU CRC check
141  int nDMU = headerWordsLow.size();
142  uint32_t crc32 = digitsCollection->getFragCRC();
143  uint32_t crcMask = digitsCollection->getFragDMUMask();
144  checkCRC(isCalibMode, crc32, crcMask, nDMU, ros, drawer);
145  }
146  }
147 
148 
149  // Below, the charge conversion for 12 bit is just an approximation;
150  // 4095. can be changed later to gain precision if needed.
151  double charge = 0;
152  if (m_is12bit) { // if 12 bit ADCs
153  charge = cispar[6] * cispar[7] * (2. * 4.096 / 4095.);
154  } else {
155  charge = cispar[6] * cispar[7] * (2. * 4.096 / 1023.);
156  }
157 
158  const TileDigits* moduleDigits[Tile::MAX_CHAN][Tile::MAX_GAIN] = {{nullptr}};
159 
160  for (const TileDigits* tile_digits : *digitsCollection) {
161 
162  adc_id = tile_digits->adc_HWID();
163  int channel = m_tileHWID->channel(adc_id);
164  int adc = m_tileHWID->adc(adc_id);
165 
166  if (corruptedData[adc][channel / 3]) {
167  continue;
168  }
169 
170  moduleDigits[channel][adc] = tile_digits;
171 
172  std::string channelGainSuffix = "_" + std::to_string(channel) + "_" + std::to_string(adc);
173 
174  const std::vector<float>& digits = tile_digits->samples();
175  unsigned int nSamples = digits.size();
176 
177  if (nSamples > 1) {
178 
180  double pedestal = digits[0];
181 
183  pedestal -= m_tileCondToolNoiseSample->getPed(drawerIdx, channel, adc, TileRawChannelUnit::ADCcounts, ctx);
184  }
185 
186  auto monSample0 = Monitored::Scalar<float>("sample0" + channelGainSuffix, pedestal);
187  fill(m_tools[m_pedGroups[partition][drawer]], monSample0);
188  }
189 
190 
192  double sampleMean = 0.0;
193  double sampleRMS = 0.0;
194 
195  for (double sample : digits) {
196  sampleMean += sample;
197  sampleRMS += sample * sample;
198  if (adc == 1 && sample > m_ADCmaxMinusEpsilon) {// overflow in high gain, find charge is it
199  auto monCharge = Monitored::Scalar<float>("charge", charge);
200  fill("TileDigitsOverflow", monCharge);
201  }
202  }
203 
204  sampleMean /= nSamples;
205  sampleRMS = sampleRMS / nSamples - sampleMean * sampleMean;
206  sampleRMS = (sampleRMS > 0.0) ? sqrt(sampleRMS * nSamples / (nSamples - 1)) : 0.0;
207 
209  meanSample[adc].push_back(sampleMean);
210  meanSampleChannel[adc].push_back(channel);
211  }
212 
213  auto monMeanRMS = Monitored::Scalar<float>("meanRMS" + channelGainSuffix, sampleRMS);
214  fill(m_tools[m_hfnGroups[partition][drawer]], monMeanRMS);
215  }
216 
217  if ((m_runType != CIS_RUN)
218  || (cispar[6] > 0. && (adc < 1 || charge < 12.))) {
219  // LF If CIS run, Protection to avoid zero amplitudes due to 0 injected charge
220 
222  auto monSamples = Monitored::Collection("samples" + channelGainSuffix, digits);
223  fill(m_tools[m_samplesGroups[partition][drawer]], monSamples);
224  }
225 
227  auto monSamples = Monitored::Collection("samples" + channelGainSuffix, digits);
228  std::vector<int> sampleNumbers(nSamples);
229  std::iota(sampleNumbers.begin(), sampleNumbers.end(), 0);
230  auto monSampleNumbers = Monitored::Collection("sampleNumbers" + channelGainSuffix, sampleNumbers);
231  fill(m_tools[m_profGroups[partition][drawer]], monSampleNumbers, monSamples);
232  }
233  }
234 
236  int evtMod32 = (ctx.evt() + 1) % 32;
237  auto monEvtMod32 = Monitored::Scalar<int>("evtn_mod32" + channelGainSuffix, evtMod32);
238  fill(m_tools[m_evtMod32Groups[partition][drawer]], monEvtMod32);
239  }
240 
241  }
242  } // digits
243 
245  for (unsigned int gain = 0; gain < Tile::MAX_GAIN; ++gain) {
246  if (!meanSampleChannel[gain].empty()) {
247  auto monChannel = Monitored::Collection("channel_" + Tile::getDrawerString(ros, drawer), meanSampleChannel[gain]);
248  auto monMeanSample = Monitored::Collection("meanSample_" + Tile::getDrawerString(ros, drawer), meanSample[gain]);
249  fill(m_tools[m_meanSampleGroups[gain]], monChannel, monMeanSample);
250 
251  for (int channel1 : meanSampleChannel[gain]) {
252  const std::vector<float>& digits1 = moduleDigits[channel1][gain]->samples();
253  for (int channel2 : meanSampleChannel[gain]) {
254  const std::vector<float>& digits2 = moduleDigits[channel2][gain]->samples();
255  double sampleProdMean = 0.;
256  unsigned int nSamples = digits1.size();
257  for (unsigned int i = 0; i < nSamples; ++i) {
258  sampleProdMean += digits1[i] * digits2[i];
259  }
260  sampleProdMean /= nSamples;
261  meanSampleProd[gain].push_back(sampleProdMean);
262  meanSampleProdChannel1[gain].push_back(channel1);
263  meanSampleProdChannel2[gain].push_back(channel2);
264  }
265  }
266  auto monChannel1 = Monitored::Collection("channel1_" + Tile::getDrawerString(ros, drawer), meanSampleProdChannel1[gain]);
267  auto monChannel2 = Monitored::Collection("channel2_" + Tile::getDrawerString(ros, drawer), meanSampleProdChannel2[gain]);
268  auto monMeanSampleProd = Monitored::Collection("meanSampleProd_" + Tile::getDrawerString(ros, drawer), meanSampleProd[gain]);
269  fill(m_tools[m_meanSampleProdGroups[gain]], monChannel1, monChannel2, monMeanSampleProd);
270 
271  meanSample[gain].clear();
272  meanSampleChannel[gain].clear();
273 
274  meanSampleProd[gain].clear();
275  meanSampleProdChannel1[gain].clear();
276  meanSampleProdChannel2[gain].clear();
277 
278  }
279  }
280  }
281  }
282 
283  if (dqStatus->calibMode() == 0 && !m_rawChannelContainerKey.empty()) {
284  if (checkROD_CRC(dqStatus, ctx).isFailure()) {
285  ATH_MSG_WARNING("Not possible to check CRC from ROD");
286  }
287  }
288 
289  fill("TileDigitsMonExecuteTime", timer);
290 
291  return StatusCode::SUCCESS;
292 }
293 
294 void TileDigitsMonitorAlgorithm::checkCRC(bool isCalibMode, uint32_t crc32, uint32_t crcMask,
295  int nDMU, int ros, int drawer) const {
296  /*
297  * Author: Luca. F. November 06
298  * This method provides CRC checks for Global and TileDMU chips.
299  * Global CRC is taken from the trailer and it is correct if
300  * the first 16 bits and the last 16 bits of the word match.
301  * TileDMU CRC is taken from the DMU mask filled in the FPGA.
302  * At the moment it makes sense only for monogain runs
303  * (Physics, LED, MonoCIS). The least significant 16 bits are the result of
304  * the CRC check in the FE (0xFFFF means all OK). The most significant 16 bits
305  * are the result of the CRC check in the ROD (0xFFFF means all OK).
306  */
307 
308  int partition = ros - 1;
309 
310  // array to adjust order of DMU's of EB* FE CRC status in DMU chip mask word
311  // this is needed because FE and ROD fill DMU mask word in different order
312  int dmuFE_EB[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 8, 9, 10, 11, 14, 15 };
313  int dmuFE_EB_special[16] = { 11, 0, 1, 2, 3, 4, 5, 6, 12, 13, 7, 8, 9, 10, 14, 15 };
314 
315  // global CRC
316  uint32_t crc0 = crc32 & 0xFFFF;
317  uint32_t crc1 = crc32 >> 16;
318 
319  int crcGlobal = (crc32 == 0) ? 0 : (crc0 == crc1) ? 1 : 2;
320  auto monGlobalCRC = Monitored::Scalar<int>("CRC_global", crcGlobal);
321  fill(m_tools[m_crcGlobalGroups[partition][drawer]], monGlobalCRC);
322 
323  // CRC per TileDMU. For mono gain we have it from ROD and FE.
324  // In bi gain, it is just a placeholder with global CRC information.
325  if (isCalibMode) {
326  for (int dmu = 0; dmu < nDMU; ++dmu) {
327  auto monCRCErr = Monitored::Scalar<int>("CRC_err_" + std::to_string(dmu), crcGlobal);
328  fill(m_tools[m_crcErrGroups[partition][drawer]], monCRCErr);
329  }
330  } else {
331  /*
332  * monogain: meaningful information.
333  * Fill 0 if crc32 if 0
334  * Fill 1 if both FE and ROD crc is 1
335  * Fill 2 if DMU FE crc is 0
336  * Fill 3 if DMU ROD crc is 0
337  * Fill 4 is FE and ROD crc is 0
338  */
339  int crcError = -1;
340  if (crc32 == 0) {
341  crcError = 0;
342  for (int dmu = 0; dmu < nDMU; ++dmu) {
343  auto monCRCErr = Monitored::Scalar<int>("CRC_err_" + std::to_string(dmu), crcError);
344  fill(m_tools[m_crcErrGroups[partition][drawer]], monCRCErr);
345  }
346  } else if (crcMask == 0xFFFFFFFF) {
347  crcError = 1;
348  for (int dmu = 0; dmu < nDMU; ++dmu) {
349  auto monCRCErr = Monitored::Scalar<int>("CRC_err_" + std::to_string(dmu), crcError);
350  fill(m_tools[m_crcErrGroups[partition][drawer]], monCRCErr);
351  }
352  } else {
353  uint32_t fe_crc = crcMask & 0xFFFF;
354  uint32_t rod_crc = crcMask >> 16;
355  for (int dmu = 0; dmu < nDMU; ++dmu) {
356  crcError = 1; // TileDMU is fine
357  if (ros < 3) { // LB* use simple FE CRC map
358  if ((fe_crc >> dmu & 0x1) == 0x0) {
359  ++crcError; // add FE error
360  }
361  } else {
362  // EB* use different FECRC map
363  if ((ros == 3 && drawer == 14) || (ros == 4 && drawer == 17)) {
364  // Special EBA15, EBC18
365  if ((fe_crc >> dmuFE_EB_special[dmu] & 0x1) == 0x0) {
366  ++crcError; // add FE error
367  }
368  } else {
369  if ((fe_crc >> dmuFE_EB[dmu] & 0x1) == 0x0) {
370  ++crcError; // add FE error
371  }
372  }
373  }
374  if ((rod_crc >> dmu & 0x1) == 0x0) {
375  crcError += 2; // add ROD error
376  }
377 
378  auto monCRCErr = Monitored::Scalar<int>("CRC_err_" + std::to_string(dmu), crcError);
379  fill(m_tools[m_crcErrGroups[partition][drawer]], monCRCErr);
380 
381  }
382  }
383  }
384 }
385 
386 
387 StatusCode TileDigitsMonitorAlgorithm::checkROD_CRC(const TileDQstatus* dqStatus, const EventContext& ctx) const {
388 
389  /*
390  * Author: Luca. F. Mar 08
391  * This method provides CRC checks for Global and TileDMU chips.
392  * They are taken from the the ROD RawChannel Container
393  * TileDMU CRC is taken from the DMU mask filled in the FPGA.
394  * It makes sense only for monogain runs
395  * (Physics, LED, MonoCIS). The least significant 16 bits are the result of
396  * the CRC check in the FE (0xFFFF means all OK). The most significant 16 bits
397  * are the result of the CRC check in the ROD (0xFFFF means all OK).
398  * Global CRC is taken also from the DQ Fragment. '0' means OK,
399  * '1' means mismatch.
400  */
401 
403  ATH_CHECK( rawChannelContainer.isValid() );
404 
405  for (const TileRawChannelCollection* rawChannelCollection : *rawChannelContainer) {
406  if (rawChannelCollection->empty()) continue;
407 
408  HWIdentifier hwid = rawChannelCollection->front()->adc_HWID(); // take the first channel in the drawer
409  int ros = m_tileHWID->ros(hwid); // take the ros and drawer from the first channel
410  int drawer = m_tileHWID->drawer(hwid);
411  uint32_t crc32 = rawChannelCollection->getFragGlobalCRC() & 1;
412 
413  if (crc32 == 0) {
414  crc32 = 0xFFFFFFFF;
415  } else { // means OK CRC match
416  crc32 = 0xFFFF;
417  } //means NOT OK, CRC mismatch
418 
419  uint32_t maskCRC = rawChannelCollection->getFragRODChipMask();
420  maskCRC = maskCRC << 16; // ROD mask is stored in the 16 most significant bits ce
421  maskCRC += rawChannelCollection->getFragFEChipMask();
422  checkCRC(dqStatus, crc32, maskCRC, 16, ros, drawer); // reuse the same funcion used for digits
423  }
424 
425  return StatusCode::SUCCESS;
426 }
427 
428 
429 bool TileDigitsMonitorAlgorithm::checkCorruptedData(const std::vector<std::reference_wrapper<const std::vector<uint32_t>>>& headerWordsAll,
430  uint32_t fragStatus, int ros, int drawer, std::vector<std::vector<bool>>& corruptedData) const {
431 
432  using Tile = TileCalibUtils;
433  int partition = ros - 1;
434 
435  std::vector<int> errors;
436  auto errorsInDMUs = Monitored::Collection("Error", errors);
437 
438  std::vector<int> dmus;
439  auto drawerDMUs = Monitored::Collection("DMU", dmus);
440 
442  if (fragStatus != TileFragStatus::ALL_OK) {
443  if (fragStatus & (TileFragStatus::ALL_FF | TileFragStatus::ALL_00)) {
444  error = DUMMY_FRAG;
445  } else if (fragStatus & (TileFragStatus::NO_FRAG | TileFragStatus::NO_ROB)) {
447  }
448  for (int dmu = 0; dmu < MAX_DMU; ++dmu) {
449  dmus.push_back(dmu);
450  errors.push_back(error);
451  }
453  for (unsigned int gain = 0; gain < Tile::MAX_GAIN; ++gain) {
454  fill(m_tools[m_errorsGroups[partition][drawer][gain]], drawerDMUs, errorsInDMUs);
455  }
456  }
457  return true;
458  }
459 
460  /*
461  * DMU header format as defined in http://www.sysf.physto.se/~klere/tile-dmu/header.html
462  * Bits: 1pllllesdrvvvv0mmgggbbbbbbbbbbbb
463  *
464  * The header starts with bit 31 set to indicate a header. The other bits as follows:
465  * p - Parity (odd)
466  * l - Derandomizer length (number of samples).
467  * e - Parity error. A parity error was detected from the memory in the last readout.
468  * s - SEstr Single Error Strobe recieved from the ttc.
469  * d - DEstr Double Error Strobe recieved from the ttc.
470  * r - Register parity. Parity from the registers in the chip.
471  * v - Variable parity. Parity from the variables in the chip.
472  * 0 - Not used. (Set to 0)
473  * m - Mode. 00 - Normal mode
474  * 01 - Calibration mode
475  * 10 - Test mode
476  * 11 - Not used
477  * g - High/low gain. Indicates high(1) or low(0) amplification from the 3-in-1 cards.
478  * b - Bunch Crossing.
479  */
480 
481  int gain = 0;
482  for (auto headerWords : headerWordsAll) {
483  int dmu = 0;
484  dmus.clear();
485  errors.clear();
486  for (uint32_t header : headerWords.get() ) {
487  error = OK;
489  corruptedData[gain][dmu] = true;
490  dmus.push_back(dmu);
491  errors.push_back(HEADER_FORM);
492  } else if (isHeaderParityError(header)) {
493  corruptedData[gain][dmu] = true;
494  dmus.push_back(dmu);
495  errors.push_back(HEADER_PAR);
496  } else {
497  if ((header >> 25) & 0x1) {
498  dmus.push_back(dmu);
499  error = MEMO_PAR;
500  errors.push_back(error);
501  }
502  if ((header >> 24) & 0x1) {
503  dmus.push_back(dmu);
504  error = SINGLE_STB;
505  errors.push_back(error);
506  }
507  if ((header >> 23) & 0x1) {
508  dmus.push_back(dmu);
509  error = DOUBLE_STB;
510  errors.push_back(error);
511  }
512  if (error == OK) {
513  dmus.push_back(dmu);
514  errors.push_back(OK);
515  } else {
516  int fragId = m_tileHWID->frag(ros, drawer);
517  if (!std::binary_search(m_fragIDsToIgnoreDMUerrors.begin(), m_fragIDsToIgnoreDMUerrors.end(), fragId)) {
518  corruptedData[gain][dmu] = true;
519  }
520  }
521  }
522  ++dmu;
523  }
525  fill(m_tools[m_errorsGroups[partition][drawer][gain]], drawerDMUs, errorsInDMUs);
526  }
527  ++gain;
528  }
529  return false;
530 }
531 
532 void TileDigitsMonitorAlgorithm::checkBCID(const std::vector<std::reference_wrapper<const std::vector<uint32_t>>>& headerWordsAll,
533  uint32_t rodBCID, int ros, int drawer) const {
534 
535  int gain = 0;
536  int partition = ros - 1;
537  for (auto headerWords : headerWordsAll) {
538  int dmu = 0;
539  for (uint32_t header : headerWords.get() ) {
540  uint32_t dmuBCID = (header & 0xFFF);
541  auto monBCID = Monitored::Scalar<int>("BCID_" + std::to_string(dmu), dmuBCID);
543 
544  if ((dmuBCID == rodBCID) || (dmuBCID == rodBCID - 1)
545  || ((rodBCID == 0) && ((dmuBCID == 3563) || (dmuBCID == 3564)))) {
546 
547  auto monBCIDErr = Monitored::Scalar<int>("BCID_err_" + std::to_string(dmu), 1);
548  fill(m_tools[m_bcidErrGroups[partition][drawer][gain]], monBCIDErr);
549  }
550  ++dmu;
551  }
552  ++gain;
553  }
554 }
TileDigitsMonitorAlgorithm::SINGLE_STB
@ SINGLE_STB
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::m_fillCorrelationsHistograms
Gaudi::Property< bool > m_fillCorrelationsHistograms
Definition: TileDigitsMonitorAlgorithm.h:66
TileDigitsMonitorAlgorithm::m_tileCondToolNoiseSample
ToolHandle< TileCondToolNoiseSample > m_tileCondToolNoiseSample
Definition: TileDigitsMonitorAlgorithm.h:75
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TileCalibMonitorAlgorithm::m_tileInfo
const TileInfo * m_tileInfo
Definition: TileCalibMonitorAlgorithm.h:98
TileDigitsMonitorAlgorithm::OK
@ OK
Definition: TileDigitsMonitorAlgorithm.h:35
header
Definition: hcg.cxx:526
TileDigitsMonitorAlgorithm::m_ADCmaxMinusEpsilon
float m_ADCmaxMinusEpsilon
Definition: TileDigitsMonitorAlgorithm.h:94
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
TileDigitsMonitorAlgorithm::MEMO_PAR
@ MEMO_PAR
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::m_fillEventModule32Histograms
Gaudi::Property< bool > m_fillEventModule32Histograms
Definition: TileDigitsMonitorAlgorithm.h:63
TileCalibMonitorAlgorithm::isHeaderFormatError
bool isHeaderFormatError(uint32_t header) const
Definition: TileCalibMonitorAlgorithm.h:42
python.ExitCodes.ALL_OK
int ALL_OK
successful run
Definition: ExitCodes.py:10
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileCalibMonitorAlgorithm::m_runType
Gaudi::Property< int > m_runType
Definition: TileCalibMonitorAlgorithm.h:84
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TileDQstatus::calibMode
uint32_t calibMode() const
Calibration mode.
Definition: TileDQstatus.h:148
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
TileDigitsMonitorAlgorithm::DOUBLE_STB
@ DOUBLE_STB
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::m_fillHighFrequencyNoiseHistograms
Gaudi::Property< bool > m_fillHighFrequencyNoiseHistograms
Definition: TileDigitsMonitorAlgorithm.h:54
TileCalibMonitorAlgorithm::isHeaderParityError
bool isHeaderParityError(uint32_t header) const
Definition: TileCalibMonitorAlgorithm.h:51
TileDigitsMonitorAlgorithm::m_samplesGroups
std::vector< std::vector< int > > m_samplesGroups
Definition: TileDigitsMonitorAlgorithm.h:88
TileDigitsMonitorAlgorithm::m_fillPedestalDifference
Gaudi::Property< bool > m_fillPedestalDifference
Definition: TileDigitsMonitorAlgorithm.h:45
TileDigitsMonitorAlgorithm::m_meanSampleGroups
std::vector< int > m_meanSampleGroups
Definition: TileDigitsMonitorAlgorithm.h:78
TileHWID::frag
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
Definition: TileHWID.h:181
TileInfo.h
TileCalibUtils.h
TileDigitsMonitorAlgorithm::m_crcErrGroups
std::vector< std::vector< int > > m_crcErrGroups
Definition: TileDigitsMonitorAlgorithm.h:81
TileCalibMonitorAlgorithm::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileCalibMonitorAlgorithm.h:97
TileDigitsMonitorAlgorithm::m_fillPedestalHistograms
Gaudi::Property< bool > m_fillPedestalHistograms
Definition: TileDigitsMonitorAlgorithm.h:51
TileDigitsMonitorAlgorithm::checkCRC
void checkCRC(bool isCalibMode, uint32_t crc32, uint32_t crcMask, int nDMU, int ros, int drawer) const
Definition: TileDigitsMonitorAlgorithm.cxx:294
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
TileRawData::adc_HWID
HWIdentifier adc_HWID(void) const
Definition: TileRawData.h:53
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
ReadCondHandle.h
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
python.utils.AtlRunQueryTimer.timer
def timer(name, disabled=False)
Definition: AtlRunQueryTimer.py:86
TileDigitsMonitorAlgorithm::m_bcidGroups
std::vector< std::vector< std::vector< int > > > m_bcidGroups
Definition: TileDigitsMonitorAlgorithm.h:82
TileDigitsMonitorAlgorithm::m_hfnGroups
std::vector< std::vector< int > > m_hfnGroups
Definition: TileDigitsMonitorAlgorithm.h:87
TileDigitsMonitorAlgorithm::m_digitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
Definition: TileDigitsMonitorAlgorithm.h:69
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
TileHWID::ros
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition: TileHWID.h:167
TileDigitsMonitorAlgorithm::m_fillProfileHistograms
Gaudi::Property< bool > m_fillProfileHistograms
Definition: TileDigitsMonitorAlgorithm.h:60
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
TileDigitsMonitorAlgorithm::m_errorsGroups
std::vector< std::vector< std::vector< int > > > m_errorsGroups
Definition: TileDigitsMonitorAlgorithm.h:84
TileDigitsMonitorAlgorithm::checkCorruptedData
bool checkCorruptedData(const std::vector< std::reference_wrapper< const std::vector< uint32_t >>> &headerWordsAll, uint32_t fragStatus, int ros, int drawer, std::vector< std::vector< bool >> &corruptedData) const
Definition: TileDigitsMonitorAlgorithm.cxx:429
TileDQstatus
Class that holds Data Quality fragment information and provides functions to extract the data quality...
Definition: TileDQstatus.h:49
TileHWID::adc
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
Definition: TileHWID.h:193
Tile
Definition: TileVolumeBuilder.h:43
TileDigitsMonitorAlgorithm::TileDigiErrors
TileDigiErrors
Definition: TileDigitsMonitorAlgorithm.h:35
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
lumiFormat.i
int i
Definition: lumiFormat.py:85
Monitored
Generic monitoring tool for athena components.
Definition: GenericMonitoringTool.h:30
python.LArBadChannelDBAlg.xFFFFFFFF
xFFFFFFFF
Definition: LArBadChannelDBAlg.py:73
TileDigitsMonitorAlgorithm::m_pedGroups
std::vector< std::vector< int > > m_pedGroups
Definition: TileDigitsMonitorAlgorithm.h:86
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TileDigitsMonitorAlgorithm::m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Definition: TileDigitsMonitorAlgorithm.h:72
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
TileDigits::samples
const std::vector< float > & samples() const
Definition: TileDigits.h:58
TileCalibMonitorAlgorithm::m_fragIDsToIgnoreDMUerrors
Gaudi::Property< std::vector< int > > m_fragIDsToIgnoreDMUerrors
Definition: TileCalibMonitorAlgorithm.h:78
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TileDigitsMonitorAlgorithm::m_meanSampleProdGroups
std::vector< int > m_meanSampleProdGroups
Definition: TileDigitsMonitorAlgorithm.h:79
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
TileCalibMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileCalibMonitorAlgorithm.cxx:9
AthMonitorAlgorithm::m_tools
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
Definition: AthMonitorAlgorithm.h:338
TileDigitsCollection
Definition: TileDigitsCollection.h:18
TileDigitsMonitorAlgorithm::HEADER_PAR
@ HEADER_PAR
Definition: TileDigitsMonitorAlgorithm.h:35
TileCalibMonitorAlgorithm::m_dqStatusKey
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
Definition: TileCalibMonitorAlgorithm.h:87
TileDigits
Definition: TileDigits.h:30
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TileDigitsMonitorAlgorithm::checkROD_CRC
StatusCode checkROD_CRC(const TileDQstatus *dqStatus, const EventContext &ctx) const
Definition: TileDigitsMonitorAlgorithm.cxx:387
TileDigitsMonitorAlgorithm::checkBCID
void checkBCID(const std::vector< std::reference_wrapper< const std::vector< uint32_t >>> &headerWordsAll, uint32_t rodBCID, int ros, int drawer) const
Definition: TileDigitsMonitorAlgorithm.cxx:532
TileRawChannelCollection
Definition: TileRawChannelCollection.h:12
charge
double charge(const T &p)
Definition: AtlasPID.h:538
TileDQstatus::cispar
const uint32_t * cispar() const
CIS parameters.
Definition: TileDQstatus.h:152
TileDigitsMonitorAlgorithm::NO_RECO_FRAG
@ NO_RECO_FRAG
Definition: TileDigitsMonitorAlgorithm.h:36
TileDigitsMonitorAlgorithm::m_crcGlobalGroups
std::vector< std::vector< int > > m_crcGlobalGroups
Definition: TileDigitsMonitorAlgorithm.h:80
TileDigitsMonitorAlgorithm::m_profGroups
std::vector< std::vector< int > > m_profGroups
Definition: TileDigitsMonitorAlgorithm.h:89
TileHWID::drawer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition: TileHWID.h:171
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
TileCalibMonitorAlgorithm::CIS_RUN
@ CIS_RUN
Definition: TileCalibMonitorAlgorithm.h:70
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.Classes.TileCalibUtils
TileCalibUtils
Definition: TileCalib/TileCalibBlobObjs/python/Classes.py:5
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
TileDigitsMonitorAlgorithm::MAX_DMU
static const int MAX_DMU
Definition: TileDigitsMonitorAlgorithm.h:92
TileDigitsMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: TileDigitsMonitorAlgorithm.cxx:87
TileDigitsMonitorAlgorithm.h
TileDigitsMonitorAlgorithm::HEADER_FORM
@ HEADER_FORM
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::m_bcidErrGroups
std::vector< std::vector< std::vector< int > > > m_bcidErrGroups
Definition: TileDigitsMonitorAlgorithm.h:83
LArDigits2NtupleDumper.nSamples
nSamples
Definition: LArDigits2NtupleDumper.py:70
TileDigitsMonitorAlgorithm::m_evtMod32Groups
std::vector< std::vector< int > > m_evtMod32Groups
Definition: TileDigitsMonitorAlgorithm.h:90
TileCalibUtils::getDrawerIdx
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Definition: TileCalibUtils.cxx:60
TileAANtupleConfig.rawChannelContainer
rawChannelContainer
Definition: TileAANtupleConfig.py:120
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
ReadHandle.h
Handle class for reading from StoreGate.
get_generator_info.error
error
Definition: get_generator_info.py:40
TileDigitsMonitorAlgorithm::m_fillSamplesHistograms
Gaudi::Property< bool > m_fillSamplesHistograms
Definition: TileDigitsMonitorAlgorithm.h:57
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
error
Definition: IImpactPoint3dEstimator.h:70
TileDigitsMonitorAlgorithm::DUMMY_FRAG
@ DUMMY_FRAG
Definition: TileDigitsMonitorAlgorithm.h:36
Monitored::Timer
A monitored timer.
Definition: MonitoredTimer.h:32
TileInfo::ADCmax
int ADCmax() const
Returns the maximum ADC output (10 bits --> 1023)
Definition: TileInfo.h:71
TileDigitsMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileDigitsMonitorAlgorithm.cxx:12
TileDigitsMonitorAlgorithm::m_fillErrorsHistograms
Gaudi::Property< bool > m_fillErrorsHistograms
Definition: TileDigitsMonitorAlgorithm.h:48
TileRawChannelUnit::ADCcounts
@ ADCcounts
Definition: TileRawChannelUnit.h:17
TileDigitsMonitorAlgorithm::m_is12bit
bool m_is12bit
Definition: TileDigitsMonitorAlgorithm.h:93