ATLAS Offline Software
PixelRawContByteStreamTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PixelRawContByteStreamTool.cxx
7 // Implementation file for class PixelRawContByteStreamTool
9 // (c) ATLAS Pixel Detector software
12 // Version 00-00-39 05/03/2007 Daniel Dobos
14 
18 
19 
20 //#define PIXEL_DEBUG ;
21 //#define PLOTS ;
22 
24 // constructor
26 PixelRawContByteStreamTool::PixelRawContByteStreamTool(const std::string& type,const std::string& name,const IInterface* parent) :
28 {
29  declareInterface<PixelRawContByteStreamTool>(this);
30  declareProperty("RodBlockVersion",m_RodBlockVersion=0);
31  declareProperty("BCs_per_LVL1ID",m_BCs_per_LVL1ID=1);
32 }
33 
35 // destructor
38 }
39 
41 // initialize
44 
45  ATH_CHECK(m_pixelReadout.retrieve());
46 
47  ATH_CHECK(detStore()->retrieve(m_PixelID, "PixelID"));
48 
50 
53 
54  ATH_CHECK( m_byteStreamCnvSvc.retrieve() );
55 
56  return StatusCode::SUCCESS;
57 }
58 
60 // finalize
63  return StatusCode::SUCCESS;
64 }
65 
67 // convert -
70  FullEventAssembler<SrcIdMap>* fea = nullptr;
71  ATH_CHECK( m_byteStreamCnvSvc->getFullEventAssembler (fea,
72  "PixelRawCont") );
74 
75  // set ROD Minor version
77  ATH_MSG_DEBUG("Setting ROD Minor Version Number to: " << m_RodBlockVersion);
78 
79  //loop over the Pixel modules
80  PixelRDO_Container::const_iterator it_coll = cont->begin();
81  PixelRDO_Container::const_iterator it_coll_end = cont->end();
82  ATH_MSG_DEBUG("Found " << cont->size() << " Pixel modules");
83 
85  if (not pixCabling.isValid()){
86  ATH_MSG_ERROR("The pixel cabling could not be retrieved in PixelRawContByteStreamTool::convert");
87  return StatusCode::FAILURE;
88  }
89  for( ; it_coll!=it_coll_end;++it_coll) {
90  const InDetRawDataCollection<PixelRDORawData>* coll = (*it_coll) ;
91 
92  // get OfflineId and RODID
93  if (coll != nullptr){
94  Identifier offlineId = coll->identify();
95  uint32_t rodId = pixCabling->find_entry_offrob(offlineId);
96  if (rodId<1) {
97  ATH_MSG_ERROR("Didn't found ROBID for OfflineID: 0x" << std::hex << offlineId << std::dec);
98  }
99 
100  // loop over the HITS
103 
104  std::vector<const PixelRDORawData*> RDOs;
105  for(; it_b!=it_e; ++it_b){ RDOs.push_back((*it_b)); }
106 
107  theROD = fea->getRodData(rodId);
108  fillROD( *theROD, RDOs, m_BCs_per_LVL1ID);
109 
110  }
111  else {
112  ATH_MSG_WARNING("IDC contains NULLpointer to collection, skipping collection");
113  }
114  }
115  return StatusCode::SUCCESS;
116 }
117 
118 static const InterfaceID IID_IPixelRawContByteStreamTool("PixelRawContByteStreamTool", 1, 0);
119 
121  return IID_IPixelRawContByteStreamTool;
122 }
123 
124 
126 // fillROD() - convert Pixel RDO to a vector of 32bit words
128 void PixelRawContByteStreamTool::fillROD(std::vector<uint32_t>& v32rod, std::vector<const PixelRDORawData*> RDOs, int BCs_per_LVL1ID) const {
129  ATH_MSG_DEBUG("#####################################################################################");
130  ATH_MSG_DEBUG("Entering PixelRodEncoder");
131 
132  // Loop over the Hits in a ROD
133  std::vector<const PixelRDORawData*>::iterator rdo_it = RDOs.begin();
134  std::vector<const PixelRDORawData*>::iterator rdo_it_end = RDOs.end();
135 
136  bool is_ibl_present = false;
137 
138  const InDetDD::SiNumerology& pixSiNum = m_pixelManager->numerology();
139  is_ibl_present = (pixSiNum.numLayers() == 4);
140  ATH_MSG_DEBUG("is_ibl_present = " << is_ibl_present);
141  ATH_MSG_DEBUG("pixSiNum.numLayers() = " << pixSiNum.numLayers());
142 
143  bool is_ibl_module = false;
144  bool is_dbm_module = false;
145  ATH_MSG_DEBUG("in fillROD with " << BCs_per_LVL1ID << " LVL1As");
146  ATH_MSG_DEBUG("Dimension of the RDO vector: " << RDOs.size());
147 
148  int hitDiscCnfg = 2;
149 
151  //SG::ReadCondHandle<PixelHitDiscCnfgData> pixHitDiscCnfg(m_condHitDiscCnfgKey);
152  std::unique_ptr<SG::ReadCondHandle<PixelHitDiscCnfgData> > pixHitDiscCnfg;
153 
154  // ordering of the elements of the RDOs vector by offlineId, n5
155  if (rdo_it != rdo_it_end) {
156  OrderInitialRdos orderInitialRdos(m_pixelReadout, m_PixelID, pixCabling);
157  std::sort(rdo_it, rdo_it_end, orderInitialRdos);
158  }
159  // end of ordering of the elements of the RDOs vector by offlineId, n5
160  // NOW the RDOs should be ordered following (1) the offlineId, (2) the FE number
161 
162  rdo_it = RDOs.begin();
163  if (rdo_it!=rdo_it_end) {
164  const PixelRDORawData* rawdata;
165  Identifier offlineId;
166  Identifier prev_offlineId(0x0);
167  Identifier pixelId;
168  bool timing_error = false;
169  bool condensedMode = false;
170  bool linkMasked = false;
171  uint32_t linknumber(0);
172  uint32_t FE(0);
173  uint32_t sLink(0);
174  uint32_t n5(0);
175  uint32_t prev_n5(0);
176 
177  int last_BCID = 0; // needed for encoding of timing information
178  while (rdo_it!=rdo_it_end) {
179  ATH_MSG_DEBUG("Inside cycle on the rdo_it");
180 
181  rawdata = (*rdo_it);
182  pixelId = rawdata->identify();
183  offlineId = m_PixelID->wafer_id(pixelId);
184 
185  uint32_t robId = pixCabling->find_entry_offrob(offlineId);
186  uint64_t onlineId = pixCabling->find_entry_offon(offlineId); // (32bit) working on modules, not on single pixels
187 
188  linknumber = (onlineId >> 24) & 0xFFFF;
189 
190  // All these functions below are methods of the class PixelRDORawData, InnerDetector/InDetRawEvent/InDetRawData
191  int TOT = rawdata->getToT(); // it returns a 8 bits "word"
192  int BCID = rawdata->getBCID();
193  int LVL1ID = rawdata->getLVL1ID();
194  int LVL1A = rawdata->getLVL1A();
195 
196  if (m_pixelReadout->getModuleType(offlineId) == InDetDD::PixelModuleType::IBL_PLANAR || m_pixelReadout->getModuleType(offlineId) == InDetDD::PixelModuleType::IBL_3D) {
197  is_ibl_module = true;
198  }
199  if (m_pixelReadout->getModuleType(offlineId) == InDetDD::PixelModuleType::DBM) {
200  is_dbm_module = true;
201  }
202 
203  ATH_MSG_DEBUG(" ********************* robId retrieved: 0x" << std::hex << robId << std::dec);
204  ATH_MSG_DEBUG("offlineId retrieved: " << offlineId);
205  ATH_MSG_DEBUG("onlineId retrieved: 0x" << std::hex << onlineId << ", linknumber retrieved: 0x" << linknumber << std::dec
206  << ", ToT: " << TOT << ", BCID: " << BCID << ", LVL1ID: " << LVL1ID << ", LVL1A: " << LVL1A);
207  ATH_MSG_DEBUG("Is IBL = " << is_ibl_module << " or is DBM = " << is_dbm_module);
208 
209  //*************************************************************************************************
210  // ************************************* PIXEL CASE *****************************************
211  //*************************************************************************************************
212  if (!(is_ibl_module||is_dbm_module)) {
213  ATH_MSG_DEBUG("This is the PixelCase of the PixelRodEncoder");
214  //----------------------------------------------------------------------------------------------
215  //- Fill the data
216  //----------------------------------------------------------------------------------------------
217  if (prev_offlineId!=offlineId) {
218  int fake_BCID;
219  timing_error = false;
220  if (BCs_per_LVL1ID<LVL1A) { // That must not happen, if LVL1A > BCs_per_LVL1ID, BCs_perLVL1ID is wrongly set in the joboptions
221  ATH_MSG_DEBUG("LVL1A > BCs_per_LVL1ID, timing corrupt, ignoring timing." << " Set BCs per LVL1ID: " << BCs_per_LVL1ID);
222  timing_error = true;
223  }
224  if (prev_offlineId!=0x0) {
225  v32rod.push_back(packLinkTrailer(0x0));
226  ATH_MSG_DEBUG("Pixel module trailer");
227  ATH_MSG_DEBUG(" ------------------------------------------------------------------------------------------");
228 
229  //------------------------------------------------------------------------------------
230  //- Write empty Header/Trailer pairs after the level1 accept
231  //------------------------------------------------------------------------------------
232  fake_BCID = last_BCID;
233  int max_BCID = fake_BCID+BCs_per_LVL1ID-LVL1A-1;
234 
235  while ((fake_BCID<max_BCID) && !timing_error) {
236  fake_BCID++;
237  v32rod.push_back(packLinkHeader(linknumber, fake_BCID, LVL1ID, (LVL1ID>>4), 0x0));
238  v32rod.push_back(packLinkTrailer(0x0));
239  ATH_MSG_DEBUG("(after) empty Pixel Module header/trailer pair written for BCID " << fake_BCID);
240  } // end while cycle "while ((fake_BCID < max_BCID) && !timing_error)"
241  } // end if "if (prev_offlineId != 0x0) "
242 
243  //--------------------------------------------------------------------------------------
244  //- Write empty Header/Trailer pairs before the level1 accept
245  //--------------------------------------------------------------------------------------
246  fake_BCID = BCID-LVL1A;
247 
248  while ((fake_BCID<BCID) && !timing_error) {
249  v32rod.push_back(packLinkHeader(linknumber, fake_BCID, LVL1ID, (LVL1ID>>4), 0x0));
250  v32rod.push_back(packLinkTrailer(0x0));
251  ATH_MSG_DEBUG("(before) empty Pixel Module header/trailer pair written for BCID " << fake_BCID);
252  fake_BCID++;
253  } // end while cycle "while ((fake_BCID < BCID) && !timing_error)"
254 
255  v32rod.push_back(packLinkHeader(linknumber, BCID, LVL1ID, (LVL1ID>>4), 0x0));
256  ATH_MSG_DEBUG("Pixel module header");
257  } // end if "if (prev_offlineId != offlineId) "
258 
259  //--------------------------------------------------------------------------------------
260  //- Write RawDataWord
261  //--------------------------------------------------------------------------------------
262  FE = m_pixelReadout->getFE(pixelId, offlineId);
263  uint32_t row = m_pixelReadout->getRow(pixelId, offlineId);
264  uint32_t column = m_pixelReadout->getColumn(pixelId, offlineId);
265  v32rod.push_back(packRawDataWord(FE, row, column, TOT));
266 
267  // The following was used for running a validation scrip and making validation plots
268 #ifdef PLOTS
269  int eta_i = m_PixelID->eta_index(pixelId);
270  int phi_i = m_PixelID->phi_index(pixelId);
271  std::cout << "[PlotB]: " << robId << " " << eta_i << " " << phi_i << " " << TOT << std::endl;
272  std::cout << "[PlotC]: " << robId << " " << column << " " << row << " " << TOT << std::endl;
273 
274  std::cout << "[VAL] " << std::hex << pixelId << " 0x" << robId << " 0x" << onlineId // << " " << offlineId
275  << std::dec << " " << m_PixelID->eta_module(pixelId) << " " << m_PixelID->phi_module(pixelId)
276  << " " << m_PixelID->eta_index(pixelId) << " " << m_PixelID->phi_index(pixelId) << std::endl;
277 #endif
278 
279  ++rdo_it;
280  last_BCID = BCID;
281 
282  ATH_MSG_DEBUG("Found hit in PIXEL with PixelID: 0x" << std::hex << pixelId << std::dec << " FE: " << FE << " Row: " << row << " Column: " << column
283  << " TOT: " << TOT << " BCID: " << BCID << " LVL1ID: " << LVL1ID << " LVL1A: " << LVL1A);
284  ATH_MSG_DEBUG("Encoded Pixel OfflineID: 0x" << std::hex << offlineId << " OnlineID: 0x" << onlineId << " -> Linknumber: 0x" << linknumber << std::dec);
285 
286  prev_offlineId = offlineId;
287  } // end Pixel Case
288  //*************************************************************************************************
289  // ************************************* IBL CASE *****************************************
290  //*************************************************************************************************
291  else {
292  ATH_MSG_DEBUG("Inside the IBL/DBM case of the PixelRodEncoder");
293 
294  uint32_t linkNum = (onlineId>>24) & 0xFFFF;
295  unsigned int localFE = m_pixelReadout->getFE(pixelId, m_PixelID->wafer_id(pixelId));
296  FE = (linkNum>>(localFE*8)) & 0xF;
297 
298  sLink = onlineId & 0xF; // extract the LSB 4 bits from the onlineId
299  if (sLink > 0x3) {
300  ATH_MSG_WARNING("The SLink is not in the correct range [0,3]. This is due to the non-correct onlineId/ROBID definition. Skipping this RDO");
301  continue; // skipping this rdo, because it gives wrong onlineID (and, possibly, other pieces of information are wrong too)
302  }
303  n5 = ((sLink & 0x3)<<3) | (FE & 0x7); // this variable contains the 5 "nnnnn" bits, the 2 MSB ones representing the copy of the S-Link number (0 to 3) and the 2 LSBs representing the FE number over the S-Link
304  ATH_MSG_DEBUG("FE (w.r.t. SLink) = 0x" << std::hex << FE << " sLink: 0x" << sLink << " => n5: 0x" << n5 << std::dec);
305 
306  if (!pixHitDiscCnfg) {
307  pixHitDiscCnfg = std::make_unique<SG::ReadCondHandle<PixelHitDiscCnfgData> >(m_condHitDiscCnfgKey);
308  }
309  if (m_pixelReadout->getModuleType(offlineId) == InDetDD::PixelModuleType::IBL_PLANAR || m_pixelReadout->getModuleType(offlineId) == InDetDD::PixelModuleType::DBM) {
310  hitDiscCnfg = (*pixHitDiscCnfg)->getHitDiscCnfgPL();
311  }
312  else if (m_pixelReadout->getModuleType(offlineId) == InDetDD::PixelModuleType::IBL_3D) {
313  hitDiscCnfg = (*pixHitDiscCnfg)->getHitDiscCnfg3D();
314  }
315 
316  //----------------------------------------------------------------------------------------------
317  //- Fill the data
318  //----------------------------------------------------------------------------------------------
319  ATH_MSG_DEBUG("(prev_offlineId != offlineId) = " << (prev_offlineId != offlineId) << " (prev_n5 != n5) = " << (prev_n5 != n5) << " ");
320  ATH_MSG_DEBUG("prev_offlineId = " << prev_offlineId);
321 
322  if ((prev_offlineId!=offlineId) || (prev_n5!=n5)) {
323  int fake_BCID;
324  timing_error = false;
325  if (BCs_per_LVL1ID < LVL1A) { // That must not happen, if LVL1A > BCs_per_LVL1ID, BCs_perLVL1ID is wrongly set in the joboptions
326  ATH_MSG_DEBUG("LVL1A > BCs_per_LVL1ID, timing corrupt, ignoring timing." << " Set BCs per LVL1ID: " << BCs_per_LVL1ID);
327  timing_error = true;
328  }
329 
330  if (prev_offlineId != 0x0) {
331  v32rod.push_back(packLinkTrailer_IBL(prev_n5, timing_error, condensedMode, linkMasked)); // Trailer for IBL
332  condensedMode = false;
333  ATH_MSG_DEBUG("IBL Module trailer (because prev_offlineId != 0x0)");
334 
335  //------------------------------------------------------------------------------------
336  //- Write empty Header/Trailer pairs after the level1 accept
337  //------------------------------------------------------------------------------------
338  fake_BCID = last_BCID;
339  int max_BCID = fake_BCID+BCs_per_LVL1ID-LVL1A-1;
340 
341  while ((fake_BCID < max_BCID) && !timing_error) {
342  fake_BCID++;
343  v32rod.push_back(packLinkHeader_IBL(n5, fake_BCID, LVL1ID, 0x0)); // Header for IBL
344  v32rod.push_back(packLinkTrailer_IBL(n5, timing_error, condensedMode, linkMasked)); // Trailer for IBL
345 
346  ATH_MSG_DEBUG("(after) empty IBL Module header/trailer pair written for BCID " << fake_BCID);
347  } // end while cycle "while ((fake_BCID < max_BCID) && !timing_error)"
348  } // end if "if (prev_offlineId != 0x0) "
349 
350  //--------------------------------------------------------------------------------------
351  //- Write empty Header/Trailer pairs before the level1 accept
352  //--------------------------------------------------------------------------------------
353  fake_BCID = BCID-LVL1A;
354 
355  while ((fake_BCID<BCID) && !timing_error) {
356  v32rod.push_back(packLinkHeader_IBL(n5, fake_BCID, LVL1ID, 0x0)); // Header for IBL
357  v32rod.push_back(packLinkTrailer_IBL(n5, timing_error, condensedMode, linkMasked)); // Trailer for IBL
358  ATH_MSG_DEBUG("(before) empty IBL Module header/trailer pair written for BCID " << fake_BCID);
359  fake_BCID++;
360  } // end while cycle "while ((fake_BCID < BCID) && !timing_error)"
361 
362  v32rod.push_back(packLinkHeader_IBL(n5, BCID, LVL1ID, 0x0)); // Header for IBL
363  ATH_MSG_DEBUG("IBL Module header");
364  } // end if "if (prev_offlineId != offlineId) "
365 
366  //--------------------------------------------------------------------------------------
367  //- Write RawData word
368  //--------------------------------------------------------------------------------------
369  std::vector<const PixelRDORawData*> rdos_sameIBL_offlineId; // vector containing all the rdos with the same offlineId => belonging to the same IBL FE-I4 chip
370 
371  // This loop fills the rdo_sameIBL_offlineId vector with all the RDOs that have the same offlineId and same FEw.r.t.SLink => all RDOs coming from the same FE
372  for (; (rdo_it!=rdo_it_end) && ((((m_pixelReadout->getModuleType((*rdo_it)->identify())==InDetDD::PixelModuleType::IBL_PLANAR)
373  || (m_pixelReadout->getModuleType((*rdo_it)->identify())==InDetDD::PixelModuleType::IBL_3D)) && is_ibl_module)
374  || (m_pixelReadout->getModuleType((*rdo_it)->identify())==InDetDD::PixelModuleType::DBM && is_dbm_module)); ++rdo_it) {
375 
376  Identifier pixelId_probe = (*rdo_it)->identify();
377  Identifier offlineId_probe = m_PixelID->wafer_id(pixelId_probe);
378 
379  uint32_t linkNum = (onlineId>>24) & 0xFFFF;
380  unsigned int localFE = m_pixelReadout->getFE(pixelId_probe, offlineId_probe);
381  uint32_t fe_probe = (linkNum>>(localFE*8)) & 0xF;
382 
383 
384  ATH_MSG_DEBUG("offlineId: " << offlineId << " offlineId_probe: " << offlineId_probe << ", fe: " << FE << " fe_probe: " << fe_probe);
385 
386  if ((offlineId_probe == offlineId) && (FE == fe_probe)) {
387  ATH_MSG_DEBUG("=======> IN ");
388  rdos_sameIBL_offlineId.push_back((*rdo_it));
389  }
390  else {
391  ATH_MSG_DEBUG("=======> OUT.");
392  break;
393  }
394  }
395 
396  std::vector<const PixelRDORawData*>::iterator rdo_same_it = rdos_sameIBL_offlineId.begin();
397  std::vector<const PixelRDORawData*>::iterator rdo_same_it_end = rdos_sameIBL_offlineId.end();
398 
399 #ifdef PIXEL_DEBUG
400  //check: list of all the rdos with same offlineId, listing also the column, the row and the Tot
401  for (; rdo_same_it != rdo_same_it_end; ++rdo_same_it) {
402  Identifier pixelId_probe = (*rdo_same_it)->identify();
403  uint32_t col = m_pixelReadout->getColumn(pixelId_probe, offlineId); // offlineId of rdos in rdos_sameIBL_offlineId vector are, of course, all equal
404  uint32_t row = m_pixelReadout->getRow(pixelId_probe, offlineId);
405  int tot = (*rdo_same_it)->getToT();
406  ATH_MSG_DEBUG("col: " << col << " (0x" << std::hex << col << std::dec << ")\trow: "<< row << " (0x" << std::hex << row << std::dec << ")\ttot: " << tot << "(0x" <<std::hex << tot << std::dec << ")");
407  }
408 
409  rdo_same_it = rdos_sameIBL_offlineId.begin();
410  rdo_same_it_end = rdos_sameIBL_offlineId.end();
411 #endif
412 
413  // Order the RDOs within the vector rdos_sameIBL_offlineId, following the ordering rules of orderRdos
414  OrderRdos orderRdos(offlineId, m_pixelReadout);
415  std::sort(rdo_same_it, rdo_same_it_end, orderRdos);
416 
417  //check:
418 #ifdef PIXEL_DEBUG
419  rdo_same_it = rdos_sameIBL_offlineId.begin();
420  rdo_same_it_end = rdos_sameIBL_offlineId.end();
421 
422  ATH_MSG_DEBUG("Re-ordered RDOs with Same offlineId:");
423  for (; rdo_same_it != rdo_same_it_end; ++rdo_same_it) {
424  Identifier pixelId_probe = (*rdo_same_it)->identify();
425  uint32_t col = m_pixelReadout->getColumn(pixelId_probe, offlineId);
426  uint32_t row = m_pixelReadout->getRow(pixelId_probe, offlineId);
427  int tot = (*rdo_same_it)->getToT();
428  int eta_i = m_PixelID->eta_index(pixelId_probe);
429  int phi_i = m_PixelID->phi_index(pixelId_probe);
430  int eta_m = m_PixelID->eta_module(pixelId_probe);
431  int phi_m = m_PixelID->phi_module(pixelId_probe);
432  ATH_MSG_DEBUG("pixelId: " << pixelId_probe << ", eta_i: " << eta_i << ", phi_i: " << phi_i << ", eta_m: " << eta_m << ", phi_m: ");
433  ATH_MSG_DEBUG("col: 0x" << std::hex << col << std::dec << ", row: 0x" <<std::hex << row << std::dec << ", tot = 0x" << std::hex << tot << std::dec);
434  }
435  ATH_MSG_DEBUG("rdos_sameIBL_offlineId.size() = " << rdos_sameIBL_offlineId.size());
436 #endif
437 #ifdef PLOTS
438  rdo_same_it = rdos_sameIBL_offlineId.begin();
439  rdo_same_it_end = rdos_sameIBL_offlineId.end();
440  for (; rdo_same_it != rdo_same_it_end; ++rdo_same_it) {
441  Identifier pixelId_probe = (*rdo_same_it)->identify();
442  uint32_t col = m_pixelReadout->getColumn(pixelId_probe, offlineId);
443  uint32_t row = m_pixelReadout->getRow(pixelId_probe, offlineId);
444  int tot = (*rdo_same_it)->getToT();
445  int eta_i = m_PixelID->eta_index(pixelId_probe);
446  int phi_i = m_PixelID->phi_index(pixelId_probe);
447  std::cout << "[Plot2]: " << robId << " " << eta_i << " " << phi_i << " " << tot << std::endl;
448  std::cout << "[Plot3]: " << robId << " " << col << " " << row << " " << tot << std::endl;
449  }
450 #endif
451 
453  // look for adjacent cell that can allow the "compression" of the two hit info in one:
454  // instead of having two hits (= 2 columns, 2 rows and 2 tots), in fact,
455  // if two adjacent pixels ([col, row] and [col, row+1]) have fired (respectively tot([col, row]) and tot([col, (row+1)])
456  // then
457  // the row in the hit will be the row with lower number, the column in the hit will be the common column number
458  // and the tot will be = (tot [(col, row)] << 4) | tot[(col, row+1)]
460 
461  std::vector <uint32_t> vRows;
462  std::vector <uint32_t> vCols;
463  std::vector <int> vTots;
464  bool doubleHit = false;
465  static const uint32_t rowsPerFE = 336;// FIXME: this is a hardcoded variable, would be better to get it from somewhere
466 
467  rdo_same_it = rdos_sameIBL_offlineId.begin();
468  rdo_same_it_end = rdos_sameIBL_offlineId.end();
469 
470  std::vector<const PixelRDORawData*>::iterator rdo_test_it = rdos_sameIBL_offlineId.begin();
471  ATH_MSG_DEBUG("Looking for adjacent pixels and saving col, row and tot information.");
472 
473  for (; rdo_same_it!=rdo_same_it_end; ++rdo_same_it) {
474  doubleHit = false;
475  Identifier pixelId_probe = (*rdo_same_it)->identify();
476  uint32_t col0 = m_pixelReadout->getColumn(pixelId_probe, offlineId);
477  uint32_t row0 = m_pixelReadout->getRow(pixelId_probe, offlineId);
478  int totInHitWord (0);
479 #ifdef PLOTS
480  std::cout << "[VAL] " << std::hex << pixelId_probe << " 0x" << robId << " 0x" << onlineId // << " " << offlineId
481  << std::dec << " " << m_PixelID->eta_module(pixelId_probe) << " " << m_PixelID->phi_module(pixelId_probe)
482  << " " << m_PixelID->eta_index(pixelId_probe) << " " << m_PixelID->phi_index(pixelId_probe) << std::endl;
483 #endif
484 
485  if (row0==rowsPerFE) {
486  ATH_MSG_DEBUG("Hit in the last row (== 336) of the IBL FE.");
487  }
488  else {
489  if ((rdo_same_it+1)!=rdo_same_it_end) {
490  rdo_test_it = rdo_same_it + 1;
491  Identifier pixelId_probe = (*rdo_test_it)->identify();
492  uint32_t col1 = m_pixelReadout->getColumn(pixelId_probe, offlineId);
493  uint32_t row1 = m_pixelReadout->getRow(pixelId_probe, offlineId);
494 #ifdef PLOTS
495  std::cout << "[VAL] " << std::hex << pixelId_probe << " 0x" << robId << " 0x" << onlineId // << " " << offlineId
496  << std::dec << " " << m_PixelID->eta_module(pixelId_probe) << " " << m_PixelID->phi_module(pixelId_probe)
497  << " " << m_PixelID->eta_index(pixelId_probe) << " " << m_PixelID->phi_index(pixelId_probe) << std::endl;
498 #endif
499 
500  ATH_MSG_DEBUG("Comparing rdo[i] = " << (*rdo_same_it) << " with rdo[i+1] = " << (*rdo_test_it));
501  ATH_MSG_DEBUG(" col0 = 0x" << std::hex << col0 << " col1 = 0x" << col1 << " row0 = 0x" << row0 << "\t row1 = 0x" << row1 << std::dec);
502 
503  if ((col1==col0) && (row1==(row0+1))) {
504  doubleHit = true;
505  ATH_MSG_DEBUG("Two adjacent hits found");
506 
507  int tot0 = (*rdo_same_it)->getToT();
508  int tot1 = (*rdo_test_it)->getToT();
509 
510  // Adjust ToT according to hitdisccnfg setting
511  if (hitDiscCnfg==2 && tot0==16) { tot0=2; }
512  if (hitDiscCnfg==2 && tot1==16) { tot1=2; }
513 
514  int overflow = 14;
515  if (hitDiscCnfg==1) { overflow=15; }
516  if (hitDiscCnfg==2) { overflow=16; }
517 
518  if (tot0>overflow) { tot0=overflow; }
519  if (tot1>overflow) { tot1=overflow; }
520 
521  totInHitWord = (tot0<<4) | tot1;
522 
523  ATH_MSG_DEBUG("doubleHit = " << std::boolalpha << doubleHit << std::noboolalpha << " ===> (col0 == col1) : 0x" << std::hex << col0 << " = 0x" << col1
524  << "; (row0 = row1 - 1) : 0x" << row0 << " => 0x" << row1 <<"; (tot0) : 0x" << tot0 << ", (tot1) : 0x" << tot1 << " => totInHitWord: 0x" << totInHitWord << std::dec);
525  ++rdo_same_it;
526  } // end if "(col1==col0) && (row1 == (row0+1))"
527  } // end if "(rdo_same_it + 1) != rdo_same_it_end"
528  else {
529  ATH_MSG_DEBUG("last rdo with same Offline Id");
530  } // end if it's the last rdo with same offlineId
531  } // end if "row0 == rowsPerFE" (== 336)
532 
533  if (!doubleHit) {
534  int tot0 = (*rdo_same_it)->getToT();
535 
536  // Adjust ToT according to hitdisccnfg setting
537  if (hitDiscCnfg==2 && tot0==16) { tot0=2; }
538 
539  int overflow = 14;
540  if (hitDiscCnfg==1) { overflow=15; }
541  if (hitDiscCnfg==2) { overflow=16; }
542  if (tot0>overflow) { tot0=overflow; }
543 
544  totInHitWord = (tot0<<4) | 0x0;
545 
546  ATH_MSG_DEBUG("doubleHit = " << std::boolalpha << doubleHit << std::noboolalpha << " ===> col0: 0x" << std::hex << col0 << std::dec << "; row0: 0x" << std::hex << row0 << std::dec << " totInHitWord: 0x" << std::hex << totInHitWord << std::dec);
547  }
548  vCols.push_back(col0);
549  vRows.push_back(row0);
550  vTots.push_back(totInHitWord);
551  } // end loop over the rdos with the same offlineId
552 
553  //check:
554 #ifdef PIXEL_DEBUG
555  ATH_MSG_DEBUG("CHECKs over the vectors storing columns, rows, ToTs of IBL/DBM hits:");
556  ATH_MSG_DEBUG(" vCols: ");
557  std::vector<uint32_t>::iterator vCols_it = vCols.begin();
558  std::vector<uint32_t>::iterator vCols_it_end = vCols.end();
559  for (; vCols_it != vCols_it_end; ++vCols_it) {
560  ATH_MSG_DEBUG("0x" << std::hex << *vCols_it << std::dec << " ");
561  }
562  ATH_MSG_DEBUG("vRows: ");
563  std::vector<uint32_t>::iterator vRows_it = vRows.begin();
564  std::vector<uint32_t>::iterator vRows_it_end = vRows.end();
565  for (; vRows_it != vRows_it_end; ++vRows_it) {
566  ATH_MSG_DEBUG("0x" << std::hex << *vRows_it << std::dec <<" ");
567  }
568  ATH_MSG_DEBUG("vTots: ");
569  std::vector<int>::iterator vTots_it = vTots.begin();
570  std::vector<int>::iterator vTots_it_end = vTots.end();
571  for (; vTots_it != vTots_it_end; ++vTots_it) {
572  ATH_MSG_DEBUG("0x" << std::hex << *vTots_it << std::dec << " ");
573  }
574  ATH_MSG_DEBUG("rdos_sameIBL_offlineId.size() = " << rdos_sameIBL_offlineId.size() << " vRows.size() = " << vRows.size() << " vCols.size() = " << vCols.size() << " vTots.size() = " << vTots.size());
575 #endif
576 
577  //Packing of the IBL hits
578  if (vRows.size() >= 5) {
579  ATH_MSG_DEBUG("5 (or more) IBL hits have been consequently found. They can be written as condensed hits");
580  while (vRows.size()>=5) {
581  packIBLcondensed(v32rod, vRows, vCols, vTots);
582  condensedMode= true;
583  }
584  }
585  if (vRows.size()!=0) { // packing remaining non-condensed IBL hit words
586  // int cycleCounter(0);
587  for (; vRows.size() != 0; ) {
588  v32rod.push_back(packRawDataWord_IBL(vRows.at(0), vCols.at(0), vTots.at(0), n5));
589  vRows.erase(vRows.begin());
590  vCols.erase(vCols.begin());
591  vTots.erase(vTots.begin());
592  }
593  }
594  last_BCID = BCID;
595 
596  ATH_MSG_DEBUG("Encoded IBL OfflineID: " << std::hex << offlineId << " OnlineID: 0x" << onlineId << std::dec);
597 
598  prev_offlineId = offlineId;
599  prev_n5 = n5;
600  // prev_FE = FE;
601  } // end of the IBL case
602  } // end WHILE cycle " while (rdo_it!=rdo_it_end) "
603 
604  if (is_ibl_module || is_dbm_module) {
605  v32rod.push_back(packLinkTrailer_IBL(n5, timing_error, condensedMode, linkMasked));
606  condensedMode = false;
607  ATH_MSG_DEBUG("Module IBL/DBM trailer (at end of the loop)");
608  }
609  else {
610  v32rod.push_back(packLinkTrailer(0x0));
611  ATH_MSG_DEBUG("Pixel module trailer");
612  }
613  } // end if "if (rdo_it != rdo_it_end)"
614  else {
615  ATH_MSG_DEBUG("rdo_it == rdo_it_end");
616  }
617  return;
618 }
619 
621 // encode module Header for Pixels
622 // Pixel Header: 001PtlbxxnnnnnnnMMMMLLLLBBBBBBBB,
625  lvl1idskip = 0; // FIXME LVL1IDskip hardcoded as 0
626  uint32_t result = 0;
627  result = PRB_LINKHEADER | ((bcid & PRB_BCIDmask) << PRB_BCIDskip) | ((lvl1id & PRB_L1IDmask) << PRB_L1IDskip) | ((lvl1idskip & PRB_L1IDSKIPmask) << PRB_L1IDSKIPskip) | ((module & PRB_MODULEmask) << PRB_MODULEskip) | ((errors & PRB_HEADERERRORSmask) << PRB_HEADERERRORSskip);
628 #ifdef PLOTS
629  std::cout << "[PlotA]:0x " << std::hex << result << std::dec << std::endl;
630  std::cout << "[PlotA]:(dec) " << result << std::endl;
631 #endif
632  return result;
633 }
634 
635 
637 // encode module Header for IBL
638 // IBL Header: 001nnnnnFLLLLLLLLLLLLLBBBBBBBBBB
641  uint32_t result = 0;
642  result = PRB_LINKHEADER | ((bcid & PRB_BCIDmask_IBL) << PRB_BCIDskip_IBL) | ((lvl1id & PRB_L1IDmask_IBL) << PRB_L1IDskip_IBL) | ((module & PRB_MODULEmask_IBL) << PRB_MODULEskip_IBL) | ((feFlag & PRB_FeI4BFLAGmask_IBL) << PRB_FeI4BFLAGskip_IBL);
643 #ifdef PIXEL_DEBUG
644  // std::cout << "IBL HEADER: linkNum (=n): 0x" << std::hex << module << std::dec << ", bcid: " << bcid << ", lvl1id: " << lvl1id << ", feFlag: " << feFlag << "====> Result: 0x" << std::hex << result << std::dec << std::endl;
645 #endif
646 #ifdef PLOTS
647  std::cout << "[Plot1]:0x " << std::hex << result << std::dec << std::endl;
648  std::cout << "[Plot1]:(dec) " << result << std::endl;
649 #endif
650  return result;
651 }
652 
653 
655 // encode IBL non-condensed hit word: 0-8: row,9-15: column, 16-23:TOT, 24-28: nLink ----> 100xxnnnTTTTTTTTCCCCCCCRRRRRRRRR
658  uint32_t result = 0;
659  result = PRB_DATAWORD | ((row & PRB_ROWmask_IBL) << PRB_ROWskip_IBL) | ((column & PRB_COLUMNmask_IBL) << PRB_COLUMNskip_IBL) | ((ToT & PRB_TOTmask) << PRB_TOTskip) | ((nLink & PRB_LINKNUMHITmask_IBL) << PRB_LINKNUMHITskip_IBL);
660 #ifdef PIXEL_DEBUG
661  // std::cout << "IBL NON-CONDENSED HIT: nLink: 0x" << std::hex << nLink << ", row: 0x" << row << ", col: 0x" << column << ", tot: 0x" << ToT << " ===> encoded IBL word: 0x" << result << std::dec << std::endl;
662 #endif
663 #ifdef PLOTS
664  std::cout << "[Plot1]:0x " << std::hex << result << std::dec << std::endl;
665  std::cout << "[Plot1]:(dec) " << result << std::endl;
666 #endif
667  return result;
668 }
669 
671 // encode PIXEL hit word: bits 0-7:row,8-12:column,16-23:TOT,24-27:FE ----> 100xFFFFTTTTTTTTxxxCCCCCRRRRRRRR
674 
675  uint32_t result = 0;
676  result = PRB_DATAWORD | ((row & PRB_ROWmask) << PRB_ROWskip) | ((column & PRB_COLUMNmask) << PRB_COLUMNskip) | ((ToT & PRB_TOTmask) << PRB_TOTskip) | ((FE & PRB_FEmask) << PRB_FEskip);
677 #ifdef PLOTS
678  std::cout << "[PlotA]:0x " << std::hex << result << std::dec << std::endl;
679  std::cout << "[PlotA]:(dec) " << result << std::endl;
680 #endif
681  return result;
682 }
683 
684 
686 // encode PIXEL module trailer (bits 26-28:trailer errors)
689  uint32_t result = PRB_LINKTRAILER | ((errors & PRB_TRAILERERRORSmask) << PRB_TRAILERERRORSskip);
690 #ifdef PLOTS
691  std::cout << "[PlotA]:0x " << std::hex << result << std::dec << std::endl;
692  std::cout << "[PlotA]:(dec) " << result << std::endl;
693 #endif
694  return result;
695 }
696 
697 
699 // encode IBL module trailer (bits 26-28:trailer errors)
701 uint32_t PixelRawContByteStreamTool::packLinkTrailer_IBL(uint32_t linknum, bool timeOutErrorBit, bool condensedModeBit, bool linkMasked) const {
702  // return PRB_LINKTRAILER |((timeOutErrorBit & PRB_TIMEOUTERRORmask_IBL) << PRB_TIMEOUTERRORskip_IBL) | ((condensedModeBit & PRB_CONDENSEDMODEmask_IBL) << PRB_CONDENSEDMODEskip_IBL) | ((linkMasked & PRB_LINKMASKEDmask_IBL) << PRB_LINKMASKEDskip_IBL) | ((linknum & PRB_LINKNUMTRAILERmask_IBL) << PRB_LINKNUMTRAILERskip_IBL);
704  result = PRB_LINKTRAILER | (timeOutErrorBit << PRB_TIMEOUTERRORskip_IBL) | (condensedModeBit << PRB_CONDENSEDMODEskip_IBL) | (linkMasked << PRB_LINKMASKEDskip_IBL) | ((linknum & PRB_LINKNUMTRAILERmask_IBL) << PRB_LINKNUMTRAILERskip_IBL);
705 #ifdef PIXEL_DEBUG
706  // std::cout << "IBL TRAILER: linknum = 0x" << std::hex << linknum << ", timeOutErrorBit: 0x" << timeOutErrorBit << ", condensedModeBit: 0x" << condensedModeBit << ", linkMasked: 0x" << linkMasked << ", ===> Result: 0x" << result << std::dec << std::endl;
707 #endif
708 #ifdef PLOTS
709  std::cout << "[Plot1]:0x " << std::hex << result << std::dec << std::endl;
710  std::cout << "[Plot1]:(dec) " << result << std::endl;
711 #endif
712  return result;
713 }
714 
715 
717 // Encode IBL Condensed hit words:
718 // for IBL condensed word: (R = row, C = column, T = TOT)
719 // 1st word: 101 RRRRRTTTTTTTTCCCCCCCRRRRRRRRR
720 // 2nd word: 1 CCCRRRRRRRRRTTTTTTTTCCCCCCCRRRR
721 // 3rd word: 1 TTTCCCCCCCRRRRRRRRRTTTTTTTTCCCC
722 // 4th word: 111 TTTTTTTTCCCCCCCRRRRRRRRRTTTTT
724 
725 void PixelRawContByteStreamTool::packIBLcondensed(std::vector <uint32_t> & v32rod, std::vector <uint32_t> & vRows, std::vector <uint32_t> & vCols, std::vector<int> & vTots) const {
726  unsigned int condWord[nCondensedWords];
727  condWord[0] = PRB_FIRSTHITCONDENSEDWORD | vRows[0] | (vCols[0] << skipRow) | (vTots[0] << (skipRow + skipCol) | ((vRows[1] & mask5) << (skipRow + skipCol + skipTOT)));
728 
729  condWord[1] = PRB_MIDDLEHITCONDENSEDWORD | (vRows[1] >> skip5) | (vCols[1] << skip4) | (vTots[1] << (skip4 + skipCol)) | (vRows[2] << (skip4+skipCol+skipTOT)) | ((vCols[2] & mask3) << (skip4+skipCol+skipTOT+skipRow));
730 
731  condWord[2] = PRB_MIDDLEHITCONDENSEDWORD | (vCols[2] >> skip3) | (vTots[2] << skip4) | (vRows[3] << (skip4+skipTOT)) | (vCols[3] << (skip4+skipTOT+skipRow)) | ((vTots[3] & mask3) << (skip4+skipTOT+skipRow+skipCol));
732 
733  condWord[3] = PRB_DATAMASK | (vTots[3] >> skip3) | (vRows[4] << skip5) | (vCols[4] << (skip5+skipRow)) | (vTots[4] << (skip5+skipRow+skipCol));
734 
735  for (int j(0); j < 4; ++j) {
736  v32rod.push_back(condWord[j]); // Filling the ROD vector here
737 #ifdef PLOTS
738  std::cout << "[Plot1]:0x " << std::hex << condWord[j] << std::dec << std::endl;
739  std::cout << "[Plot1]:(dec) " << condWord[j] << std::endl;
740 #endif
741  }
742 
743  vRows.erase (vRows.begin(), vRows.begin() + 5);
744  vCols.erase (vCols.begin(), vCols.begin() + 5);
745  vTots.erase (vTots.begin(), vTots.begin() + 5);
746  return;
747 }
748 
750 // function used by std::sort to order the RDO vector that contains RDOs with the same offlineId
751 // It orders the rdos_sameIBL_offlineId by //column (ascending order), row (ascending order, once the column is the same)
752 // example: coordinates (col, row): (1,1), (3,6), (1,2), (4,82), (4,81) become: (1,1), (1,2), (3,6), (4,81), (4,82).
754 bool OrderRdos::operator () (const PixelRDORawData* rdo0, const PixelRDORawData* rdo1) //, const Identifier & offlineId
755 {
756  // const uint32_t halfCols = 40; // this is the number of the FE-I4 columns / 2, because the two tokens in the FE-I4 run from the double column 0 to 19, and then from 39 to 20.
757  // This corresponds to column 1 to 40, and 79-80, 77-78, ... to 41-42.
758  Identifier pixelId0 = rdo0->identify();
759  uint32_t col0 = m_pixelReadout->getColumn(pixelId0, m_offlineId);
760  uint32_t row0 = m_pixelReadout->getRow(pixelId0, m_offlineId);
761  Identifier pixelId1 = rdo1->identify();
762  uint32_t col1 = m_pixelReadout->getColumn(pixelId1, m_offlineId);
763  uint32_t row1 = m_pixelReadout->getRow(pixelId1, m_offlineId);
764 
765  // Decide if (col0, row0) should be inserted in front of (col1, row1):
766 
767  // Check if both hits are in same column
768  if (col0 == col1) return (row0 < row1);
769 
770  // If not, check if they are in same double column
771  else if (((col0 == col1-1) && (col1%2 == 0)) || ((col1 == col0-1) && (col0%2 == 0))) {
772 
773  // If rows are equal, sort by ascending column
774  if (row0 == row1) return (col0 < col1);
775  // If rows are unequal, sort by ascending row
776  else return (row0 < row1);
777  }
778 
779  // Not in same double column: Separate between FE halfs
780  else {
781 
782  // If both hits are in second FE half: Sort by descending col
783  if (col0 > 40 && col1 > 40) return (col0 > col1);
784 
785  // Otherwise, sort by ascending col
786  else return (col0 < col1);
787  }
788 }
789 
791 {
792  Identifier pixelId0 = rdo0->identify();
793  Identifier offlineId0 = m_PixelID->wafer_id(pixelId0);
794  Identifier pixelId1 = rdo1->identify();
795  Identifier offlineId1 = m_PixelID->wafer_id(pixelId1);
796  if (offlineId0 < offlineId1) {
797  return true;
798  }
799  if (offlineId0 == offlineId1) {
800  if ( m_pixelReadout->getModuleType(pixelId0) == InDetDD::PixelModuleType::IBL_PLANAR
801  || m_pixelReadout->getModuleType(pixelId0) == InDetDD::PixelModuleType::IBL_3D
802  || m_pixelReadout->getModuleType(pixelId0) == InDetDD::PixelModuleType::DBM) { // IBL and DBM
803 
804  uint64_t onlineId0 = m_pixCabling->find_entry_offon(offlineId0);
805  uint32_t linkNum0 = (onlineId0>>24) & 0xFFFF;
806  unsigned int localFE0 = m_pixelReadout->getFE(pixelId0, offlineId0);
807  uint32_t fe0= (linkNum0>>(localFE0*8)) & 0xF;
808 
809  uint64_t onlineId1 = m_pixCabling->find_entry_offon(offlineId1);
810  uint32_t linkNum1 = (onlineId1>>24) & 0xFFFF;
811  unsigned int localFE1 = m_pixelReadout->getFE(pixelId1, offlineId1);
812  uint32_t fe1= (linkNum1>>(localFE1*8)) & 0xF;
813 
814  return (fe0 < fe1);
815  }
816  else { // PixelCase
817  uint32_t fe0 = m_pixelReadout->getFE(pixelId0, offlineId0);
818  uint32_t fe1 = m_pixelReadout->getFE(pixelId1, offlineId1);
819  return (fe0 < fe1);
820 
821  // return false;
822  }
823  }
824  else {return false; }
825 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
query_example.row
row
Definition: query_example.py:24
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
PixelRawContByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: PixelRawContByteStreamTool.cxx:43
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
PixelRawContByteStreamTool::m_condHitDiscCnfgKey
SG::ReadCondHandleKey< PixelHitDiscCnfgData > m_condHitDiscCnfgKey
Definition: PixelRawContByteStreamTool.h:94
PixelRawContByteStreamTool::interfaceID
static const InterfaceID & interfaceID()
Definition: PixelRawContByteStreamTool.cxx:120
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
get_generator_info.result
result
Definition: get_generator_info.py:21
PixelRawContByteStreamTool::packRawDataWord_IBL
uint32_t packRawDataWord_IBL(uint32_t row, uint32_t column, int ToT, uint32_t nLink) const
Definition: PixelRawContByteStreamTool.cxx:657
OrderRdos::m_offlineId
Identifier m_offlineId
Definition: PixelRawContByteStreamTool.h:101
PixelRawContByteStreamTool::fillROD
void fillROD(std::vector< uint32_t > &v32rod, std::vector< const PixelRDORawData * > RDOs, int BCs_per_LVL1ID) const
Definition: PixelRawContByteStreamTool.cxx:128
OrderInitialRdos::m_pixCabling
SG::ReadCondHandle< PixelCablingCondData > m_pixCabling
Definition: PixelRawContByteStreamTool.h:124
SG::ReadCondHandle< PixelCablingCondData >
FullEventAssembler< SrcIdMap >
PixelRawContByteStreamTool::m_byteStreamCnvSvc
ServiceHandle< ByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: PixelRawContByteStreamTool.h:78
InDetDD::PixelModuleType::DBM
@ DBM
PixelRawContByteStreamTool::packLinkTrailer_IBL
uint32_t packLinkTrailer_IBL(uint32_t FEonSLink, bool timeOutErrorBit, bool condensedModeBit, bool linkMasked) const
Definition: PixelRawContByteStreamTool.cxx:701
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
PixelRawContByteStreamTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:81
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PixelRDORawData::getLVL1ID
virtual int getLVL1ID() const =0
PixelRawContByteStreamTool::m_RodBlockVersion
unsigned short m_RodBlockVersion
Definition: PixelRawContByteStreamTool.h:87
InDetRawDataCollection::identify
virtual Identifier identify() const override final
IdentifiableContainerMT::size
size_t size() const
Duplicate of fullSize for backwards compatability.
Definition: IdentifiableContainerMT.h:209
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
PixelRawContByteStreamTool::convert
StatusCode convert(PixelRDO_Container *cont) const
Definition: PixelRawContByteStreamTool.cxx:69
DeMoUpdate.column
dictionary column
Definition: DeMoUpdate.py:1110
PixelCablingCondData::find_entry_offrob
uint32_t find_entry_offrob(Identifier offlineId) const
Definition: PixelCablingCondData.cxx:114
OrderInitialRdos::m_PixelID
const PixelID * m_PixelID
Definition: PixelRawContByteStreamTool.h:123
OrderRdos::operator()
bool operator()(const PixelRDORawData *rdo0, const PixelRDORawData *rdo1)
Definition: PixelRawContByteStreamTool.cxx:754
PixelRawContByteStreamTool::finalize
virtual StatusCode finalize() override
Definition: PixelRawContByteStreamTool.cxx:62
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
PixelRawContByteStreamTool::packLinkHeader_IBL
uint32_t packLinkHeader_IBL(uint32_t module, uint32_t bcid, uint32_t lvl1id, uint32_t feFlag) const
Definition: PixelRawContByteStreamTool.cxx:640
PixelRDORawData::getLVL1A
virtual int getLVL1A() const =0
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
OrderInitialRdos::operator()
bool operator()(const PixelRDORawData *rdo0, const PixelRDORawData *rdo1)
Definition: PixelRawContByteStreamTool.cxx:790
PixelRawContByteStreamTool::~PixelRawContByteStreamTool
virtual ~PixelRawContByteStreamTool()
Definition: PixelRawContByteStreamTool.cxx:37
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
python.PyAthena.module
module
Definition: PyAthena.py:134
OrderRdos
Definition: PixelRawContByteStreamTool.h:97
OrderInitialRdos
Definition: PixelRawContByteStreamTool.h:119
PixelDetectorManager.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
PixelCablingCondData::find_entry_offon
uint64_t find_entry_offon(const Identifier) const
Definition: PixelCablingCondData.cxx:102
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:242
PixelRDORawData::getToT
virtual int getToT() const =0
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:236
InDetDD::SiNumerology::numLayers
int numLayers() const
Number of layers.
PixelRawContByteStreamTool::m_condCablingKey
SG::ReadCondHandleKey< PixelCablingCondData > m_condCablingKey
Definition: PixelRawContByteStreamTool.h:91
LB_AnalMapSplitter.tot
tot
Definition: LB_AnalMapSplitter.py:46
PixelRawContByteStreamTool::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition: PixelRawContByteStreamTool.h:85
PixelRDORawData::getBCID
virtual int getBCID() const =0
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
PixelRawContByteStreamTool::packIBLcondensed
void packIBLcondensed(std::vector< uint32_t > &v32rod, std::vector< uint32_t > &vRows, std::vector< uint32_t > &vCols, std::vector< int > &vTots) const
Definition: PixelRawContByteStreamTool.cxx:725
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PixelRawContByteStreamTool::PixelRawContByteStreamTool
PixelRawContByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PixelRawContByteStreamTool.cxx:26
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
InDetDD::SiNumerology
Definition: SiNumerology.h:27
query_example.col
col
Definition: query_example.py:7
InDetDD::PixelModuleType::IBL_PLANAR
@ IBL_PLANAR
OrderInitialRdos::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:122
DataVector< RawDataT >::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
PixelRawContByteStreamTool::m_BCs_per_LVL1ID
int m_BCs_per_LVL1ID
Definition: PixelRawContByteStreamTool.h:88
PixelRawContByteStreamTool::packRawDataWord
uint32_t packRawDataWord(uint32_t FE, uint32_t row, uint32_t column, uint32_t ToT) const
Definition: PixelRawContByteStreamTool.cxx:673
FullEventAssembler::setRodMinorVersion
void setRodMinorVersion(uint16_t m)
change the ROD minor version
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
PixelRawContByteStreamTool::packLinkTrailer
uint32_t packLinkTrailer(uint32_t errors) const
Definition: PixelRawContByteStreamTool.cxx:688
PixelRawContByteStreamTool::m_PixelID
const PixelID * m_PixelID
Definition: PixelRawContByteStreamTool.h:83
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PixelRawContByteStreamTool.h
PixelRDORawData
Definition: PixelRDORawData.h:23
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
PixelRawContByteStreamTool::packLinkHeader
uint32_t packLinkHeader(uint32_t module, uint32_t bcid, uint32_t lvl1id, uint32_t lvl1idskip, uint32_t errors) const
Definition: PixelRawContByteStreamTool.cxx:624
AthAlgTool
Definition: AthAlgTool.h:26
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
InDetDD::PixelModuleType::IBL_3D
@ IBL_3D
FullEventAssembler::getRodData
RODDATA * getRodData(uint32_t id)
get a block of ROD data
DataVector< RawDataT >::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
PixelByteStreamErrors::LVL1ID
@ LVL1ID
Definition: PixelByteStreamErrors.h:13
OrderRdos::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:100