ATLAS Offline Software
CmxCpSubBlock.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 "CmxCpSubBlock.h"
7 
8 namespace LVL1BS {
9 
10 // Constant definitions
11 
13 
28 
40 
58 const int CmxCpSubBlock::s_modules;
61 
62 
64 {
65 }
66 
68 {
69 }
70 
71 // Clear all data
72 
74 {
76  m_tobData.clear();
77  m_hitsData.clear();
78  m_presenceMaps.clear();
79  m_overflow.clear();
80 }
81 
82 // Return presence map for given CPM
83 
84 unsigned int CmxCpSubBlock::presenceMap(const int slice,
85  const int cpm) const
86 {
87  unsigned int map = 0;
88  const unsigned int ix = mapIndex(slice, cpm);
89  if (ix < m_presenceMaps.size()) map = m_presenceMaps[ix];
90  return map;
91 }
92 
93 // Return chip for given cpm and tob
94 
95 int CmxCpSubBlock::chip(const int slice, const int cpm, const int tob) const
96 {
97  int ch = 0;
98  const unsigned int ix = tobIndex(slice, cpm, tob);
99  if (ix < m_tobData.size()) {
100  ch = (m_tobData[ix] >> s_tobChipBit) & s_tobChipMask;
101  }
102  return ch;
103 }
104 
105 // Return Local coordinate for given cpm and tob
106 
107 int CmxCpSubBlock::localCoord(const int slice, const int cpm, const int tob) const
108 {
109  int coord = 0;
110  const unsigned int ix = tobIndex(slice, cpm, tob);
111  if (ix < m_tobData.size()) {
113  }
114  return coord;
115 }
116 
117 // Return isolation for given cpm and tob
118 
119 int CmxCpSubBlock::isolation(const int slice, const int cpm, const int tob) const
120 {
121  int isol = 0;
122  const unsigned int ix = tobIndex(slice, cpm, tob);
123  if (ix < m_tobData.size()) {
125  }
126  return isol;
127 }
128 
129 // Return energy for given cpm and tob
130 
131 int CmxCpSubBlock::energy(const int slice, const int cpm, const int tob) const
132 {
133  int et = 0;
134  const unsigned int ix = tobIndex(slice, cpm, tob);
135  if (ix < m_tobData.size()) {
137  }
138  return et;
139 }
140 
141 // Return error bits for given cpm and tob
142 
143 int CmxCpSubBlock::tobError(int slice, int cpm, int tob) const
144 {
145  int error = 0;
146  const unsigned int ix = tobIndex(slice, cpm, tob);
147  if (ix < m_tobData.size()) {
149  }
150  return error;
151 }
152 
153 // Return hit/topo counts for given source ID and HL flag
154 
155 unsigned int CmxCpSubBlock::hits(const int slice, const int source,
156  const int flag) const
157 {
158  unsigned int hits = 0;
159  const unsigned int ix = hitIndex(slice, source, flag);
160  if (ix < m_hitsData.size()) {
162  }
163  return hits;
164 }
165 
166 // Return hit error for given source ID and HL flag
167 
168 int CmxCpSubBlock::hitsError(const int slice, const int source,
169  const int flag) const
170 {
171  int error = 0;
172  const unsigned int ix = hitIndex(slice, source, flag);
173  if (ix < m_hitsData.size()) {
175  }
176  return error;
177 }
178 
179 // Return RoI overflow for given source ID
180 
181 int CmxCpSubBlock::roiOverflow(const int slice, const int source) const
182 {
183  int overflow = 0;
184  const unsigned int ix = ovfIndex(slice, source);
185  if (ix < m_overflow.size()) overflow = m_overflow[ix];
186  return overflow;
187 }
188 
189 // Store presence map
190 
191 void CmxCpSubBlock::setPresenceMap(const int slice, const int cpm,
192  const unsigned int map)
193 {
194  resize();
195  if (map) {
196  const unsigned int ix = mapIndex(slice, cpm);
197  if (ix < m_presenceMaps.size()) m_presenceMaps[ix] = map;
198  }
199 }
200 
201 // Store TOB (RoI) data for given CPM, chip, local coord
202 
203 void CmxCpSubBlock::setTob(const int slice, const int cpm, const int chip,
204  const int loc, const int energy, const int isol,
205  const int error)
206 {
207  resize();
208  if (energy || isol || error) {
209  uint32_t word = 0;
210  word |= (energy & s_tobEnergyMask) << s_tobEnergyBit;
211  word |= (isol & s_tobIsolationMask) << s_tobIsolationBit;
212  word |= (error & s_tobErrorMask) << s_tobErrorBit;
213  word |= (loc & s_tobCoordMask) << s_tobCoordBit;
214  word |= (chip & s_tobChipMask) << s_tobChipBit;
215  word |= (cpm & s_tobCpmMask) << s_tobCpmBit;
216  word |= (s_tobWordId) << s_dataWordIdBit;
217  // Order by chip == presence bit // <<== CHECK
218  for (int tob = 0; tob < s_tobsPerModule; ++tob) {
219  const unsigned int ix = tobIndex(slice, cpm, tob);
220  if (m_tobData[ix] == 0) {
221  m_tobData[ix] = word;
222  break;
223  } else {
224  const int chipOld = (m_tobData[ix]>>s_tobChipBit)&s_tobChipMask;
225  if (chip < chipOld) {
226  for (int i = s_tobsPerModule-tob-1; i > 0; --i) {
227  m_tobData[ix + i] = m_tobData[ix + i - 1];
228  }
229  m_tobData[ix] = word;
230  break;
231  }
232  }
233  }
234  }
235 }
236 
237 // Store hit counts for given source ID and HL flag
238 
239 void CmxCpSubBlock::setHits(const int slice, const int source, const int flag,
240  const unsigned int hits, const int error)
241 {
242  resize();
243  const unsigned int ix = hitIndex(slice, source, flag);
244  if (ix < m_hitsData.size() && (hits || error)) {
245  uint32_t word = m_hitsData[ix];
246  word |= (hits & s_threshMask) << s_threshBit;
247  word |= (error & s_errorMask) << s_threshErrorBit;
248  word |= (flag & s_hlFlagMask) << s_hlFlagBit;
249  word |= (source & s_sourceIdMask) << s_sourceIdBit;
250  word |= (s_threshWordId) << s_dataWordIdBit;
251  m_hitsData[ix] = word;
252  }
253 }
254 
255 // Store RoI overflow for given source ID
256 
257 void CmxCpSubBlock::setRoiOverflow(const int slice, const int source,
258  const int overflow)
259 {
260  resize();
261  if (overflow) {
262  const unsigned int ix = ovfIndex(slice, source);
263  if (ix < m_overflow.size()) m_overflow[ix] = overflow;
264  }
265 }
266 
267 // Packing/Unpacking routines
268 
270 {
271  bool rc = false;
272  switch (version()) {
273  case 1:
274  case 2:
275  switch (format()) {
276  case NEUTRAL:
277  rc = packNeutral();
278  break;
279  case UNCOMPRESSED:
280  rc = packUncompressed();
281  break;
282  default:
283  break;
284  }
285  break;
286  default:
287  break;
288  }
289  return rc;
290 }
291 
293 {
294  bool rc = false;
295  switch (version()) {
296  case 1:
297  case 2: // <<== CHECK
298  switch (format()) {
299  case NEUTRAL:
300  rc = unpackNeutral();
301  break;
302  case UNCOMPRESSED:
303  rc = unpackUncompressed();
304  break;
305  default:
307  break;
308  }
309  break;
310  default:
312  break;
313  }
314  return rc;
315 }
316 
317 // Return presence map index appropriate to format
318 
319 unsigned int CmxCpSubBlock::mapIndex(const int slice,
320  const int cpm) const
321 {
322  unsigned int ix = cpm - 1;
323  if (format() == NEUTRAL) ix += slice * s_modules;
324  return ix;
325 }
326 
327 // Return tob data index appropriate to format
328 
329 unsigned int CmxCpSubBlock::tobIndex(const int slice, const int cpm,
330  const int tob) const
331 {
332  unsigned int ix = (cpm - 1) * s_tobsPerModule + tob;
333  if (format() == NEUTRAL) ix += slice * s_modules * s_tobsPerModule;
334  return ix;
335 }
336 
337 // Return hits data index appropriate to format
338 
339 unsigned int CmxCpSubBlock::hitIndex(const int slice, const int source,
340  const int flag) const
341 {
342  unsigned int ix = (source<<1)|flag;
343  if (format() == NEUTRAL) ix += slice * 2 * MAX_SOURCE_ID;
344  return ix;
345 }
346 
347 // Return overflow index appropriate to format
348 
349 unsigned int CmxCpSubBlock::ovfIndex(const int slice, const int source) const
350 {
351  unsigned int ix = source;
352  if (format() == NEUTRAL) ix += slice * MAX_SOURCE_ID;
353  return ix;
354 }
355 
356 // Resize the data vectors according to format
357 
359 {
360  if (m_tobData.empty()) {
361  int size1 = s_modules * s_tobsPerModule;
362  int size2 = 2 * MAX_SOURCE_ID;
363  int size3 = s_modules;
364  int size4 = MAX_SOURCE_ID;
365  if (format() == NEUTRAL) {
366  size1 *= timeslices();
367  size2 *= timeslices();
368  size3 *= timeslices();
369  size4 *= timeslices();
370  }
371  m_tobData.resize(size1);
372  m_hitsData.resize(size2);
373  m_presenceMaps.resize(size3);
374  m_overflow.resize(size4);
375  }
376 }
377 
378 // Pack neutral data
379 
381 {
382  resize();
383  std::vector<int> locVec(s_tobsPerModule);
384  std::vector<int> isolVec(s_tobsPerModule);
385  std::vector<int> parityVec(s_muxPhases);
386  std::vector<int> energyVec(s_tobsPerModule);
387  const int slices = timeslices();
388  for (int slice = 0; slice < slices; ++slice) {
389  for (int pin = 0; pin < s_glinkPins; ++pin) {
390  if (pin < s_modules) { // TOB data
391  const int cpm = pin + 1;
392  // Presence map
394  // Get tob data for this cpm
395  locVec.clear();
396  isolVec.clear();
397  parityVec.clear();
398  energyVec.clear();
399  int parityMerge = 0;
400  for (int tob = 0; tob < s_tobsPerModule; ++tob) {
401  locVec.push_back(localCoord(slice, cpm, tob));
402  isolVec.push_back(isolation(slice, cpm, tob));
403  energyVec.push_back(energy(slice, cpm, tob));
404  if (tob == 0) {
405  const int err = tobError(slice, cpm, tob);
406  parityMerge = err&s_parityErrorMask;
407  for (int mux = 0; mux < s_muxPhases; ++mux) {
408  parityVec.push_back((err>>(mux+s_parityErrorBits))&s_parityErrorMask);
409  }
410  }
411  }
412  // And pack
413  int locCount = 0;
414  int isolCount = 0;
415  int parityCount = 0;
416  int energyCount = 0;
417  for (int tob = 0; tob < s_tobsPerModule-2; ++tob) {
418  // Local coordinates (2 bit)
419  packerNeutral(pin, locVec[locCount++], s_coordBits);
420  // isolation
421  packerNeutral(pin, isolVec[isolCount++], s_isolationBits);
422  // backplane parity error
423  packerNeutral(pin, parityVec[parityCount++], s_parityErrorBits);
424  // energy
425  packerNeutral(pin, energyVec[energyCount++], s_energyBits);
426  if (tob < s_tobsPerModule-3) {
427  packerNeutral(pin, energyVec[energyCount++], s_energyBits);
428  } else {
429  packerNeutral(pin, locVec[locCount++], s_coordBits);
430  packerNeutral(pin, isolVec[isolCount++], s_isolationBits);
431  packerNeutral(pin, parityMerge, s_parityErrorBits);
432  packerNeutral(pin, locVec[locCount++], s_coordBits);
433  packerNeutral(pin, isolVec[isolCount++], s_isolationBits);
434  packerNeutral(pin, parityVec[parityCount++], s_parityErrorBits);
435  }
436  }
437  } else { // Hits and Topo data
438  if (pin < s_glinkPins-1) {
439  // Remote(3), local and total hits; parity error
440  const int source = pin - s_modules;
446  packerNeutral(pin, 0, s_paddingBits);
447  } else {
448  // Bunch crossing number, Fifo overflow and Topo data
456  }
457  }
458  // G-Link parity
459  packerNeutralParity(pin);
460  }
461  }
462  return true;
463 }
464 
465 // Pack uncompressed data
466 
468 {
469  std::vector<uint32_t>::const_iterator pos;
470  for (pos = m_tobData.begin(); pos != m_tobData.end(); ++pos) {
471  if (*pos) packer(*pos, s_wordLength);
472  }
473  for (pos = m_hitsData.begin(); pos != m_hitsData.end(); ++pos) {
474  if (*pos) packer(*pos, s_wordLength);
475  }
476  packerFlush();
477  return true;
478 }
479 
480 // Unpack neutral data
481 
483 {
484  resize();
485  int bunchCrossing = 0;
486  int fifoOverflow = 0;
487  int glinkParity = 0;
488  std::vector<int> locVec(s_tobsPerModule);
489  std::vector<int> isolVec(s_tobsPerModule);
490  std::vector<int> parityVec(s_muxPhases);
491  std::vector<int> energyVec(s_tobsPerModule);
492  const int slices = timeslices();
493  for (int slice = 0; slice < slices; ++slice) {
494  for (int pin = 0; pin < s_glinkPins; ++pin) {
495  if (pin < s_modules) { // TOB data
496  // Presence map
497  const unsigned int map = unpackerNeutral(pin, s_presenceBits);
498  locVec.clear();
499  isolVec.clear();
500  parityVec.clear();
501  energyVec.clear();
502  int parityMerge = 0;
503  for (int tob = 0; tob < s_tobsPerModule-2; ++tob) {
504  // Local coordinates (2 bit)
505  locVec.push_back(unpackerNeutral(pin, s_coordBits));
506  // isolation
507  isolVec.push_back(unpackerNeutral(pin, s_isolationBits));
508  // backplane parity error
509  parityVec.push_back(unpackerNeutral(pin, s_parityErrorBits));
510  // energy
511  energyVec.push_back(unpackerNeutral(pin, s_energyBits));
512  if (tob < s_tobsPerModule-3) {
513  energyVec.push_back(unpackerNeutral(pin, s_energyBits));
514  } else {
515  locVec.push_back(unpackerNeutral(pin, s_coordBits));
516  isolVec.push_back(unpackerNeutral(pin, s_isolationBits));
517  parityMerge = unpackerNeutral(pin, s_parityErrorBits);
518  locVec.push_back(unpackerNeutral(pin, s_coordBits));
519  isolVec.push_back(unpackerNeutral(pin, s_isolationBits));
520  parityVec.push_back(unpackerNeutral(pin, s_parityErrorBits));
521  }
522  }
523  int ntobs = 0;
524  for (int bit = 0; bit < s_presenceBits; ++bit) ntobs += (map>>bit)&1;
525  int error = parityMerge;
526  for (int mux = 0; mux < s_muxPhases; ++mux) {
527  error |= (parityVec[mux]<<(mux+s_parityErrorBits));
528  }
529  if (ntobs > s_tobsPerModule) error |= (1<<(s_muxPhases+s_parityErrorBits)); // overflow
530  int tob = 0;
531  const int cpm = pin + 1;
532  for (int chip = 0; chip < s_presenceBits && tob < s_tobsPerModule; ++chip) { // <<== CHECK - assuming bit==chip
533  if ((map>>chip)&1) {
534  setTob(slice, cpm, chip, locVec[tob], energyVec[tob], isolVec[tob], error);
535  ++tob;
536  }
537  }
538  setPresenceMap(slice, cpm, map);
539  } else { // Hits and Topo data
540  if (pin < s_glinkPins-1) {
541  // Remote(3), local and total hits; parity error
542  const int source = pin - s_modules;
543  unsigned int hits = unpackerNeutral(pin, s_hitsBits);
545  setHits(slice, source, 0, hits, error);
548  setHits(slice, source, 1, hits, error);
552  } else {
553  // Bunch crossing number, Fifo overflow and Topo data
555  fifoOverflow |= unpackerNeutral(pin, s_fifoOverflowBits);
556  unsigned int hits = unpackerNeutral(pin, s_topoChecksumBits);
557  int error = 0;
566  }
567  }
568  // G-Link parity errors
570  }
571  }
573  setDaqOverflow(fifoOverflow);
575 
576  const bool rc = unpackerSuccess();
578  return rc;
579 }
580 
581 // Unpack uncompressed data
582 
584 {
585  resize();
586  const int maxHits = m_hitsData.size();
587  m_cpmTobCount.assign(s_modules, 0);
588  unpackerInit();
590  while (unpackerSuccess()) {
591  const int id = dataWordId(word);
592  if (id == s_tobWordId) { // TOB data
593  const int index = cpm(word)-1;
594  const int count = m_cpmTobCount[index];
595  const int index2 = index*s_tobsPerModule + count;
596  if (count < s_tobsPerModule) {
597  m_tobData[index2] = word;
598  ++m_cpmTobCount[index];
599  } else {
600  setUnpackErrorCode(UNPACK_EXCESS_TOBS); // New code. Check consequences
601  return false;
602  }
603  } else if (id == s_threshWordId) { // Hits and Topo data
604  const int index = (sourceId(word)<<1) | hlFlag(word);
605  if (index < maxHits && m_hitsData[index] == 0) {
606  m_hitsData[index] = word;
607  } else {
609  return false;
610  }
611  } else {
612  setUnpackErrorCode(UNPACK_DATA_ID); // New code
613  return false;
614  }
615  word = unpacker(s_wordLength);
616  }
617  return true;
618 }
619 
620 } // end namespace
LVL1BS::L1CaloSubBlock::setBunchCrossing
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:328
LVL1BS::CmxCpSubBlock::s_bunchCrossingBits
static const int s_bunchCrossingBits
Definition: CmxCpSubBlock.h:113
LVL1BS::CmxCpSubBlock::localCoord
int localCoord(int slice, int cpm, int tob) const
Return Local coordinate for given cpm and tob.
Definition: CmxCpSubBlock.cxx:107
LVL1BS::CmxCpSubBlock::s_fifoOverflowBits
static const int s_fifoOverflowBits
Definition: CmxCpSubBlock.h:114
LVL1BS::CmxCpSubBlock::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: CmxCpSubBlock.h:29
LVL1BS::CmxCpSubBlock::s_topoChecksumBits
static const int s_topoChecksumBits
Definition: CmxCpSubBlock.h:115
LVL1BS::CmxCpSubBlock::s_sourceIdMask
static const uint32_t s_sourceIdMask
Definition: CmxCpSubBlock.h:100
LVL1BS::CmxCpSubBlock::clear
void clear()
Clear all data.
Definition: CmxCpSubBlock.cxx:73
et
Extra patterns decribing particle interation process.
LVL1BS::CmxCpSubBlock::hitIndex
unsigned int hitIndex(int slice, int source, int flag) const
Definition: CmxCpSubBlock.cxx:339
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
LVL1BS::CmxCpSubBlock::s_hitsErrorBits
static const int s_hitsErrorBits
Definition: CmxCpSubBlock.h:110
LVL1BS::L1CaloSubBlock::clear
void clear()
Clear all data.
Definition: L1CaloSubBlock.cxx:82
LVL1BS::CmxCpSubBlock::s_threshWordId
static const int s_threshWordId
Definition: CmxCpSubBlock.h:96
LVL1BS::CmxCpSubBlock::hlFlag
int hlFlag(uint32_t word) const
Definition: CmxCpSubBlock.h:171
LVL1BS::CmxCpSubBlock::s_tobsPerModule
static const int s_tobsPerModule
Definition: CmxCpSubBlock.h:121
CmxCpSubBlock.h
LVL1BS::L1CaloSubBlock::packerNeutral
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.
Definition: L1CaloSubBlock.cxx:413
LVL1BS::CmxCpSubBlock::ovfIndex
unsigned int ovfIndex(int slice, int source) const
Definition: CmxCpSubBlock.cxx:349
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::CmxCpSubBlock::m_hitsData
std::vector< uint32_t > m_hitsData
Hits and topo data.
Definition: CmxCpSubBlock.h:146
index
Definition: index.py:1
LVL1BS::CmxCpSubBlock::s_tobWordId
static const int s_tobWordId
Definition: CmxCpSubBlock.h:83
LVL1BS::CmxCpSubBlock::isolation
int isolation(int slice, int cpm, int tob) const
Return isolation for given cpm and tob.
Definition: CmxCpSubBlock.cxx:119
LVL1BS::CmxCpSubBlock::sourceId
int sourceId(uint32_t word) const
Definition: CmxCpSubBlock.h:161
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::CmxCpSubBlock::presenceMap
unsigned int presenceMap(int slice, int cpm) const
Return presence map for given CPM.
Definition: CmxCpSubBlock.cxx:84
LVL1BS::CmxCpSubBlock::s_muxPhases
static const int s_muxPhases
Definition: CmxCpSubBlock.h:122
LVL1BS::CmxCpSubBlock::cpm
int cpm(uint32_t word) const
Definition: CmxCpSubBlock.h:166
LVL1BS::CmxCpSubBlock::resize
void resize()
Definition: CmxCpSubBlock.cxx:358
LVL1BS::CmxCpSubBlock::setPresenceMap
void setPresenceMap(int slice, int cpm, unsigned int map)
Store presence map.
Definition: CmxCpSubBlock.cxx:191
LVL1BS::L1CaloSubBlock::NEUTRAL
@ NEUTRAL
Definition: L1CaloSubBlock.h:28
LVL1BS::L1CaloSubBlock::UNPACK_SOURCE_ID
@ UNPACK_SOURCE_ID
Definition: L1CaloSubBlock.h:41
LVL1BS::CmxCpSubBlock::s_roiOverflowBits
static const int s_roiOverflowBits
Definition: CmxCpSubBlock.h:111
LVL1BS::CmxCpSubBlock::tobError
int tobError(int slice, int cpm, int tob) const
Return error bits for given cpm and tob.
Definition: CmxCpSubBlock.cxx:143
LVL1BS::CmxCpSubBlock::s_topoCountsBits
static const int s_topoCountsBits
Definition: CmxCpSubBlock.h:117
LVL1BS::CmxCpSubBlock::s_tobOverflowBit
static const int s_tobOverflowBit
Definition: CmxCpSubBlock.h:79
LVL1BS::CmxCpSubBlock::s_hitsBits
static const int s_hitsBits
Definition: CmxCpSubBlock.h:109
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::L1CaloSubBlock::bunchCrossing
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:333
LVL1BS::CmxCpSubBlock::s_energyBits
static const int s_energyBits
Definition: CmxCpSubBlock.h:108
LVL1BS::CmxCpSubBlock::s_tobErrorBit
static const int s_tobErrorBit
Definition: CmxCpSubBlock.h:78
LVL1BS::CmxCpSubBlock::hits
unsigned int hits(int slice, int source, int flag) const
Return hit/topo counts for given source ID and HL flag.
Definition: CmxCpSubBlock.cxx:155
LVL1BS::CmxCpSubBlock::s_coordBits
static const int s_coordBits
Definition: CmxCpSubBlock.h:104
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
LVL1BS::CmxCpSubBlock::s_parityErrorMask
static const int s_parityErrorMask
Definition: CmxCpSubBlock.h:107
LVL1BS::CmxCpSubBlock::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: CmxCpSubBlock.cxx:239
LVL1BS::CmxSubBlock::timeslices
int timeslices() const
Definition: CmxSubBlock.cxx:48
LVL1BS::CmxCpSubBlock::setTob
void setTob(int slice, int cpm, int chip, int loc, int energy, int isol, int error)
Store TOB (RoI) data for given CPM, chip, local coord.
Definition: CmxCpSubBlock.cxx:203
LVL1BS::CmxCpSubBlock::s_tobCoordMask
static const uint32_t s_tobCoordMask
Definition: CmxCpSubBlock.h:87
LVL1BS::CmxCpSubBlock::s_errorMask
static const uint32_t s_errorMask
Definition: CmxCpSubBlock.h:98
LVL1BS::CmxCpSubBlock::s_topoPaddingBits
static const int s_topoPaddingBits
Definition: CmxCpSubBlock.h:118
LVL1BS::CmxCpSubBlock::packNeutral
bool packNeutral()
Pack neutral data.
Definition: CmxCpSubBlock.cxx:380
LVL1BS::L1CaloSubBlock::packer
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
Definition: L1CaloSubBlock.cxx:302
LVL1BS::CmxCpSubBlock::m_cpmTobCount
std::vector< int > m_cpmTobCount
CPM TOB count vector for unpacking.
Definition: CmxCpSubBlock.h:150
LVL1BS::CmxCpSubBlock::unpackNeutral
bool unpackNeutral()
Unpack neutral data.
Definition: CmxCpSubBlock.cxx:482
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1BS::L1CaloSubBlock::UNPACK_DATA_TRUNCATED
@ UNPACK_DATA_TRUNCATED
Definition: L1CaloSubBlock.h:40
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1BS::CmxCpSubBlock::m_overflow
std::vector< int > m_overflow
RoI overflows for neutral data.
Definition: CmxCpSubBlock.h:152
LVL1BS::CmxCpSubBlock::s_presenceBits
static const int s_presenceBits
Definition: CmxCpSubBlock.h:103
LVL1BS::CmxCpSubBlock::m_presenceMaps
std::vector< unsigned int > m_presenceMaps
Presence maps.
Definition: CmxCpSubBlock.h:148
LVL1BS::L1CaloSubBlock::setDaqOverflow
void setDaqOverflow(int bit=1)
Set DAQ FIFO Overflow bit in Sub-status word.
Definition: L1CaloSubBlock.cxx:206
LVL1BS::CmxCpSubBlock::hitsError
int hitsError(int slice, int source, int flag) const
Return hit error for given source ID and HL flag.
Definition: CmxCpSubBlock.cxx:168
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::L1CaloSubBlock::format
int format() const
Definition: L1CaloSubBlock.h:248
LVL1BS::CmxCpSubBlock::unpackUncompressed
bool unpackUncompressed()
Unpack uncompressed data.
Definition: CmxCpSubBlock.cxx:583
LVL1BS::CmxCpSubBlock::mapIndex
unsigned int mapIndex(int slice, int cpm) const
Definition: CmxCpSubBlock.cxx:319
LVL1BS::L1CaloSubBlock::unpacker
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
Definition: L1CaloSubBlock.cxx:345
LVL1BS::CmxCpSubBlock::pack
bool pack()
Pack data.
Definition: CmxCpSubBlock.cxx:269
LVL1BS::L1CaloSubBlock::daqOverflow
bool daqOverflow() const
Definition: L1CaloSubBlock.h:303
LVL1BS::L1CaloSubBlock::UNPACK_VERSION
@ UNPACK_VERSION
Definition: L1CaloSubBlock.h:38
LVL1BS::CmxCpSubBlock::s_hlFlagMask
static const uint32_t s_hlFlagMask
Definition: CmxCpSubBlock.h:99
LVL1BS::CmxCpSubBlock::setRoiOverflow
void setRoiOverflow(int slice, int source, int overflow)
Store RoI overflow for given source ID.
Definition: CmxCpSubBlock.cxx:257
LVL1BS::CmxCpSubBlock::packUncompressed
bool packUncompressed()
Pack uncompressed data.
Definition: CmxCpSubBlock.cxx:467
LVL1BS::CmxCpSubBlock::roiOverflow
int roiOverflow(int slice, int source) const
Return RoI overflow for given source ID.
Definition: CmxCpSubBlock.cxx:181
LVL1BS::CmxCpSubBlock::s_modules
static const int s_modules
Definition: CmxCpSubBlock.h:120
LVL1BS::CmxCpSubBlock::chip
int chip(int slice, int cpm, int tob) const
Return chip for given cpm and tob.
Definition: CmxCpSubBlock.cxx:95
LVL1BS::CmxCpSubBlock::dataWordId
int dataWordId(uint32_t word) const
Definition: CmxCpSubBlock.h:156
fitman.mux
mux
Definition: fitman.py:547
LVL1BS::CmxCpSubBlock::s_tobCpmBit
static const int s_tobCpmBit
Definition: CmxCpSubBlock.h:82
LVL1BS::CmxCpSubBlock::s_tobEnergyBit
static const int s_tobEnergyBit
Definition: CmxCpSubBlock.h:76
LVL1BS::CmxCpSubBlock::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: CmxCpSubBlock.h:29
LVL1BS::L1CaloSubBlock::version
int version() const
Definition: L1CaloSubBlock.h:243
LVL1BS::CmxCpSubBlock::m_tobData
std::vector< uint32_t > m_tobData
TOB data.
Definition: CmxCpSubBlock.h:144
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
LVL1BS::L1CaloSubBlock::unpackerSuccess
bool unpackerSuccess() const
Return unpacker success flag.
Definition: L1CaloSubBlock.h:354
LVL1BS::CmxCpSubBlock::s_hlFlagBit
static const int s_hlFlagBit
Definition: CmxCpSubBlock.h:93
LVL1BS::CmxCpSubBlock::s_dataWordIdMask
static const uint32_t s_dataWordIdMask
Definition: CmxCpSubBlock.h:101
LVL1BS::CmxCpSubBlock::s_glinkPins
static const int s_glinkPins
Definition: CmxCpSubBlock.h:119
LVL1BS::CmxCpSubBlock::s_threshErrorBit
static const int s_threshErrorBit
Definition: CmxCpSubBlock.h:92
LVL1BS::CmxCpSubBlock::tobIndex
unsigned int tobIndex(int slice, int cpm, int tob) const
Definition: CmxCpSubBlock.cxx:329
LVL1BS::CmxCpSubBlock::s_tobIsolationMask
static const uint32_t s_tobIsolationMask
Definition: CmxCpSubBlock.h:85
LVL1BS::CmxCpSubBlock::s_sourceIdBit
static const int s_sourceIdBit
Definition: CmxCpSubBlock.h:94
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
LVL1BS::CmxCpSubBlock::s_tobCoordBit
static const int s_tobCoordBit
Definition: CmxCpSubBlock.h:80
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::CmxCpSubBlock::s_tobIsolationBit
static const int s_tobIsolationBit
Definition: CmxCpSubBlock.h:77
DeMoScan.index
string index
Definition: DeMoScan.py:364
LVL1BS::CmxCpSubBlock::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: CmxCpSubBlock.h:29
LVL1BS::CmxCpSubBlock::s_threshMask
static const uint32_t s_threshMask
Definition: CmxCpSubBlock.h:97
LVL1BS::CmxCpSubBlock::s_wordLength
static const int s_wordLength
Data word length.
Definition: CmxCpSubBlock.h:74
LVL1BS::CmxCpSubBlock::s_dataWordIdBit
static const int s_dataWordIdBit
Definition: CmxCpSubBlock.h:95
LVL1BS::CmxCpSubBlock::s_threshBit
static const int s_threshBit
Definition: CmxCpSubBlock.h:91
LVL1BS::CmxCpSubBlock::s_tobChipBit
static const int s_tobChipBit
Definition: CmxCpSubBlock.h:81
LVL1BS
Definition: ZdcModifySlices.h:10
LVL1BS::CmxCpSubBlock::s_paddingBits
static const int s_paddingBits
Definition: CmxCpSubBlock.h:112
LVL1BS::L1CaloSubBlock::setUnpackErrorCode
void setUnpackErrorCode(int code)
Set the unpacking error code.
Definition: L1CaloSubBlock.h:338
LVL1BS::CmxCpSubBlock::energy
int energy(int slice, int cpm, int tob) const
Return energy for given cpm and tob.
Definition: CmxCpSubBlock.cxx:131
LVL1BS::CmxCpSubBlock::s_topoMapBits
static const int s_topoMapBits
Definition: CmxCpSubBlock.h:116
LVL1BS::CmxCpSubBlock::~CmxCpSubBlock
~CmxCpSubBlock()
Definition: CmxCpSubBlock.cxx:67
LVL1BS::CmxCpSubBlock::s_tobErrorMask
static const uint32_t s_tobErrorMask
Definition: CmxCpSubBlock.h:86
LVL1BS::CmxCpSubBlock::s_parityErrorBits
static const int s_parityErrorBits
Definition: CmxCpSubBlock.h:106
copySelective.source
string source
Definition: copySelective.py:32
LVL1BS::CmxCpSubBlock::s_isolationBits
static const int s_isolationBits
Definition: CmxCpSubBlock.h:105
LVL1BS::CmxCpSubBlock::s_tobCpmMask
static const uint32_t s_tobCpmMask
Definition: CmxCpSubBlock.h:89
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::CmxCpSubBlock::CmxCpSubBlock
CmxCpSubBlock()
Definition: CmxCpSubBlock.cxx:63
LVL1BS::L1CaloSubBlock::UNPACK_DATA_ID
@ UNPACK_DATA_ID
Definition: L1CaloSubBlock.h:42
LVL1BS::L1CaloSubBlock::glinkParity
bool glinkParity() const
Definition: L1CaloSubBlock.h:318
error
Definition: IImpactPoint3dEstimator.h:70
LVL1BS::CmxCpSubBlock::s_tobChipMask
static const uint32_t s_tobChipMask
Definition: CmxCpSubBlock.h:88
LVL1BS::CmxCpSubBlock::MAX_SOURCE_ID
@ MAX_SOURCE_ID
Definition: CmxCpSubBlock.h:30
LVL1BS::CmxCpSubBlock::unpack
bool unpack()
Unpack data.
Definition: CmxCpSubBlock.cxx:292
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
LVL1BS::CmxCpSubBlock::s_tobEnergyMask
static const uint32_t s_tobEnergyMask
Definition: CmxCpSubBlock.h:84
LVL1BS::L1CaloSubBlock::UNCOMPRESSED
@ UNCOMPRESSED
Definition: L1CaloSubBlock.h:28
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