ATLAS Offline Software
CmxJetSubBlock.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #include "CmxJetSubBlock.h"
7 
8 namespace LVL1BS {
9 
10 // Constant definitions
11 
13 
27 
44 
48 //const int CmxJetSubBlock::s_energySmBits[8];
49 const int CmxJetSubBlock::s_energySmBits[8] = {3, 6, 5, 4, 7, 2, 9, 0};
66 
67 
69 {
70 }
71 
73 {
74 }
75 
76 // Clear all data
77 
79 {
81  m_tobData.clear();
82  m_hitsData.clear();
83  m_presenceMaps.clear();
84  m_parityBits.clear();
85 }
86 
87 // Return presence map for given JEM
88 
89 unsigned int CmxJetSubBlock::presenceMap(const int slice,
90  const int jem) const
91 {
92  unsigned int map = 0;
93  const unsigned int ix = mapIndex(slice, jem);
94  if (ix < m_presenceMaps.size()) map = m_presenceMaps[ix];
95  return map;
96 }
97 
98 // Return frame for given jem and tob
99 
100 int CmxJetSubBlock::frame(const int slice, const int jem, const int tob) const
101 {
102  int fr = 0;
103  const unsigned int ix = tobIndex(slice, jem, tob);
104  if (ix < m_tobData.size()) {
106  }
107  return fr;
108 }
109 
110 // Return Local coordinate for given jem and tob
111 
112 int CmxJetSubBlock::localCoord(const int slice, const int jem, const int tob) const
113 {
114  int coord = 0;
115  const unsigned int ix = tobIndex(slice, jem, tob);
116  if (ix < m_tobData.size()) {
118  }
119  return coord;
120 }
121 
122 // Return energy large window size for given jem and tob
123 
124 int CmxJetSubBlock::energyLarge(const int slice, const int jem, const int tob) const
125 {
126  int et = 0;
127  const unsigned int ix = tobIndex(slice, jem, tob);
128  if (ix < m_tobData.size()) {
130  }
131  return et;
132 }
133 
134 // Return energy small window size for given jem and tob
135 
136 int CmxJetSubBlock::energySmall(const int slice, const int jem, const int tob) const
137 {
138  int et = 0;
139  const unsigned int ix = tobIndex(slice, jem, tob);
140  if (ix < m_tobData.size()) {
142  }
143  return et;
144 }
145 
146 // Return error bits for given jem and tob
147 
148 int CmxJetSubBlock::tobError(int slice, int jem, int tob) const
149 {
150  int error = 0;
151  const unsigned int ix = tobIndex(slice, jem, tob);
152  if (ix < m_tobData.size()) {
154  }
155  return error;
156 }
157 
158 // Return parity bits for given JEM
159 
160 int CmxJetSubBlock::parityBits(const int slice, const int jem) const
161 {
162  int parity = 0;
163  const unsigned int ix = parIndex(slice, jem);
164  if (ix < m_parityBits.size()) parity = m_parityBits[ix];
165  return parity;
166 }
167 
168 // Return hit/topo counts for given source ID and HL flag
169 
170 unsigned int CmxJetSubBlock::hits(const int slice, const int source,
171  const int flag) const
172 {
173  unsigned int hits = 0;
174  const unsigned int ix = hitIndex(slice, source, flag);
175  if (ix < m_hitsData.size()) {
177  if (source == REMOTE_FORWARD || source == LOCAL_FORWARD
178  || source == TOTAL_FORWARD) {
180  }
181  else if (source == TOPO_CHECKSUM) mask = s_topoCheckMask;
182  else if (source == TOPO_OCCUPANCY_MAP) mask = s_topoMapMask;
183  else if (source == TOPO_OCCUPANCY_COUNTS) mask = s_topoCountsMask;
184  hits = (m_hitsData[ix] >> s_threshBit) & mask;
185  }
186  return hits;
187 }
188 
189 // Return hit error for given source ID and HL flag
190 
191 int CmxJetSubBlock::hitsError(const int slice, const int source,
192  const int flag) const
193 {
194  int error = 0;
195  if (source == REMOTE_MAIN || source == LOCAL_MAIN || source == TOTAL_MAIN ||
196  source == REMOTE_FORWARD || source == LOCAL_FORWARD ||
197  source == TOTAL_FORWARD) {
198  const unsigned int ix = hitIndex(slice, source, flag);
199  if (ix < m_hitsData.size()) {
201  }
202  }
203  return error;
204 }
205 
206 // Store presence map
207 
208 void CmxJetSubBlock::setPresenceMap(const int slice, const int jem,
209  const unsigned int map)
210 {
211  resize();
212  if (map) {
213  const unsigned int ix = mapIndex(slice, jem);
214  if (ix < m_presenceMaps.size()) m_presenceMaps[ix] = map;
215  }
216 }
217 
218 // Store TOB (RoI) data for given JEM, frame, local coord
219 
220 void CmxJetSubBlock::setTob(const int slice, const int jem, const int frame,
221  const int loc, const int energyLarge,
222  const int energySmall, const int error)
223 {
224  resize();
225  if (energyLarge || energySmall || error) {
226  uint32_t word = 0;
229  word |= (error & s_tobErrorMask) << s_tobErrorBit;
230  word |= (loc & s_tobCoordMask) << s_tobCoordBit;
231  word |= (frame & s_tobFrameMask) << s_tobFrameBit;
232  word |= (jem & s_tobJemMask) << s_tobJemBit;
233  word |= (s_tobWordId) << s_dataWordIdBit;
234  // Order by frame == presence bit // <<== CHECK
235  for (int tob = 0; tob < s_tobsPerModule; ++tob) {
236  const unsigned int ix = tobIndex(slice, jem, tob);
237  if (m_tobData[ix] == 0) {
238  m_tobData[ix] = word;
239  break;
240  } else {
241  const int frameOld = (m_tobData[ix] >> s_tobFrameBit)&s_tobFrameMask;
242  if (frame < frameOld) {
243  for (int i = s_tobsPerModule - tob - 1; i > 0; --i) {
244  m_tobData[ix + i] = m_tobData[ix + i - 1];
245  }
246  m_tobData[ix] = word;
247  break;
248  }
249  }
250  }
251  }
252 }
253 
254 // Store parity bits for neutral format
255 
256 void CmxJetSubBlock::setParityBits(const int slice, const int jem,
257  const int parity)
258 {
259  resize();
260  if (parity) {
261  const unsigned int ix = parIndex(slice, jem);
262  if (ix < m_parityBits.size()) m_parityBits[ix] = parity;
263  }
264 }
265 
266 // Store hit counts for given source ID and HL flag
267 
268 void CmxJetSubBlock::setHits(const int slice, const int source, const int flag,
269  const unsigned int hits, const int error)
270 {
271  resize();
272  const unsigned int ix = hitIndex(slice, source, flag);
273  if (ix < m_hitsData.size() && (hits || error)) {
274  uint32_t word = m_hitsData[ix];
276  if (source == REMOTE_FORWARD || source == LOCAL_FORWARD ||
277  source == TOTAL_FORWARD) {
279  }
280  else if (source == TOPO_CHECKSUM) mask = s_topoCheckMask;
281  else if (source == TOPO_OCCUPANCY_MAP) mask = s_topoMapMask;
282  else if (source == TOPO_OCCUPANCY_COUNTS) mask = s_topoCountsMask;
283  word |= (hits & mask) << s_threshBit;
284  word |= (error & s_errorMask) << s_threshErrorBit;
285  word |= (flag & s_hlFlagMask) << s_hlFlagBit;
286  word |= (source & s_sourceIdMask) << s_sourceIdBit;
287  word |= (s_threshWordId) << s_dataWordIdBit;
288  m_hitsData[ix] = word;
289  }
290 }
291 
292 // Packing/Unpacking routines
293 
295 {
296  bool rc = false;
297  switch (version()) {
298  case 1:
299  case 2: // <<== CHECK
300  switch (format()) {
301  case NEUTRAL:
302  rc = packNeutral();
303  break;
304  case UNCOMPRESSED:
305  rc = packUncompressed();
306  break;
307  default:
308  break;
309  }
310  break;
311  default:
312  break;
313  }
314  return rc;
315 }
316 
318 {
319  bool rc = false;
320  switch (version()) {
321  case 1:
322  case 2: // <<== CHECK
323  switch (format()) {
324  case NEUTRAL:
325  rc = unpackNeutral();
326  break;
327  case UNCOMPRESSED:
328  rc = unpackUncompressed();
329  break;
330  default:
332  break;
333  }
334  break;
335  default:
337  break;
338  }
339  return rc;
340 }
341 
342 // Return presence map index appropriate to format
343 
344 unsigned int CmxJetSubBlock::mapIndex(const int slice,
345  const int jem) const
346 {
347  unsigned int ix = jem;
348  if (format() == NEUTRAL) ix += slice * s_modules;
349  return ix;
350 }
351 
352 // Return parity bits index appropriate to format
353 
354 unsigned int CmxJetSubBlock::parIndex(const int slice,
355  const int jem) const
356 {
357  unsigned int ix = jem;
358  if (format() == NEUTRAL) ix += slice * s_modules;
359  return ix;
360 }
361 
362 // Return tob data index appropriate to format
363 
364 unsigned int CmxJetSubBlock::tobIndex(const int slice, const int jem,
365  const int tob) const
366 {
367  unsigned int ix = jem * s_tobsPerModule + tob;
368  if (format() == NEUTRAL) ix += slice * s_modules * s_tobsPerModule;
369  return ix;
370 }
371 
372 // Return hits data index appropriate to format
373 
374 unsigned int CmxJetSubBlock::hitIndex(const int slice, const int source,
375  const int flag) const
376 {
377  unsigned int ix = (source << 1) | flag;
378  if (format() == NEUTRAL) ix += slice * 2 * MAX_SOURCE_ID;
379  return ix;
380 }
381 
382 // Resize the data vectors according to format
383 
385 {
386  if (m_tobData.empty()) {
387  int size1 = s_modules * s_tobsPerModule;
388  int size2 = 2 * MAX_SOURCE_ID;
389  int size3 = s_modules;
390  int size4 = s_modules;
391  if (format() == NEUTRAL) {
392  size1 *= timeslices();
393  size2 *= timeslices();
394  size3 *= timeslices();
395  size4 *= timeslices();
396  }
397  m_tobData.resize(size1);
398  m_hitsData.resize(size2);
399  m_presenceMaps.resize(size3);
400  m_parityBits.resize(size4);
401  }
402 }
403 
404 // Pack neutral data
405 
407 {
408  resize();
409  std::vector<int> locVec(s_tobsPerModule);
410  std::vector<int> energyLgVec(s_tobsPerModule);
411  std::vector<int> energySmVec(s_tobsPerModule);
412  const int slices = timeslices();
413  for (int slice = 0; slice < slices; ++slice) {
414  for (int pin = 0; pin < s_glinkPins; ++pin) {
415  if (pin < s_modules) { // TOB data
416  const int jem = pin;
417  // Presence map
419  // Get tob data for this jem
420  locVec.clear();
421  energyLgVec.clear();
422  energySmVec.clear();
423  for (int tob = 0; tob < s_tobsPerModule; ++tob) {
424  locVec.push_back(localCoord(slice, jem, tob));
425  energyLgVec.push_back(energyLarge(slice, jem, tob));
426  energySmVec.push_back(energySmall(slice, jem, tob));
427  }
428  const int parity = parityBits(slice, jem);
429  // And pack
430  for (int tob = 0; tob < s_tobsPerModule; ++tob) {
431  // Energy small window LSB
432  const int nbitsL = s_energySmBits[2 * tob];
433  packerNeutral(pin, energySmVec[tob], nbitsL);
434  // Local coordinates
435  packerNeutral(pin, locVec[tob], s_coordBits);
436  // Energy large window
437  packerNeutral(pin, energyLgVec[tob], s_energyLgBits);
438  // Backplane parity error
439  packerNeutral(pin, (parity >> tob), s_parityErrorBits);
440  // Energy small window HSB
441  const int nbitsH = s_energySmBits[2 * tob + 1];
442  if (nbitsH > 0) {
443  packerNeutral(pin, (energySmVec[tob] >> nbitsL), nbitsH);
444  }
445  }
446  } else { // Hits and Topo data
447  if (pin < s_glinkPins - 1) {
448  // Remote, local and total hits; parity error
449  const int source1 = pin - s_modules + REMOTE_MAIN;
450  const int source2 = pin - s_modules + REMOTE_FORWARD;
451  packerNeutral(pin, hits(slice, source1, 0), s_threshMainBits);
452  packerNeutral(pin, hitsError(slice, source1, 0), s_parityErrorBits);
453  packerNeutral(pin, hits(slice, source1, 1), s_threshMainBits);
454  packerNeutral(pin, (hitsError(slice, source1, 1) >> 1), s_parityErrorBits);
455  packerNeutral(pin, hits(slice, source2, 0), s_threshFwdLBits);
456  packerNeutral(pin, hitsError(slice, source2, 0), s_parityErrorBits);
457  packerNeutral(pin, hits(slice, source2, 1), s_threshFwdHBits);
458  packerNeutral(pin, (hitsError(slice, source2, 1) >> 1), s_parityErrorBits);
459  packerNeutral(pin, (hitsError(slice, source1, 0) >> 2), s_roiOverflowBits);
460  packerNeutral(pin, 0, s_paddingBits);
461  } else {
462  // Bunch crossing number, Fifo overflow and Topo data
470  }
471  }
472  // G-Link parity
473  packerNeutralParity(pin);
474  }
475  }
476  return true;
477 }
478 
479 // Pack uncompressed data
480 
482 {
483  std::vector<uint32_t>::const_iterator pos;
484  for (pos = m_tobData.begin(); pos != m_tobData.end(); ++pos) {
485  if (*pos) packer(*pos, s_wordLength);
486  }
487  for (pos = m_hitsData.begin(); pos != m_hitsData.end(); ++pos) {
488  if (*pos) packer(*pos, s_wordLength);
489  }
490  packerFlush();
491  return true;
492 }
493 
494 // Unpack neutral data
495 
497 {
498  resize();
499  int bunchCrossing = 0;
500  int fifoOverflow = 0;
501  int glinkParity = 0;
502  std::vector<int> locVec(s_tobsPerModule);
503  std::vector<int> energyLgVec(s_tobsPerModule);
504  std::vector<int> energySmVec(s_tobsPerModule);
505  const int slices = timeslices();
506  for (int slice = 0; slice < slices; ++slice) {
507  for (int pin = 0; pin < s_glinkPins; ++pin) {
508  if (pin < s_modules) { // TOB data
509  // Presence map
510  const unsigned int map = unpackerNeutral(pin, s_presenceBits);
511  locVec.assign(s_tobsPerModule, 0);
512  energyLgVec.assign(s_tobsPerModule, 0);
513  energySmVec.assign(s_tobsPerModule, 0);
514  int parity = 0;
515  for (int tob = 0; tob < s_tobsPerModule; ++tob) {
516  // Energy small window LSB
517  const int nbitsL = s_energySmBits[2 * tob];
518  energySmVec[tob] = unpackerNeutral(pin, nbitsL);
519  // Local coordinates
520  locVec[tob] = unpackerNeutral(pin, s_coordBits);
521  // Energy large window
522  energyLgVec[tob] = unpackerNeutral(pin, s_energyLgBits);
523  // Backplane parity error
524  parity |= (unpackerNeutral(pin, s_parityErrorBits) << tob);
525  // Energy small window HSB
526  const int nbitsH = s_energySmBits[2 * tob + 1];
527  if (nbitsH > 0) {
528  energySmVec[tob] += (unpackerNeutral(pin, nbitsH) << nbitsL);
529  }
530  }
531  const int error = (parity) ? 1 : 0;
532  int tob = 0;
533  const int jem = pin;
534  for (int frame = 0; frame < s_presenceBits && tob < s_tobsPerModule; ++frame) { // <<== CHECK - assuming bit==frame
535  if ((map >> frame) & 1) {
536  setTob(slice, jem, frame, locVec[tob], energyLgVec[tob],
537  energySmVec[tob], error);
538  ++tob;
539  }
540  }
541  setPresenceMap(slice, jem, map);
542  setParityBits(slice, jem, parity);
543  } else { // Hits and Topo data
544  if (pin < s_glinkPins - 1) {
545  // Remote, local and total hits; parity error, RoI overflow
546  const int source1 = pin - s_modules + REMOTE_MAIN;
547  const int source2 = pin - s_modules + REMOTE_FORWARD;
548  const unsigned int main0 = unpackerNeutral(pin, s_threshMainBits);
549  int errorMain = unpackerNeutral(pin, s_parityErrorBits);
550  const unsigned int main1 = unpackerNeutral(pin, s_threshMainBits);
551  errorMain |= (unpackerNeutral(pin, s_parityErrorBits) << 1);
552  const unsigned int fwd0 = unpackerNeutral(pin, s_threshFwdLBits);
553  int errorFwd = unpackerNeutral(pin, s_parityErrorBits);
554  const unsigned int fwd1 = unpackerNeutral(pin, s_threshFwdHBits);
555  errorFwd |= (unpackerNeutral(pin, s_parityErrorBits) << 1);
556  const int overflow = (unpackerNeutral(pin, s_roiOverflowBits) << 2);
557  errorMain |= overflow;
558  errorFwd |= overflow;
559  setHits(slice, source1, 0, main0, errorMain);
560  setHits(slice, source1, 1, main1, errorMain);
561  setHits(slice, source2, 0, fwd0, errorFwd);
562  setHits(slice, source2, 1, fwd1, errorFwd);
564  } else {
565  // Bunch crossing number, Fifo overflow and Topo data
567  fifoOverflow |= unpackerNeutral(pin, s_fifoOverflowBits);
568  unsigned int hits = unpackerNeutral(pin, s_topoChecksumBits);
569  int error = 0;
578  }
579  }
580  // G-Link parity errors
582  }
583  }
585  setDaqOverflow(fifoOverflow);
587 
588  const bool rc = unpackerSuccess();
590  return rc;
591 }
592 
593 // Unpack uncompressed data
594 
596 {
597  resize();
598  const int maxHits = m_hitsData.size();
599  m_jemTobCount.assign(s_modules, 0);
600  unpackerInit();
602  while (unpackerSuccess()) {
603  const int id = dataWordId(word);
604  if (id == s_tobWordId) { // TOB data
605  const int index = jem(word);
606  const int count = m_jemTobCount[index];
607  const int index2 = index * s_tobsPerModule + count;
608  if (count < s_tobsPerModule) {
609  m_tobData[index2] = word;
610  ++m_jemTobCount[index];
611  } else {
612  setUnpackErrorCode(UNPACK_EXCESS_TOBS); // New code. Check consequences
613  return false;
614  }
615  } else if (id == s_threshWordId) { // Hits and Topo data
616  const int index = (sourceId(word) << 1) | hlFlag(word);
617  if (index < maxHits && m_hitsData[index] == 0) {
618  m_hitsData[index] = word;
619  } else {
621  return false;
622  }
623  } else {
624  setUnpackErrorCode(UNPACK_DATA_ID); // New code
625  return false;
626  }
627  word = unpacker(s_wordLength);
628  }
629  return true;
630 }
631 
632 } // end namespace
LVL1BS::CmxJetSubBlock::s_tobCoordMask
static const uint32_t s_tobCoordMask
Definition: CmxJetSubBlock.h:86
LVL1BS::CmxJetSubBlock::presenceMap
unsigned int presenceMap(int slice, int jem) const
Return presence map for given JEM.
Definition: CmxJetSubBlock.cxx:89
LVL1BS::CmxJetSubBlock::s_sourceIdBit
static const int s_sourceIdBit
Definition: CmxJetSubBlock.h:95
LVL1BS::L1CaloSubBlock::setBunchCrossing
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:328
LVL1BS::CmxJetSubBlock::clear
void clear()
Clear all data.
Definition: CmxJetSubBlock.cxx:78
et
Extra patterns decribing particle interation process.
LVL1BS::CmxJetSubBlock::s_hlFlagBit
static const int s_hlFlagBit
Definition: CmxJetSubBlock.h:94
LVL1BS::CmxJetSubBlock::m_tobData
std::vector< uint32_t > m_tobData
TOB data.
Definition: CmxJetSubBlock.h:151
LVL1BS::CmxJetSubBlock::s_tobEnergySmMask
static const uint32_t s_tobEnergySmMask
Definition: CmxJetSubBlock.h:84
LVL1BS::CmxJetSubBlock::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: CmxJetSubBlock.h:27
LVL1BS::CmxJetSubBlock::s_tobCoordBit
static const int s_tobCoordBit
Definition: CmxJetSubBlock.h:79
LVL1BS::CmxJetSubBlock::frame
int frame(int slice, int jem, int tob) const
Return frame for given jem and tob.
Definition: CmxJetSubBlock.cxx:100
LVL1BS::CmxJetSubBlock::setTob
void setTob(int slice, int jem, int frame, int loc, int energyLarge, int energySmall, int error)
Store TOB (RoI) data for given JEM, frame, local coord.
Definition: CmxJetSubBlock.cxx:220
LVL1BS::L1CaloSubBlock::clear
void clear()
Clear all data.
Definition: L1CaloSubBlock.cxx:82
LVL1BS::CmxJetSubBlock::s_threshMainBits
static const int s_threshMainBits
Definition: CmxJetSubBlock.h:114
LVL1BS::CmxJetSubBlock::s_presenceBits
static const int s_presenceBits
Definition: CmxJetSubBlock.h:109
LVL1BS::L1CaloSubBlock::packerNeutral
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.
Definition: L1CaloSubBlock.cxx:413
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
LVL1BS::CmxJetSubBlock::s_tobJemMask
static const uint32_t s_tobJemMask
Definition: CmxJetSubBlock.h:88
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
index
Definition: index.py:1
LVL1BS::CmxJetSubBlock::s_roiOverflowBits
static const int s_roiOverflowBits
Definition: CmxJetSubBlock.h:118
LVL1BS::CmxJetSubBlock::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: CmxJetSubBlock.h:28
LVL1BS::CmxJetSubBlock::parityBits
int parityBits(int slice, int jem) const
Return parity bits for given JEM.
Definition: CmxJetSubBlock.cxx:160
LVL1BS::CmxJetSubBlock::unpack
bool unpack()
Unpack data.
Definition: CmxJetSubBlock.cxx:317
LVL1BS::CmxJetSubBlock::s_threshFwdLBits
static const int s_threshFwdLBits
Definition: CmxJetSubBlock.h:115
LVL1BS::L1CaloSubBlock::setGlinkParity
void setGlinkParity(int bit=1)
Set G-Link Parity bit in Sub-status word.
Definition: L1CaloSubBlock.cxx:217
LVL1BS::L1CaloSubBlock::unpackerInit
void unpackerInit()
Initialise unpacker.
Definition: L1CaloSubBlock.cxx:393
LVL1BS::CmxJetSubBlock::s_tobFrameBit
static const int s_tobFrameBit
Definition: CmxJetSubBlock.h:80
LVL1BS::CmxJetSubBlock::s_topoMapBits
static const int s_topoMapBits
Definition: CmxJetSubBlock.h:123
LVL1BS::CmxJetSubBlock::MAX_SOURCE_ID
@ MAX_SOURCE_ID
Definition: CmxJetSubBlock.h:29
LVL1BS::L1CaloSubBlock::NEUTRAL
@ NEUTRAL
Definition: L1CaloSubBlock.h:28
LVL1BS::L1CaloSubBlock::UNPACK_SOURCE_ID
@ UNPACK_SOURCE_ID
Definition: L1CaloSubBlock.h:41
LVL1BS::CmxJetSubBlock::energyLarge
int energyLarge(int slice, int jem, int tob) const
Return energy large window size for given jem and tob.
Definition: CmxJetSubBlock.cxx:124
CmxJetSubBlock.h
LVL1BS::L1CaloSubBlock::slice
int slice() const
Definition: L1CaloSubBlock.h:258
LVL1BS::L1CaloSubBlock::packerFlush
void packerFlush()
Flush the current data word padded with zeros.
Definition: L1CaloSubBlock.cxx:331
LVL1BS::CmxJetSubBlock::s_energyLgBits
static const int s_energyLgBits
Definition: CmxJetSubBlock.h:111
LVL1BS::L1CaloSubBlock::bunchCrossing
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:333
LVL1BS::CmxJetSubBlock::s_topoCheckMask
static const uint32_t s_topoCheckMask
Definition: CmxJetSubBlock.h:102
LVL1BS::CmxJetSubBlock::s_tobEnergySmBit
static const int s_tobEnergySmBit
Definition: CmxJetSubBlock.h:77
LVL1BS::CmxJetSubBlock::s_topoPaddingBits
static const int s_topoPaddingBits
Definition: CmxJetSubBlock.h:125
LVL1BS::CmxJetSubBlock::s_sourceIdMask
static const uint32_t s_sourceIdMask
Definition: CmxJetSubBlock.h:106
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1BS::CmxJetSubBlock::hitIndex
unsigned int hitIndex(int slice, int source, int flag) const
Definition: CmxJetSubBlock.cxx:374
LVL1BS::CmxJetSubBlock::s_threshFwdHMask
static const uint32_t s_threshFwdHMask
Definition: CmxJetSubBlock.h:100
LVL1BS::CmxJetSubBlock::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: CmxJetSubBlock.h:28
LVL1BS::CmxSubBlock::timeslices
int timeslices() const
Definition: CmxSubBlock.cxx:48
LVL1BS::CmxJetSubBlock::s_tobFrameMask
static const uint32_t s_tobFrameMask
Definition: CmxJetSubBlock.h:87
LVL1BS::CmxJetSubBlock::s_threshFwdHBits
static const int s_threshFwdHBits
Definition: CmxJetSubBlock.h:116
LVL1BS::CmxJetSubBlock::s_threshBit
static const int s_threshBit
Definition: CmxJetSubBlock.h:90
LVL1BS::CmxJetSubBlock::unpackUncompressed
bool unpackUncompressed()
Unpack uncompressed data.
Definition: CmxJetSubBlock.cxx:595
LVL1BS::L1CaloSubBlock::packer
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
Definition: L1CaloSubBlock.cxx:302
LVL1BS::CmxJetSubBlock::s_energySmBits
static const int s_energySmBits[8]
Definition: CmxJetSubBlock.h:113
LVL1BS::CmxJetSubBlock::hits
unsigned int hits(int slice, int source, int flag) const
Return hit/topo counts for given source ID and HL flag.
Definition: CmxJetSubBlock.cxx:170
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1BS::CmxJetSubBlock::dataWordId
int dataWordId(uint32_t word) const
Definition: CmxJetSubBlock.h:163
LVL1BS::L1CaloSubBlock::UNPACK_DATA_TRUNCATED
@ UNPACK_DATA_TRUNCATED
Definition: L1CaloSubBlock.h:40
LVL1BS::CmxJetSubBlock::localCoord
int localCoord(int slice, int jem, int tob) const
Return Local coordinate for given jem and tob.
Definition: CmxJetSubBlock.cxx:112
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1BS::L1CaloSubBlock::setDaqOverflow
void setDaqOverflow(int bit=1)
Set DAQ FIFO Overflow bit in Sub-status word.
Definition: L1CaloSubBlock.cxx:206
LVL1BS::CmxJetSubBlock::s_tobEnergyLgBit
static const int s_tobEnergyLgBit
Definition: CmxJetSubBlock.h:76
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
LVL1BS::CmxJetSubBlock::s_paddingBits
static const int s_paddingBits
Definition: CmxJetSubBlock.h:119
LVL1BS::L1CaloSubBlock::UNPACK_EXCESS_TOBS
@ UNPACK_EXCESS_TOBS
Definition: L1CaloSubBlock.h:42
master.flag
bool flag
Definition: master.py:29
LVL1BS::L1CaloSubBlock::unpackerNeutralParityError
bool unpackerNeutralParityError(int pin)
Unpack and test G-Link parity bit for given pin.
Definition: L1CaloSubBlock.cxx:464
LVL1BS::CmxJetSubBlock::packUncompressed
bool packUncompressed()
Pack uncompressed data.
Definition: CmxJetSubBlock.cxx:481
LVL1BS::CmxJetSubBlock::s_dataWordIdBit
static const int s_dataWordIdBit
Definition: CmxJetSubBlock.h:96
LVL1BS::L1CaloSubBlock::format
int format() const
Definition: L1CaloSubBlock.h:248
LVL1BS::L1CaloSubBlock::unpacker
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
Definition: L1CaloSubBlock.cxx:345
LVL1BS::CmxJetSubBlock::CmxJetSubBlock
CmxJetSubBlock()
Definition: CmxJetSubBlock.cxx:68
LVL1BS::L1CaloSubBlock::daqOverflow
bool daqOverflow() const
Definition: L1CaloSubBlock.h:303
LVL1BS::L1CaloSubBlock::UNPACK_VERSION
@ UNPACK_VERSION
Definition: L1CaloSubBlock.h:38
LVL1BS::CmxJetSubBlock::s_tobErrorMask
static const uint32_t s_tobErrorMask
Definition: CmxJetSubBlock.h:85
LVL1BS::CmxJetSubBlock::s_tobJemBit
static const int s_tobJemBit
Definition: CmxJetSubBlock.h:81
LVL1BS::CmxJetSubBlock::tobIndex
unsigned int tobIndex(int slice, int jem, int tob) const
Definition: CmxJetSubBlock.cxx:364
LVL1BS::CmxJetSubBlock::s_wordLength
static const int s_wordLength
Data word length.
Definition: CmxJetSubBlock.h:74
LVL1BS::CmxJetSubBlock::s_tobEnergyLgMask
static const uint32_t s_tobEnergyLgMask
Definition: CmxJetSubBlock.h:83
LVL1BS::CmxJetSubBlock::s_tobWordId
static const int s_tobWordId
Definition: CmxJetSubBlock.h:82
LVL1BS::CmxJetSubBlock::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: CmxJetSubBlock.h:28
LVL1BS::CmxJetSubBlock::jem
int jem(uint32_t word) const
Definition: CmxJetSubBlock.h:173
LVL1BS::CmxJetSubBlock::s_dataWordIdMask
static const uint32_t s_dataWordIdMask
Definition: CmxJetSubBlock.h:107
LVL1BS::CmxJetSubBlock::s_muxPhases
static const int s_muxPhases
Definition: CmxJetSubBlock.h:129
LVL1BS::CmxJetSubBlock::pack
bool pack()
Pack data.
Definition: CmxJetSubBlock.cxx:294
LVL1BS::CmxJetSubBlock::m_presenceMaps
std::vector< unsigned int > m_presenceMaps
Presence maps.
Definition: CmxJetSubBlock.h:155
LVL1BS::CmxJetSubBlock::REMOTE_MAIN
@ REMOTE_MAIN
Definition: CmxJetSubBlock.h:26
LVL1BS::L1CaloSubBlock::version
int version() const
Definition: L1CaloSubBlock.h:243
LVL1BS::CmxJetSubBlock::m_parityBits
std::vector< int > m_parityBits
Parity data for neutral format.
Definition: CmxJetSubBlock.h:157
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
LVL1BS::L1CaloSubBlock::unpackerSuccess
bool unpackerSuccess() const
Return unpacker success flag.
Definition: L1CaloSubBlock.h:354
LVL1BS::CmxJetSubBlock::s_threshWordId
static const int s_threshWordId
Definition: CmxJetSubBlock.h:97
LVL1BS::CmxJetSubBlock::tobError
int tobError(int slice, int jem, int tob) const
Return error bit for given jem and tob.
Definition: CmxJetSubBlock.cxx:148
LVL1BS::CmxJetSubBlock::m_jemTobCount
std::vector< int > m_jemTobCount
JEM TOB count vector for unpacking.
Definition: CmxJetSubBlock.h:159
LVL1BS::CmxJetSubBlock::~CmxJetSubBlock
~CmxJetSubBlock()
Definition: CmxJetSubBlock.cxx:72
LVL1BS::CmxJetSubBlock::s_bunchCrossingBits
static const int s_bunchCrossingBits
Definition: CmxJetSubBlock.h:120
LVL1BS::CmxJetSubBlock::s_tobErrorBit
static const int s_tobErrorBit
Definition: CmxJetSubBlock.h:78
LVL1BS::CmxJetSubBlock::setPresenceMap
void setPresenceMap(int slice, int jem, unsigned int map)
Store presence map.
Definition: CmxJetSubBlock.cxx:208
LVL1BS::CmxJetSubBlock::s_topoCountsBits
static const int s_topoCountsBits
Definition: CmxJetSubBlock.h:124
LVL1BS::CmxJetSubBlock::s_topoChecksumBits
static const int s_topoChecksumBits
Definition: CmxJetSubBlock.h:122
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::CmxJetSubBlock::setParityBits
void setParityBits(int slice, int jem, int parity)
Store parity bits for neutral format.
Definition: CmxJetSubBlock.cxx:256
LVL1BS::CmxJetSubBlock::mapIndex
unsigned int mapIndex(int slice, int jem) const
Definition: CmxJetSubBlock.cxx:344
LVL1BS::CmxJetSubBlock::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: CmxJetSubBlock.h:27
DeMoScan.index
string index
Definition: DeMoScan.py:362
LVL1BS::CmxJetSubBlock::TOTAL_MAIN
@ TOTAL_MAIN
Definition: CmxJetSubBlock.h:26
LVL1BS::CmxJetSubBlock::unpackNeutral
bool unpackNeutral()
Unpack neutral data.
Definition: CmxJetSubBlock.cxx:496
LVL1BS::CmxJetSubBlock::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: CmxJetSubBlock.h:27
LVL1BS::CmxJetSubBlock::s_threshMainMask
static const uint32_t s_threshMainMask
Definition: CmxJetSubBlock.h:98
LVL1BS::CmxJetSubBlock::sourceId
int sourceId(uint32_t word) const
Definition: CmxJetSubBlock.h:168
LVL1BS
Definition: ZdcByteStreamReadV1V2Tool.h:47
LVL1BS::CmxJetSubBlock::s_errorMask
static const uint32_t s_errorMask
Definition: CmxJetSubBlock.h:101
LVL1BS::L1CaloSubBlock::setUnpackErrorCode
void setUnpackErrorCode(int code)
Set the unpacking error code.
Definition: L1CaloSubBlock.h:338
LVL1BS::CmxJetSubBlock::s_parityErrorBits
static const int s_parityErrorBits
Definition: CmxJetSubBlock.h:117
LVL1BS::CmxJetSubBlock::s_glinkPins
static const int s_glinkPins
Definition: CmxJetSubBlock.h:126
LVL1BS::CmxJetSubBlock::s_threshErrorBit
static const int s_threshErrorBit
Definition: CmxJetSubBlock.h:91
LVL1BS::CmxJetSubBlock::s_coordBits
static const int s_coordBits
Definition: CmxJetSubBlock.h:110
LVL1BS::CmxJetSubBlock::s_topoMapMask
static const uint32_t s_topoMapMask
Definition: CmxJetSubBlock.h:103
LVL1BS::CmxJetSubBlock::resize
void resize()
Definition: CmxJetSubBlock.cxx:384
LVL1BS::L1CaloSubBlock::unpackerNeutral
uint32_t unpackerNeutral(int pin, int nbits)
Unpack given number of bits of neutral data for given pin.
Definition: L1CaloSubBlock.cxx:445
get_generator_info.error
error
Definition: get_generator_info.py:40
LVL1BS::CmxJetSubBlock::hlFlag
int hlFlag(uint32_t word) const
Definition: CmxJetSubBlock.h:178
LVL1BS::CmxJetSubBlock::packNeutral
bool packNeutral()
Pack neutral data.
Definition: CmxJetSubBlock.cxx:406
LVL1BS::CmxJetSubBlock::setHits
void setHits(int slice, int source, int flag, unsigned int hits, int error)
Store hit counts for given source ID and HL flag.
Definition: CmxJetSubBlock.cxx:268
LVL1BS::L1CaloSubBlock::UNPACK_DATA_ID
@ UNPACK_DATA_ID
Definition: L1CaloSubBlock.h:42
LVL1BS::CmxJetSubBlock::s_tobsPerModule
static const int s_tobsPerModule
Definition: CmxJetSubBlock.h:128
grepfile.fr
fr
Definition: grepfile.py:32
LVL1BS::CmxJetSubBlock::s_threshFwdLMask
static const uint32_t s_threshFwdLMask
Definition: CmxJetSubBlock.h:99
LVL1BS::L1CaloSubBlock::glinkParity
bool glinkParity() const
Definition: L1CaloSubBlock.h:318
error
Definition: IImpactPoint3dEstimator.h:70
LVL1BS::CmxJetSubBlock::s_topoCountsMask
static const uint32_t s_topoCountsMask
Definition: CmxJetSubBlock.h:104
LVL1BS::CmxJetSubBlock::hitsError
int hitsError(int slice, int source, int flag) const
Return hit error for given source ID and HL flag.
Definition: CmxJetSubBlock.cxx:191
LVL1BS::CmxJetSubBlock::s_modules
static const int s_modules
Definition: CmxJetSubBlock.h:127
LVL1BS::CmxJetSubBlock::s_fifoOverflowBits
static const int s_fifoOverflowBits
Definition: CmxJetSubBlock.h:121
LVL1BS::CmxJetSubBlock::s_hlFlagMask
static const uint32_t s_hlFlagMask
Definition: CmxJetSubBlock.h:105
LVL1BS::CmxJetSubBlock::energySmall
int energySmall(int slice, int jem, int tob) const
Return energy small window size for given jem and tob.
Definition: CmxJetSubBlock.cxx:136
LVL1BS::CmxJetSubBlock::m_hitsData
std::vector< uint32_t > m_hitsData
Hits and topo data.
Definition: CmxJetSubBlock.h:153
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
LVL1BS::CmxJetSubBlock::parIndex
unsigned int parIndex(int slice, int jem) const
Definition: CmxJetSubBlock.cxx:354
LVL1BS::L1CaloSubBlock::UNCOMPRESSED
@ UNCOMPRESSED
Definition: L1CaloSubBlock.h:28
LVL1BS::CmxJetSubBlock::LOCAL_MAIN
@ LOCAL_MAIN
Definition: CmxJetSubBlock.h:26
LVL1BS::L1CaloSubBlock::UNPACK_FORMAT
@ UNPACK_FORMAT
Definition: L1CaloSubBlock.h:39
LVL1BS::L1CaloSubBlock::packerNeutralParity
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.
Definition: L1CaloSubBlock.cxx:434