ATLAS Offline Software
CmxEnergySubBlock.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 #include <utility>
6 
7 #include "CmxEnergySubBlock.h"
8 
9 namespace LVL1BS {
10 
11 // Constant definitions
12 
14 
36 
45 
46 
48 {
49 }
50 
52 {
53 }
54 
55 // Clear all data
56 
58 {
60  m_sumsData.clear();
61 }
62 
63 // Return energy subsum for given JEM and energy type
64 
65 unsigned int CmxEnergySubBlock::energy(const int slice, const int jem,
66  const EnergyType eType) const
67 {
68  unsigned int e = 0;
69  if (slice >= 0 && slice < timeslices() && !m_sumsData.empty()) {
70  if (jem >= 0 && jem < s_maxJems) {
71  e = m_sumsData[index(slice, jem) + eType] & s_energyJemMask;
72  }
73  }
74  return e;
75 }
76 
77 // Return energy subsum error for given JEM and energy type
78 
79 int CmxEnergySubBlock::error(const int slice, const int jem,
80  const EnergyType eType) const
81 {
82  int parity = 0;
83  if (slice >= 0 && slice < timeslices() && !m_sumsData.empty()) {
84  if (jem >= 0 && jem < s_maxJems) {
85  parity = (m_sumsData[index(slice, jem) + eType] >> s_errorBit)
86  & s_errorMask;
87  }
88  }
89  return parity << 1;
90 }
91 
92 // Return energy subsum for given source, sum type and energy type
93 
94 unsigned int CmxEnergySubBlock::energy(const int slice,
95  const SourceType source,
96  const SumType sType,
97  const EnergyType eType) const
98 {
99  unsigned int e = 0;
100  if (slice >= 0 && slice < timeslices() && !m_sumsData.empty()) {
101  const int pos = s_maxJems + 2 * source + sType;
102  e = m_sumsData[index(slice, pos) + eType] & s_energySumMask;
103  }
104  return e;
105 }
106 
107 // Return energy subsum error for given source, sum type and energy type
108 
110  const SourceType source,
111  const SumType sType,
112  const EnergyType eType) const
113 {
114  int parity = 0;
115  int overflow = 0;
116  if (slice >= 0 && slice < timeslices() && !m_sumsData.empty()) {
117  const int pos = s_maxJems + 2 * source + sType;
118  const uint32_t word = m_sumsData[index(slice, pos) + eType];
119  overflow = (word >> s_overflowBit) & s_overflowMask;
120  if (source == REMOTE) parity = (word >> s_errorBit) & s_errorMask;
121  }
122  return (parity << 1) + overflow;
123 }
124 
125 // Return hits map for given hits type and sum type
126 
127 unsigned int CmxEnergySubBlock::hits(const int slice,
128  const HitsType hType,
129  const SumType sType) const
130 {
131  unsigned int map = 0;
132  if (slice >= 0 && slice < timeslices() && !m_sumsData.empty()) {
133  const int pos = s_maxJems + 2 * TOTAL + sType;
134  map = (m_sumsData[index(slice, pos) + hType] >> s_etHitsBit)
135  & s_etHitsMask;
136  }
137  return map;
138 }
139 
140 // Store energy subsums and errors for given JEM
141 
142 void CmxEnergySubBlock::setSubsums(const int slice, const int jem,
143  const unsigned int ex, const unsigned int ey,
144  const unsigned int et, const int exError,
145  const int eyError, const int etError)
146 {
147  if (slice >= 0 && slice < timeslices() && jem >= 0 && jem < s_maxJems) {
148  resize();
149  const int ix = index(slice, jem);
150  unsigned int energy = 0;
151  int error = 0;
152  int parity = 0;
153  uint32_t word = 0;
154  for (int eType = 0; eType < MAX_ENERGY_TYPE; ++eType) {
155  if (eType == ENERGY_EX) {
156  energy = ex;
157  error = exError;
158  } else if (eType == ENERGY_EY) {
159  energy = ey;
160  error = eyError;
161  } else {
162  energy = et;
163  error = etError;
164  }
165  parity = (error >> 1) & s_errorMask;
166  if (energy || parity) {
167  word = energy & s_energyJemMask;
168  word |= parity << s_errorBit;
169  word |= eType << s_energyTypeJemBit;
170  word |= jem << s_jemBit;
171  word |= MODULE_ID << s_wordIdBit;
172  m_sumsData[ix + eType] = word;
173  }
174  }
175  }
176 }
177 
178 // Store energy subsums and errors for given source and sum type
179 
180 void CmxEnergySubBlock::setSubsums(const int slice, const SourceType source,
181  const SumType sType,
182  const unsigned int ex, const unsigned int ey,
183  const unsigned int et, const int exError,
184  const int eyError, const int etError)
185 {
186  if (slice >= 0 && slice < timeslices()) {
187  resize();
188  const int pos = s_maxJems + 2 * source + sType;
189  const int ix = index(slice, pos);
190  unsigned int energy = 0;
191  int error = 0;
192  int overflow = 0;
193  int parity = 0;
194  uint32_t word = 0;
195  uint32_t baseword = (CRATE_SYSTEM_ID << s_wordIdBit) +
196  (source << s_sourceBit) +
197  (sType << s_sumTypeBit);
198  for (int eType = 0; eType < MAX_ENERGY_TYPE; ++eType) {
199  if (eType == ENERGY_EX) {
200  energy = ex;
201  error = exError;
202  } else if (eType == ENERGY_EY) {
203  energy = ey;
204  error = eyError;
205  } else {
206  energy = et;
207  error = etError;
208  }
209  overflow = error & s_overflowMask;
210  parity = (source == REMOTE) ? ((error >> 1) & s_errorMask) : 0;
211  if (energy || overflow || parity) {
212  word = m_sumsData[ix + eType];
213  word |= energy & s_energySumMask;
214  word |= overflow << s_overflowBit;
215  word |= parity << s_errorBit;
216  word |= eType << s_energyTypeBit;
217  word |= baseword;
218  m_sumsData[ix + eType] = word;
219  }
220  }
221  }
222 }
223 
224 // Store hits map for given hits type and sum type
225 
227  const SumType sType, const unsigned int map)
228 {
229  if (map && slice >= 0 && slice < timeslices()) {
230  resize();
231  const int pos = s_maxJems + 2 * TOTAL + sType;
232  const int ix = index(slice, pos);
233  uint32_t word = m_sumsData[ix + hType];
234  word |= (map & s_etHitsMask) << s_etHitsBit;
235  word |= hType << s_energyTypeBit;
236  word |= sType << s_sumTypeBit;
237  word |= TOTAL << s_sourceBit;
238  word |= CRATE_SYSTEM_ID << s_wordIdBit;
239  m_sumsData[ix + hType] = word;
240  }
241 }
242 
243 // Packing/Unpacking routines
244 
246 {
247  bool rc = false;
248  switch (version()) {
249  case 3: //<<== CHECK
250  switch (format()) {
251  case NEUTRAL:
252  rc = packNeutral();
253  break;
254  case UNCOMPRESSED:
255  rc = packUncompressed();
256  break;
257  default:
258  break;
259  }
260  break;
261  default:
262  break;
263  }
264  return rc;
265 }
266 
268 {
269  bool rc = false;
270 
271  switch (version()) {
272  case 1: //<<== CHECK
273  switch (format()) {
274  case NEUTRAL:
275  rc = unpackNeutral();
276  break;
277  case UNCOMPRESSED:
278  rc = unpackUncompressed();
279  break;
280  default:
282  break;
283  }
284  break;
285  default:
287  break;
288  }
289  return rc;
290 }
291 
292 // Return data index appropriate to format
293 
294 int CmxEnergySubBlock::index(const int slice, const int pos) const
295 {
296  int ix = 3 * pos;
297  if (format() == NEUTRAL) ix += slice * s_maxSums;
298  return ix;
299 }
300 
301 // Resize the sums vector according to format
302 
304 {
305  if (m_sumsData.empty()) {
306  int size = s_maxSums;
307  if (format() == NEUTRAL) size *= timeslices();
308  m_sumsData.resize(size);
309  }
310 }
311 
312 // Pack neutral data
313 
315 {
316  resize();
317  const int slices = timeslices();
318  for (int slice = 0; slice < slices; ++slice) {
319  for (int pin = 0; pin < s_maxJems; ++pin) {
320  // JEM energy sums (jem == pin); parity errors
323  packerNeutral(pin, (error(slice, pin, ENERGY_EX) >> 1), 1);
326  packerNeutral(pin, (error(slice, pin, ENERGY_EY) >> 1), 1);
329  packerNeutral(pin, (error(slice, pin, ENERGY_ET) >> 1), 1);
330  packerNeutral(pin, 0, s_jemSumBits);
332  packerNeutral(pin, 0, 1);
333  }
334  // Remote Ex, Ey, Et
335  int pin = s_maxJems;
337  s_sumBitsExEy);
338  packerNeutral(pin, (error(slice, REMOTE, STANDARD, ENERGY_EX) >> 1), 1);
340  s_sumBitsExEy);
342  ENERGY_EX) >> 1), 1);
343  packerNeutral(pin, (error(slice, REMOTE, STANDARD, ENERGY_EX) & 0x1), 1); // Seems inconsistent with SLink?
345  s_sumBitsExEy);
346  packerNeutral(pin, (error(slice, REMOTE, STANDARD, ENERGY_EY) >> 1), 1);
348  s_sumBitsExEy);
350  ENERGY_EY) >> 1), 1);
351  packerNeutral(pin, (error(slice, REMOTE, STANDARD, ENERGY_EY) & 0x1), 1);
354  packerNeutral(pin, 0, 1);
357  packerNeutral(pin, (error(slice, REMOTE, STANDARD, ENERGY_ET) & 0x1), 1);
358  // Local Ex, Ey, Et
359  ++pin;
361  s_sumBitsExEy);
362  packerNeutral(pin, 0, 1);
364  s_sumBitsExEy);
365  packerNeutral(pin, 0, 1);
366  packerNeutral(pin, (error(slice, LOCAL, STANDARD, ENERGY_EX) & 0x1), 1);
368  s_sumBitsExEy);
369  packerNeutral(pin, 0, 1);
371  s_sumBitsExEy);
372  packerNeutral(pin, 0, 1);
373  packerNeutral(pin, (error(slice, LOCAL, STANDARD, ENERGY_EY) & 0x1), 1);
376  packerNeutral(pin, 0, 1);
379  packerNeutral(pin, (error(slice, LOCAL, STANDARD, ENERGY_ET) & 0x1), 1);
380  // Total Ex, Ey, Et
381  ++pin;
383  s_sumBitsExEy);
384  packerNeutral(pin, 0, 1);
386  s_sumBitsExEy);
387  packerNeutral(pin, 0, 1);
388  packerNeutral(pin, (error(slice, TOTAL, STANDARD, ENERGY_EX) & 0x1), 1);
390  s_sumBitsExEy);
391  packerNeutral(pin, 0, 1);
393  s_sumBitsExEy);
394  packerNeutral(pin, (error(slice, TOTAL, STANDARD, ENERGY_ET) & 0x1), 1);
395  packerNeutral(pin, (error(slice, TOTAL, STANDARD, ENERGY_EY) & 0x1), 1);
400  // Bunchcrossing number, Fifo overflow
401  ++pin;
403  packerNeutral(pin, daqOverflow(), 1);
404  // Et hit maps
412  packerNeutral(pin, 0, s_paddingBits);
413  // G-Link parity errors
414  for (int p = 0; p <= pin; ++p) packerNeutralParity(p);
415  }
416  return true;
417 }
418 
419 // Pack uncompressed data
420 
422 {
423  std::vector<uint32_t>::const_iterator pos;
424  for (pos = m_sumsData.begin(); pos != m_sumsData.end(); ++pos) {
425  if (*pos) packer(*pos, s_wordLength);
426  }
427  packerFlush();
428  return true;
429 }
430 
431 // Unpack neutral data
432 
434 {
435  resize();
436  int bunchCrossing = 0; // BunchCrossing number
437  int overflow = 0; // FIFO overflow
438  int parity = 0; // GLink parity
439  unsigned int en[MAX_ENERGY_TYPE]; // Energies standard
440  unsigned int rn[MAX_ENERGY_TYPE]; // Energies restricted/weighted
441  int er[MAX_ENERGY_TYPE]; // Errors standard (bit 0 overflow, bit 1 parity)
442  int rr[MAX_ENERGY_TYPE]; // Errors restricted/weighted
443  const int slices = timeslices();
444  for (int slice = 0; slice < slices; ++slice) {
445  for (int pin = 0; pin < s_maxJems; ++pin) {
446  // JEM energy sums (jem == pin); parity errors
447  for (int eType = 0; eType < MAX_ENERGY_TYPE; ++eType) {
448  en[eType] = unpackerNeutral(pin, s_jemSumBits);
450  er[eType] = unpackerNeutral(pin, 1) << 1;
451  }
454  unpackerNeutral(pin, 1);
456  er[ENERGY_EX], er[ENERGY_EY], er[ENERGY_ET]);
457  }
458  // Remote Ex, Ey, Et, parity, overflow
459  int pin = s_maxJems;
461  er[ENERGY_EX] = unpackerNeutral(pin, 1) << 1;
462  er[ENERGY_ET] = er[ENERGY_EX];
464  rr[ENERGY_EX] = unpackerNeutral(pin, 1) << 1;
465  rr[ENERGY_ET] = rr[ENERGY_EX];
466  er[ENERGY_EX] |= unpackerNeutral(pin, 1); // Or is it both?
468  er[ENERGY_EY] = unpackerNeutral(pin, 1) << 1;
469  er[ENERGY_ET] |= er[ENERGY_EY];
471  rr[ENERGY_EY] = unpackerNeutral(pin, 1) << 1;
472  rr[ENERGY_ET] |= rr[ENERGY_EY];
473  er[ENERGY_EY] |= unpackerNeutral(pin, 1);
475  unpackerNeutral(pin, 1);
477  er[ENERGY_ET] |= unpackerNeutral(pin, 1);
480  er[ENERGY_EX], er[ENERGY_EY], er[ENERGY_ET]);
484  // Local Ex, Ey, Et, overflow
485  ++pin;
487  unpackerNeutral(pin, 1);
489  unpackerNeutral(pin, 1);
490  er[ENERGY_EX] = unpackerNeutral(pin, 1); // Or is it both?
491  rr[ENERGY_EX] = 0;
493  unpackerNeutral(pin, 1);
495  unpackerNeutral(pin, 1);
496  er[ENERGY_EY] = unpackerNeutral(pin, 1);
497  rr[ENERGY_EY] = 0;
499  unpackerNeutral(pin, 1);
501  er[ENERGY_ET] = unpackerNeutral(pin, 1);
502  rr[ENERGY_ET] = 0;
505  er[ENERGY_EX], er[ENERGY_EY], er[ENERGY_ET]);
509  // Total Ex, Ey, Et, overflow
510  ++pin;
512  unpackerNeutral(pin, 1);
514  unpackerNeutral(pin, 1);
515  er[ENERGY_EX] = unpackerNeutral(pin, 1); // Or is it both?
516  rr[ENERGY_EX] = 0;
518  unpackerNeutral(pin, 1);
520  er[ENERGY_ET] = unpackerNeutral(pin, 1);
521  rr[ENERGY_ET] = 0;
522  er[ENERGY_EY] = unpackerNeutral(pin, 1);
523  rr[ENERGY_EY] = 0;
528  er[ENERGY_EX], er[ENERGY_EY], er[ENERGY_ET]);
532  // Bunchcrossing number, Fifo overflow
533  ++pin;
535  overflow = unpackerNeutral(pin, 1);
536  // Et hit maps
548  // G-Link parity errors
549  for (int p = 0; p <= pin; ++p) parity |= unpackerNeutralParityError(p);
550  }
552  setDaqOverflow(overflow);
553  setGlinkParity(parity);
554 
555  const bool rc = unpackerSuccess();
557  return rc;
558 }
559 
560 // Unpack uncompressed data
561 
563 {
564  resize();
565  unpackerInit();
566  bool error = false;
568  while (unpackerSuccess()) {
569  if (word) {
570  const int wordId = (word >> s_wordIdBit) & s_wordIdMask;
571  if (wordId == MODULE_ID) {
572  const int jem = (word >> s_jemBit) & s_jemMask;
573  const int eType = (word >> s_energyTypeJemBit) & s_energyTypeMask;
574  const int pos = 3 * jem + eType;
575  if (eType < MAX_ENERGY_TYPE && m_sumsData[pos] == 0) {
576  m_sumsData[pos] = word;
577  } else error = true;
578  } else if (wordId == CRATE_SYSTEM_ID) {
579  const int source = (word >> s_sourceBit) & s_sourceMask;
580  const int sType = (word >> s_sumTypeBit) & s_sumTypeMask;
581  const int eType = (word >> s_energyTypeBit) & s_energyTypeMask;
582  const int pos = 3 * (s_maxJems + 2 * source + sType) + eType;
583  if (source < MAX_SOURCE_TYPE && eType < MAX_ENERGY_TYPE
584  && m_sumsData[pos] == 0) {
585  m_sumsData[pos] = word;
586  } else error = true;
587  } else error = true;
588  if (error) {
590  return false;
591  }
592  }
593  word = unpacker(s_wordLength);
594  }
595  return true;
596 }
597 
598 } // end namespace
LVL1BS::CmxEnergySubBlock::s_errorMask
static const uint32_t s_errorMask
Definition: CmxEnergySubBlock.h:85
LVL1BS::L1CaloSubBlock::setBunchCrossing
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:328
LVL1BS::CmxEnergySubBlock::STANDARD
@ STANDARD
Definition: CmxEnergySubBlock.h:30
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1BS::CmxEnergySubBlock::s_sourceBit
static const int s_sourceBit
Definition: CmxEnergySubBlock.h:79
LVL1BS::CmxEnergySubBlock::s_energySumMask
static const uint32_t s_energySumMask
Definition: CmxEnergySubBlock.h:84
et
Extra patterns decribing particle interation process.
LVL1BS::CmxEnergySubBlock::setEtHits
void setEtHits(int slice, HitsType hType, SumType sType, unsigned int map)
Store hits map for given hits type and sum type.
Definition: CmxEnergySubBlock.cxx:226
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LVL1BS::L1CaloSubBlock::clear
void clear()
Clear all data.
Definition: L1CaloSubBlock.cxx:82
LVL1BS::CmxEnergySubBlock::s_bunchCrossingBits
static const int s_bunchCrossingBits
Definition: CmxEnergySubBlock.h:99
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::CmxEnergySubBlock::s_sumBitsExEy
static const int s_sumBitsExEy
Definition: CmxEnergySubBlock.h:98
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::CmxEnergySubBlock::s_sumTypeBit
static const int s_sumTypeBit
Definition: CmxEnergySubBlock.h:78
LVL1BS::CmxEnergySubBlock::s_wordIdBit
static const int s_wordIdBit
Definition: CmxEnergySubBlock.h:80
LVL1BS::CmxEnergySubBlock::m_sumsData
std::vector< uint32_t > m_sumsData
Energy subsums data.
Definition: CmxEnergySubBlock.h:116
LVL1BS::CmxEnergySubBlock::SourceType
SourceType
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxEnergySubBlock::ENERGY_ET
@ ENERGY_ET
Definition: CmxEnergySubBlock.h:27
LVL1BS::L1CaloSubBlock::setGlinkParity
void setGlinkParity(int bit=1)
Set G-Link Parity bit in Sub-status word.
Definition: L1CaloSubBlock.cxx:217
LVL1BS::CmxEnergySubBlock::unpackUncompressed
bool unpackUncompressed()
Unpack uncompressed data.
Definition: CmxEnergySubBlock.cxx:562
LVL1BS::L1CaloSubBlock::unpackerInit
void unpackerInit()
Initialise unpacker.
Definition: L1CaloSubBlock.cxx:393
LVL1BS::CmxEnergySubBlock::CRATE_SYSTEM_ID
@ CRATE_SYSTEM_ID
Definition: CmxEnergySubBlock.h:26
LVL1BS::CmxEnergySubBlock::MAX_SOURCE_TYPE
@ MAX_SOURCE_TYPE
Definition: CmxEnergySubBlock.h:29
LVL1BS::L1CaloSubBlock::NEUTRAL
@ NEUTRAL
Definition: L1CaloSubBlock.h:28
LVL1BS::L1CaloSubBlock::UNPACK_SOURCE_ID
@ UNPACK_SOURCE_ID
Definition: L1CaloSubBlock.h:41
LVL1BS::L1CaloSubBlock::wordId
int wordId() const
Definition: L1CaloSubBlock.h:238
LVL1BS::CmxEnergySubBlock::s_jemSumBits
static const int s_jemSumBits
Definition: CmxEnergySubBlock.h:94
LVL1BS::CmxEnergySubBlock::SUM_ET
@ SUM_ET
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::pack
bool pack()
Pack data.
Definition: CmxEnergySubBlock.cxx:245
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::CmxEnergySubBlock::s_sumBitsEtSys
static const int s_sumBitsEtSys
Definition: CmxEnergySubBlock.h:97
LVL1BS::CmxEnergySubBlock::s_sumBitsEtCrate
static const int s_sumBitsEtCrate
Definition: CmxEnergySubBlock.h:96
LVL1BS::CmxSubBlock::timeslices
int timeslices() const
Definition: CmxSubBlock.cxx:48
LVL1BS::CmxEnergySubBlock::clear
void clear()
Clear all data.
Definition: CmxEnergySubBlock.cxx:57
LVL1BS::CmxEnergySubBlock::MISSING_ET
@ MISSING_ET
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::s_overflowBit
static const int s_overflowBit
Definition: CmxEnergySubBlock.h:72
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
checkCorrelInHIST.hType
def hType(hist, verbose=False)
Definition: checkCorrelInHIST.py:126
LVL1BS::CmxEnergySubBlock::resize
void resize()
Definition: CmxEnergySubBlock.cxx:303
LVL1BS::CmxEnergySubBlock::HitsType
HitsType
Definition: CmxEnergySubBlock.h:28
LVL1BS::L1CaloSubBlock::packer
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
Definition: L1CaloSubBlock.cxx:302
LVL1BS::CmxEnergySubBlock::unpack
bool unpack()
Unpack data.
Definition: CmxEnergySubBlock.cxx:267
LVL1BS::CmxEnergySubBlock::EnergyType
EnergyType
Definition: CmxEnergySubBlock.h:27
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1BS::L1CaloSubBlock::UNPACK_DATA_TRUNCATED
@ UNPACK_DATA_TRUNCATED
Definition: L1CaloSubBlock.h:40
LVL1BS::CmxEnergySubBlock::s_energyJemMask
static const uint32_t s_energyJemMask
Definition: CmxEnergySubBlock.h:83
LVL1BS::CmxEnergySubBlock::s_etHitMapsBits
static const int s_etHitMapsBits
Definition: CmxEnergySubBlock.h:100
LVL1BS::CmxEnergySubBlock::CmxEnergySubBlock
CmxEnergySubBlock()
Definition: CmxEnergySubBlock.cxx:47
LVL1BS::L1CaloSubBlock::setDaqOverflow
void setDaqOverflow(int bit=1)
Set DAQ FIFO Overflow bit in Sub-status word.
Definition: L1CaloSubBlock.cxx:206
LVL1BS::CmxEnergySubBlock::s_energyTypeMask
static const uint32_t s_energyTypeMask
Definition: CmxEnergySubBlock.h:89
LVL1BS::L1CaloSubBlock::unpackerNeutralParityError
bool unpackerNeutralParityError(int pin)
Unpack and test G-Link parity bit for given pin.
Definition: L1CaloSubBlock.cxx:464
LVL1BS::CmxEnergySubBlock::s_jemPaddingBits
static const int s_jemPaddingBits
Definition: CmxEnergySubBlock.h:95
python.BunchSpacingUtils.rn
rn
Definition: BunchSpacingUtils.py:87
LVL1BS::CmxEnergySubBlock::setSubsums
void setSubsums(int slice, int jem, unsigned int ex, unsigned int ey, unsigned int et, int exError, int eyError, int etError)
Store energy subsums and errors for given JEM.
Definition: CmxEnergySubBlock.cxx:142
LVL1BS::L1CaloSubBlock::format
int format() const
Definition: L1CaloSubBlock.h:248
LVL1BS::CmxEnergySubBlock::s_etHitsMask
static const uint32_t s_etHitsMask
Definition: CmxEnergySubBlock.h:87
LVL1BS::CmxEnergySubBlock::s_sourceMask
static const uint32_t s_sourceMask
Definition: CmxEnergySubBlock.h:91
LVL1BS::CmxEnergySubBlock::s_etHitsBit
static const int s_etHitsBit
Definition: CmxEnergySubBlock.h:74
LVL1BS::L1CaloSubBlock::unpacker
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
Definition: L1CaloSubBlock.cxx:345
LVL1BS::L1CaloSubBlock::daqOverflow
bool daqOverflow() const
Definition: L1CaloSubBlock.h:303
LVL1BS::L1CaloSubBlock::UNPACK_VERSION
@ UNPACK_VERSION
Definition: L1CaloSubBlock.h:38
LVL1BS::CmxEnergySubBlock::s_wordLength
static const int s_wordLength
Data word length.
Definition: CmxEnergySubBlock.h:70
LVL1BS::CmxEnergySubBlock::MODULE_ID
@ MODULE_ID
Definition: CmxEnergySubBlock.h:26
LVL1BS::CmxEnergySubBlock::s_sumTypeMask
static const uint32_t s_sumTypeMask
Definition: CmxEnergySubBlock.h:90
LVL1BS::CmxEnergySubBlock::~CmxEnergySubBlock
~CmxEnergySubBlock()
Definition: CmxEnergySubBlock.cxx:51
LVL1BS::CmxEnergySubBlock::s_maxSums
static const int s_maxSums
Definition: CmxEnergySubBlock.h:82
LVL1BS::L1CaloSubBlock::version
int version() const
Definition: L1CaloSubBlock.h:243
LVL1BS::CmxEnergySubBlock::packNeutral
bool packNeutral()
Pack neutral data.
Definition: CmxEnergySubBlock.cxx:314
LVL1BS::CmxEnergySubBlock::s_errorBit
static const int s_errorBit
Definition: CmxEnergySubBlock.h:73
LVL1BS::L1CaloSubBlock::unpackerSuccess
bool unpackerSuccess() const
Return unpacker success flag.
Definition: L1CaloSubBlock.h:354
LVL1BS::CmxEnergySubBlock::s_maxJems
static const int s_maxJems
Definition: CmxEnergySubBlock.h:81
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
LVL1BS::CmxEnergySubBlock::s_jemBit
static const int s_jemBit
Definition: CmxEnergySubBlock.h:76
LVL1BS::CmxEnergySubBlock::REMOTE
@ REMOTE
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxEnergySubBlock::s_overflowMask
static const uint32_t s_overflowMask
Definition: CmxEnergySubBlock.h:86
LVL1BS::CmxEnergySubBlock::MAX_ENERGY_TYPE
@ MAX_ENERGY_TYPE
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::ENERGY_EX
@ ENERGY_EX
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::s_wordIdMask
static const uint32_t s_wordIdMask
Definition: CmxEnergySubBlock.h:92
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::CmxEnergySubBlock::s_energyTypeBit
static const int s_energyTypeBit
Definition: CmxEnergySubBlock.h:77
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
LVL1BS::CmxEnergySubBlock::unpackNeutral
bool unpackNeutral()
Unpack neutral data.
Definition: CmxEnergySubBlock.cxx:433
LVL1BS::CmxEnergySubBlock::RESTRICTED_WEIGHTED
@ RESTRICTED_WEIGHTED
Definition: CmxEnergySubBlock.h:30
LVL1BS::CmxEnergySubBlock::index
int index(int slice, int pos) const
Definition: CmxEnergySubBlock.cxx:294
LVL1BS::CmxEnergySubBlock::SumType
SumType
Definition: CmxEnergySubBlock.h:30
LVL1BS::CmxEnergySubBlock::ENERGY_EY
@ ENERGY_EY
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::MISSING_ET_SIG
@ MISSING_ET_SIG
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::s_energyTypeJemBit
static const int s_energyTypeJemBit
Definition: CmxEnergySubBlock.h:75
LVL1BS
Definition: ZdcByteStreamReadV1V2Tool.h:47
LVL1BS::CmxEnergySubBlock::energy
unsigned int energy(int slice, int jem, EnergyType eType) const
Return energy subsum for given JEM and energy type.
Definition: CmxEnergySubBlock.cxx:65
LVL1BS::L1CaloSubBlock::setUnpackErrorCode
void setUnpackErrorCode(int code)
Set the unpacking error code.
Definition: L1CaloSubBlock.h:338
LVL1BS::CmxEnergySubBlock::hits
unsigned int hits(int slice, HitsType hType, SumType sType) const
Return hits map for given hits type and sum type.
Definition: CmxEnergySubBlock.cxx:127
LVL1BS::CmxEnergySubBlock::s_jemMask
static const uint32_t s_jemMask
Definition: CmxEnergySubBlock.h:88
rr
const boost::regex rr(r_r)
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
error
Definition: IImpactPoint3dEstimator.h:70
LVL1BS::CmxEnergySubBlock::LOCAL
@ LOCAL
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxEnergySubBlock::error
int error(int slice, int jem, EnergyType eType) const
Return energy subsum error for given JEM and energy type.
Definition: CmxEnergySubBlock.cxx:79
LVL1BS::CmxEnergySubBlock::s_paddingBits
static const int s_paddingBits
Definition: CmxEnergySubBlock.h:101
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
LVL1BS::CmxEnergySubBlock::packUncompressed
bool packUncompressed()
Pack uncompressed data.
Definition: CmxEnergySubBlock.cxx:421
LVL1BS::L1CaloSubBlock::UNCOMPRESSED
@ UNCOMPRESSED
Definition: L1CaloSubBlock.h:28
LVL1BS::L1CaloSubBlock::UNPACK_FORMAT
@ UNPACK_FORMAT
Definition: L1CaloSubBlock.h:39
CmxEnergySubBlock.h
LVL1BS::L1CaloSubBlock::packerNeutralParity
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.
Definition: L1CaloSubBlock.cxx:434
LVL1BS::CmxEnergySubBlock::TOTAL
@ TOTAL
Definition: CmxEnergySubBlock.h:29