ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1BS::CmxEnergySubBlock Class Reference

Sub-Block class for CMX-Energy data post LS1. More...

#include <CmxEnergySubBlock.h>

Inheritance diagram for LVL1BS::CmxEnergySubBlock:
Collaboration diagram for LVL1BS::CmxEnergySubBlock:

Public Types

enum  WordIdType { MODULE_ID, CRATE_SYSTEM_ID }
 
enum  EnergyType { ENERGY_EX, ENERGY_EY, ENERGY_ET, MAX_ENERGY_TYPE }
 
enum  HitsType { MISSING_ET_SIG, MISSING_ET, SUM_ET, MAX_HITS_TYPE }
 
enum  SourceType { REMOTE, LOCAL, TOTAL, MAX_SOURCE_TYPE }
 
enum  SumType { STANDARD, RESTRICTED_WEIGHTED, MAX_SUM_TYPE }
 
enum  CmxFirmwareCode { CMX_CP = 0, CMX_JET = 1, CMX_ENERGY = 2, CMX_UNKNOWN = 3 }
 
enum  CmxSummingCode { CRATE = 0, SYSTEM = 1 }
 
enum  CmxPositions { LEFT = 0, RIGHT = 1 }
 
enum  SubBlockWordType { HEADER, DATA, STATUS }
 
enum  DataFormats { NEUTRAL = 0, UNCOMPRESSED = 1, COMPRESSED = 2, SUPERCOMPRESSED = 3 }
 
enum  DataErrorType {
  ERROR_NONE, ERROR_DUPLICATE_ROB, ERROR_ROD_ID, ERROR_ROD_NSTATUS,
  ERROR_USER_HEADER, ERROR_MISSING_HEADER, ERROR_MISSING_SUBBLOCK, ERROR_CRATE_NUMBER,
  ERROR_MODULE_NUMBER, ERROR_SLICES, ERROR_DUPLICATE_DATA, ERROR_ROI_TYPE,
  ERROR_MAX
}
 
enum  UnpackErrorType {
  UNPACK_NONE = ERROR_NONE, UNPACK_VERSION = ERROR_MAX, UNPACK_FORMAT, UNPACK_COMPRESSION_VERSION,
  UNPACK_COMPRESSION_SLICES, UNPACK_DATA_TRUNCATED, UNPACK_EXCESS_DATA, UNPACK_SOURCE_ID,
  UNPACK_EXCESS_TOBS, UNPACK_DATA_ID
}
 

Public Member Functions

 CmxEnergySubBlock ()
 
 ~CmxEnergySubBlock ()
 
void clear ()
 Clear all data. More...
 
unsigned int energy (int slice, int jem, EnergyType eType) const
 Return energy subsum for given JEM and energy type. More...
 
int error (int slice, int jem, EnergyType eType) const
 Return energy subsum error for given JEM and energy type. More...
 
unsigned int energy (int slice, SourceType source, SumType sType, EnergyType eType) const
 Return energy subsum for given source, sum type and energy type. More...
 
int error (int slice, SourceType source, SumType sType, EnergyType eType) const
 Return energy subsum error for given source, sum type and energy type. More...
 
unsigned int hits (int slice, HitsType hType, SumType sType) const
 Return hits map for given hits type and sum type. More...
 
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. More...
 
void setSubsums (int slice, SourceType source, SumType sType, unsigned int ex, unsigned int ey, unsigned int et, int exError, int eyError, int etError)
 Store energy subsums and errors for given source and sum type. More...
 
void setEtHits (int slice, HitsType hType, SumType sType, unsigned int map)
 Store hits map for given hits type and sum type. More...
 
bool pack ()
 Pack data. More...
 
bool unpack ()
 Unpack data. More...
 
void setCmxHeader (int version, int format, int slice, int crate, int summing, int firmware, int position, int timeslices)
 Store CMX header. More...
 
int cmxSumming () const
 
int cmxFirmware () const
 
int cmxPosition () const
 
int timeslices () const
 
int dataWords () const
 Return number of data words. More...
 
void setHeader (int wordId, int version, int format, int seqno, int crate, int module, int slices2, int slices1)
 Store header data. More...
 
int wordId () const
 
int version () const
 
int format () const
 
int seqno () const
 
int slice () const
 
int crate () const
 
int module () const
 
int slices2 () const
 
int slices1 () const
 
uint32_t failingBCN () const
 
bool glinkTimeout () const
 
bool glinkDown () const
 
bool upstreamError () const
 
bool daqOverflow () const
 
bool bcnMismatch () const
 
bool glinkProtocol () const
 
bool glinkParity () const
 
uint32_t subStatus () const
 Return Sub-status word. More...
 
void setBunchCrossing (int bc)
 Set the Bunch Crossing number (neutral format only) More...
 
int bunchCrossing () const
 Return the Bunch Crossing number (neutral format only) More...
 
OFFLINE_FRAGMENTS_NAMESPACE::PointerType read (const OFFLINE_FRAGMENTS_NAMESPACE::PointerType beg, const OFFLINE_FRAGMENTS_NAMESPACE::PointerType end)
 Input complete packed sub-block from ROD array. More...
 
void write (FullEventAssembler< L1CaloSrcIdMap >::RODDATA *theROD) const
 Output complete packed sub-block to ROD vector. More...
 
void setStatus (uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity)
 Store error status trailer. More...
 
void setDaqOverflow (int bit=1)
 Set DAQ FIFO Overflow bit in Sub-status word. More...
 
void setGlinkParity (int bit=1)
 Set G-Link Parity bit in Sub-status word. More...
 
void setUnpackErrorCode (int code)
 Set the unpacking error code. More...
 
int unpackErrorCode () const
 Return the unpacking error code. More...
 
std::string unpackErrorMsg () const
 Return the unpacking error message for printing. More...
 
int minBits (uint32_t datum) const
 Return the minimum number of bits needed for given data. More...
 
int parityBit (int init, uint32_t datum, int nbits) const
 Return the parity bit for given data. More...
 
void packer (uint32_t datum, int nbits)
 Pack given data into given number of bits. More...
 
void packerFlush ()
 Flush the current data word padded with zeros. More...
 
void setStreamed ()
 Set continuous bit streaming for compressed formats. More...
 
uint32_t unpacker (int nbits)
 Unpack given number of bits of data. More...
 
uint32_t unpacker (int nbits, int align)
 
void unpackerInit ()
 Initialise unpacker. More...
 
bool unpackerSuccess () const
 Return unpacker success flag. More...
 
void packerNeutral (int pin, uint32_t datum, int nbits)
 Pack given neutral data from given pin. More...
 
void packerNeutralParity (int pin)
 Pack current G-Link parity bit for given pin. More...
 
uint32_t unpackerNeutral (int pin, int nbits)
 Unpack given number of bits of neutral data for given pin. More...
 
bool unpackerNeutralParityError (int pin)
 Unpack and test G-Link parity bit for given pin. More...
 
int currentPinBit (int pin) const
 Return current pin bit for given pin. More...
 

Static Public Member Functions

static CmxFirmwareCode cmxType (uint32_t word)
 CMX differentiation (CMX_CP, CMX_JET, or CMX_ENERGY) More...
 
static bool cmxBlock (uint32_t word)
 Determine if header word corresponds to CMX. More...
 
static int wordId (uint32_t word)
 Return wordID field from given header word. More...
 
static int version (uint32_t word)
 Return version number from given header word. More...
 
static int format (uint32_t word)
 Return data format from given header word. More...
 
static int seqno (uint32_t word)
 Return seqno field from given header word. More...
 
static int module (uint32_t word)
 Return module field from given header word. More...
 
static SubBlockWordType wordType (uint32_t word)
 Word identification. More...
 

Private Member Functions

int index (int slice, int pos) const
 
void resize ()
 
bool packNeutral ()
 Pack neutral data. More...
 
bool packUncompressed ()
 Pack uncompressed data. More...
 
bool unpackNeutral ()
 Unpack neutral data. More...
 
bool unpackUncompressed ()
 Unpack uncompressed data. More...
 

Private Attributes

std::vector< uint32_t > m_sumsData
 Energy subsums data. More...
 
uint32_t m_header
 Sub-Block Header. More...
 
uint32_t m_trailer
 Sub-Block Status Trailer. More...
 
int m_bunchCrossing
 Bunch Crossing number (neutral format only) More...
 
int m_unpackError
 Unpacking error code. More...
 
uint32_t m_bitword
 
int m_currentBit
 
int m_maxBits
 
uint32_t m_maxMask
 
bool m_unpackerFlag
 
std::vector< uint32_t >::const_iterator m_dataPos
 
std::vector< uint32_t >::const_iterator m_dataPosEnd
 
std::vector< int > m_currentPinBit
 
std::vector< int > m_oddParity
 
int m_dataWords
 Current number of data words. More...
 
std::vector< uint32_t > m_data
 Sub-Block data. More...
 
std::vector< uint32_t > m_unpackingMasks
 Unpacking masks. More...
 

Static Private Attributes

static const int s_wordLength = 32
 Data word length. More...
 
static const int s_overflowBit = 15
 
static const int s_errorBit = 16
 
static const int s_etHitsBit = 16
 
static const int s_energyTypeJemBit = 23
 
static const int s_jemBit = 25
 
static const int s_energyTypeBit = 24
 
static const int s_sumTypeBit = 26
 
static const int s_sourceBit = 27
 
static const int s_wordIdBit = 29
 
static const int s_maxJems = 16
 
static const int s_maxSums = 66
 
static const uint32_t s_energyJemMask = 0x3fff
 
static const uint32_t s_energySumMask = 0x7fff
 
static const uint32_t s_errorMask = 0x1
 
static const uint32_t s_overflowMask = 0x1
 
static const uint32_t s_etHitsMask = 0xff
 
static const uint32_t s_jemMask = 0xf
 
static const uint32_t s_energyTypeMask = 0x3
 
static const uint32_t s_sumTypeMask = 0x1
 
static const uint32_t s_sourceMask = 0x3
 
static const uint32_t s_wordIdMask = 0x7
 
static const int s_jemSumBits = 14
 
static const int s_jemPaddingBits = 9
 
static const int s_sumBitsEtCrate = 14
 
static const int s_sumBitsEtSys = 15
 
static const int s_sumBitsExEy = 15
 
static const int s_bunchCrossingBits = 12
 
static const int s_etHitMapsBits = 8
 
static const int s_paddingBits = 43
 
static const int s_wordIdVal = 0xe
 CMX header word ID. More...
 
static const int s_cmxSummingBit = 3
 
static const int s_cmxFirmwareBit = 1
 
static const int s_cmxPositionBit = 0
 
static const uint32_t s_cmxSummingMask = 0x1
 
static const uint32_t s_cmxFirmwareMask = 0x3
 
static const uint32_t s_cmxPositionMask = 0x1
 
static const int s_glinkBitsPerSlice = 97
 Needed for neutral format. More...
 
static const int s_headerBit = 30
 
static const int s_statusBit = 28
 
static const uint32_t s_headerMask = 0x3
 
static const uint32_t s_statusMask = 0x1
 
static const uint32_t s_headerVal = 0x3
 
static const uint32_t s_statusVal = 0x1
 
static const int s_ppmCrates = 8
 
static const int s_versionBit = 25
 
static const int s_formatBit = 22
 
static const int s_seqnoBit = 16
 
static const int s_crateBit = 12
 
static const int s_moduleBit = 8
 
static const int s_slices2Bit = 3
 
static const int s_slices1Bit = 0
 
static const uint32_t s_versionMask = 0x7
 
static const uint32_t s_formatMask = 0x7
 
static const uint32_t s_seqnoMask = 0x3f
 
static const uint32_t s_crateMask = 0xf
 
static const uint32_t s_moduleMask = 0xf
 
static const uint32_t s_slices2Mask = 0x1f
 
static const uint32_t s_slices1Mask = 0x7
 
static const int s_failingBcnBit = 22
 
static const int s_glinkTimeoutBit = 7
 
static const int s_glinkDownBit = 6
 
static const int s_upstreamErrorBit = 4
 
static const int s_daqOverflowBit = 3
 
static const int s_bcnMismatchBit = 2
 
static const int s_glinkProtocolBit = 1
 
static const int s_glinkParityBit = 0
 
static const uint32_t s_failingBcnMask = 0x3f
 
static const int s_maxWordBits = 32
 
static const int s_maxStreamedBits = 31
 
static const uint32_t s_maxWordMask = 0xffffffff
 
static const uint32_t s_maxStreamedMask = 0x7fffffff
 
static const int s_maxPins = 20
 
static const uint32_t s_glinkDavSet = 0x400000
 

Detailed Description

Sub-Block class for CMX-Energy data post LS1.

Based on "ATLAS Level-1 Calorimeter Trigger Read-out Driver" Version X.xxx //<<== CHECK

Author
Peter Faulkner

Definition at line 23 of file CmxEnergySubBlock.h.

Member Enumeration Documentation

◆ CmxFirmwareCode

Enumerator
CMX_CP 
CMX_JET 
CMX_ENERGY 
CMX_UNKNOWN 

Definition at line 25 of file CmxSubBlock.h.

25  { CMX_CP = 0, CMX_JET = 1, CMX_ENERGY = 2, // <<== CHECK
26  CMX_UNKNOWN = 3 };

◆ CmxPositions

Enumerator
LEFT 
RIGHT 

Definition at line 28 of file CmxSubBlock.h.

28 { LEFT = 0, RIGHT = 1 };

◆ CmxSummingCode

Enumerator
CRATE 
SYSTEM 

Definition at line 27 of file CmxSubBlock.h.

27 { CRATE = 0, SYSTEM = 1 };

◆ DataErrorType

Enumerator
ERROR_NONE 
ERROR_DUPLICATE_ROB 
ERROR_ROD_ID 
ERROR_ROD_NSTATUS 
ERROR_USER_HEADER 
ERROR_MISSING_HEADER 
ERROR_MISSING_SUBBLOCK 
ERROR_CRATE_NUMBER 
ERROR_MODULE_NUMBER 
ERROR_SLICES 
ERROR_DUPLICATE_DATA 
ERROR_ROI_TYPE 
ERROR_MAX 

Definition at line 31 of file L1CaloSubBlock.h.

◆ DataFormats

Enumerator
NEUTRAL 
UNCOMPRESSED 
COMPRESSED 
SUPERCOMPRESSED 

Definition at line 28 of file L1CaloSubBlock.h.

28  { NEUTRAL = 0, UNCOMPRESSED = 1, COMPRESSED = 2,
29  SUPERCOMPRESSED = 3 };

◆ EnergyType

Enumerator
ENERGY_EX 
ENERGY_EY 
ENERGY_ET 
MAX_ENERGY_TYPE 

Definition at line 27 of file CmxEnergySubBlock.h.

◆ HitsType

Enumerator
MISSING_ET_SIG 
MISSING_ET 
SUM_ET 
MAX_HITS_TYPE 

Definition at line 28 of file CmxEnergySubBlock.h.

◆ SourceType

Enumerator
REMOTE 
LOCAL 
TOTAL 
MAX_SOURCE_TYPE 

Definition at line 29 of file CmxEnergySubBlock.h.

◆ SubBlockWordType

Enumerator
HEADER 
DATA 
STATUS 

Definition at line 27 of file L1CaloSubBlock.h.

27 { HEADER, DATA, STATUS };

◆ SumType

Enumerator
STANDARD 
RESTRICTED_WEIGHTED 
MAX_SUM_TYPE 

Definition at line 30 of file CmxEnergySubBlock.h.

◆ UnpackErrorType

Enumerator
UNPACK_NONE 
UNPACK_VERSION 
UNPACK_FORMAT 
UNPACK_COMPRESSION_VERSION 
UNPACK_COMPRESSION_SLICES 
UNPACK_DATA_TRUNCATED 
UNPACK_EXCESS_DATA 
UNPACK_SOURCE_ID 
UNPACK_EXCESS_TOBS 
UNPACK_DATA_ID 

Definition at line 38 of file L1CaloSubBlock.h.

◆ WordIdType

Enumerator
MODULE_ID 
CRATE_SYSTEM_ID 

Definition at line 26 of file CmxEnergySubBlock.h.

Constructor & Destructor Documentation

◆ CmxEnergySubBlock()

LVL1BS::CmxEnergySubBlock::CmxEnergySubBlock ( )

Definition at line 47 of file CmxEnergySubBlock.cxx.

48 {
49 }

◆ ~CmxEnergySubBlock()

LVL1BS::CmxEnergySubBlock::~CmxEnergySubBlock ( )

Definition at line 51 of file CmxEnergySubBlock.cxx.

52 {
53 }

Member Function Documentation

◆ bcnMismatch()

bool LVL1BS::L1CaloSubBlock::bcnMismatch ( ) const
inlineinherited

Definition at line 308 of file L1CaloSubBlock.h.

309 {
310  return m_trailer & (0x1 << s_bcnMismatchBit);
311 }

◆ bunchCrossing()

int LVL1BS::L1CaloSubBlock::bunchCrossing ( ) const
inlineinherited

Return the Bunch Crossing number (neutral format only)

Definition at line 333 of file L1CaloSubBlock.h.

334 {
335  return m_bunchCrossing;
336 }

◆ clear()

void LVL1BS::CmxEnergySubBlock::clear ( )

Clear all data.

Definition at line 57 of file CmxEnergySubBlock.cxx.

58 {
60  m_sumsData.clear();
61 }

◆ cmxBlock()

bool LVL1BS::CmxSubBlock::cmxBlock ( uint32_t  word)
staticinherited

Determine if header word corresponds to CMX.

Definition at line 84 of file CmxSubBlock.cxx.

85 {
86  return L1CaloSubBlock::wordId(word) == s_wordIdVal;
87 }

◆ cmxFirmware()

int LVL1BS::CmxSubBlock::cmxFirmware ( ) const
inlineinherited

Definition at line 68 of file CmxSubBlock.h.

69 {
71 }

◆ cmxPosition()

int LVL1BS::CmxSubBlock::cmxPosition ( ) const
inlineinherited

Definition at line 73 of file CmxSubBlock.h.

74 {
76 }

◆ cmxSumming()

int LVL1BS::CmxSubBlock::cmxSumming ( ) const
inlineinherited

Definition at line 63 of file CmxSubBlock.h.

64 {
65  return (module() >> s_cmxSummingBit) & s_cmxSummingMask;
66 }

◆ cmxType()

CmxSubBlock::CmxFirmwareCode LVL1BS::CmxSubBlock::cmxType ( uint32_t  word)
staticinherited

CMX differentiation (CMX_CP, CMX_JET, or CMX_ENERGY)

Definition at line 60 of file CmxSubBlock.cxx.

61 {
63  const int module = L1CaloSubBlock::module(word);
64  const int code = (module >> s_cmxFirmwareBit) & s_cmxFirmwareMask;
65  switch (code) {
66  case CMX_CP:
67  type = CMX_CP;
68  break;
69  case CMX_JET:
70  type = CMX_JET;
71  break;
72  case CMX_ENERGY:
73  type = CMX_ENERGY;
74  break;
75  default:
76  type = CMX_UNKNOWN;
77  break;
78  }
79  return type;
80 }

◆ crate()

int LVL1BS::L1CaloSubBlock::crate ( ) const
inlineinherited

Definition at line 263 of file L1CaloSubBlock.h.

264 {
265  return (m_header >> s_crateBit) & s_crateMask;
266 }

◆ currentPinBit()

int LVL1BS::L1CaloSubBlock::currentPinBit ( int  pin) const
inlineinherited

Return current pin bit for given pin.

Definition at line 359 of file L1CaloSubBlock.h.

360 {
361  return m_currentPinBit[pin];
362 }

◆ daqOverflow()

bool LVL1BS::L1CaloSubBlock::daqOverflow ( ) const
inlineinherited

Definition at line 303 of file L1CaloSubBlock.h.

304 {
305  return m_trailer & (0x1 << s_daqOverflowBit);
306 }

◆ dataWords()

int LVL1BS::L1CaloSubBlock::dataWords ( ) const
inlineinherited

Return number of data words.

Definition at line 233 of file L1CaloSubBlock.h.

234 {
235  return m_dataWords;
236 }

◆ energy() [1/2]

unsigned int LVL1BS::CmxEnergySubBlock::energy ( int  slice,
int  jem,
EnergyType  eType 
) const

Return energy subsum for given JEM and energy type.

Definition at line 65 of file CmxEnergySubBlock.cxx.

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 }

◆ energy() [2/2]

unsigned int LVL1BS::CmxEnergySubBlock::energy ( int  slice,
SourceType  source,
SumType  sType,
EnergyType  eType 
) const

Return energy subsum for given source, sum type and energy type.

Definition at line 94 of file CmxEnergySubBlock.cxx.

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 }

◆ error() [1/2]

int LVL1BS::CmxEnergySubBlock::error ( int  slice,
int  jem,
EnergyType  eType 
) const

Return energy subsum error for given JEM and energy type.

Definition at line 79 of file CmxEnergySubBlock.cxx.

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 }

◆ error() [2/2]

int LVL1BS::CmxEnergySubBlock::error ( int  slice,
SourceType  source,
SumType  sType,
EnergyType  eType 
) const

Return energy subsum error for given source, sum type and energy type.

Definition at line 109 of file CmxEnergySubBlock.cxx.

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 }

◆ failingBCN()

uint32_t LVL1BS::L1CaloSubBlock::failingBCN ( ) const
inlineinherited

Definition at line 283 of file L1CaloSubBlock.h.

284 {
286 }

◆ format() [1/2]

int LVL1BS::L1CaloSubBlock::format ( ) const
inlineinherited

Definition at line 248 of file L1CaloSubBlock.h.

249 {
250  return (m_header >> s_formatBit) & s_formatMask;
251 }

◆ format() [2/2]

int LVL1BS::L1CaloSubBlock::format ( uint32_t  word)
staticinherited

Return data format from given header word.

Definition at line 506 of file L1CaloSubBlock.cxx.

507 {
508  return (word >> s_formatBit) & s_formatMask;
509 }

◆ glinkDown()

bool LVL1BS::L1CaloSubBlock::glinkDown ( ) const
inlineinherited

Definition at line 293 of file L1CaloSubBlock.h.

294 {
295  return m_trailer & (0x1 << s_glinkDownBit);
296 }

◆ glinkParity()

bool LVL1BS::L1CaloSubBlock::glinkParity ( ) const
inlineinherited

Definition at line 318 of file L1CaloSubBlock.h.

319 {
320  return m_trailer & (0x1 << s_glinkParityBit);
321 }

◆ glinkProtocol()

bool LVL1BS::L1CaloSubBlock::glinkProtocol ( ) const
inlineinherited

Definition at line 313 of file L1CaloSubBlock.h.

314 {
315  return m_trailer & (0x1 << s_glinkProtocolBit);
316 }

◆ glinkTimeout()

bool LVL1BS::L1CaloSubBlock::glinkTimeout ( ) const
inlineinherited

Definition at line 288 of file L1CaloSubBlock.h.

289 {
290  return m_trailer & (0x1 << s_glinkTimeoutBit);
291 }

◆ hits()

unsigned int LVL1BS::CmxEnergySubBlock::hits ( int  slice,
HitsType  hType,
SumType  sType 
) const

Return hits map for given hits type and sum type.

Definition at line 127 of file CmxEnergySubBlock.cxx.

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 }

◆ index()

int LVL1BS::CmxEnergySubBlock::index ( int  slice,
int  pos 
) const
private

Definition at line 294 of file CmxEnergySubBlock.cxx.

295 {
296  int ix = 3 * pos;
297  if (format() == NEUTRAL) ix += slice * s_maxSums;
298  return ix;
299 }

◆ minBits()

int LVL1BS::L1CaloSubBlock::minBits ( uint32_t  datum) const
inherited

Return the minimum number of bits needed for given data.

Definition at line 274 of file L1CaloSubBlock.cxx.

275 {
276  const int maxBits = 32;
277  int nbits = maxBits;
278  for (int i = 0; i < maxBits; ++i)
279  {
280  if ( !(datum >> i))
281  {
282  nbits = i;
283  break;
284  }
285  }
286  return nbits;
287 }

◆ module() [1/2]

int LVL1BS::L1CaloSubBlock::module ( ) const
inlineinherited

Definition at line 268 of file L1CaloSubBlock.h.

269 {
270  return (m_header >> s_moduleBit) & s_moduleMask;
271 }

◆ module() [2/2]

int LVL1BS::L1CaloSubBlock::module ( uint32_t  word)
staticinherited

Return module field from given header word.

Definition at line 520 of file L1CaloSubBlock.cxx.

521 {
522  return (word >> s_moduleBit) & s_moduleMask;
523 }

◆ pack()

bool LVL1BS::CmxEnergySubBlock::pack ( )

Pack data.

Definition at line 245 of file CmxEnergySubBlock.cxx.

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 }

◆ packer()

void LVL1BS::L1CaloSubBlock::packer ( uint32_t  datum,
int  nbits 
)
inherited

Pack given data into given number of bits.

Definition at line 302 of file L1CaloSubBlock.cxx.

303 {
304  if (nbits > 0)
305  {
306  uint32_t mask = m_unpackingMasks[nbits];
307  m_bitword |= (datum & mask) << m_currentBit;
308  m_currentBit += nbits;
309  if (m_currentBit >= m_maxBits)
310  {
311  m_bitword &= m_maxMask;
312  m_data.push_back(m_bitword);
313  ++m_dataWords;
314  const int bitsLeft = m_currentBit - m_maxBits;
315  if (bitsLeft > 0)
316  {
317  m_bitword = (datum & mask) >> (nbits - bitsLeft);
318  m_currentBit = bitsLeft;
319  }
320  else
321  {
322  m_bitword = 0;
323  m_currentBit = 0;
324  }
325  }
326  }
327 }

◆ packerFlush()

void LVL1BS::L1CaloSubBlock::packerFlush ( )
inherited

Flush the current data word padded with zeros.

Definition at line 331 of file L1CaloSubBlock.cxx.

332 {
333  if (m_currentBit > 0)
334  {
335  m_bitword &= m_maxMask;
336  m_data.push_back(m_bitword);
337  ++m_dataWords;
338  m_bitword = 0;
339  m_currentBit = 0;
340  }
341 }

◆ packerNeutral()

void LVL1BS::L1CaloSubBlock::packerNeutral ( int  pin,
uint32_t  datum,
int  nbits 
)
inherited

Pack given neutral data from given pin.

Definition at line 413 of file L1CaloSubBlock.cxx.

415 {
416  if (pin >= 0 && pin < s_maxPins && nbits > 0)
417  {
418  if (m_currentPinBit[pin] + nbits > m_dataWords)
419  {
420  m_dataWords = m_currentPinBit[pin] + nbits;
422  }
423  for (int bit = 0; bit < nbits; ++bit)
424  {
425  m_data[m_currentPinBit[pin] + bit] |= ((datum >> bit) & 0x1) << pin;
426  }
427  m_currentPinBit[pin] += nbits;
428  m_oddParity[pin] = parityBit(m_oddParity[pin], datum, nbits);
429  }
430 }

◆ packerNeutralParity()

void LVL1BS::L1CaloSubBlock::packerNeutralParity ( int  pin)
inherited

Pack current G-Link parity bit for given pin.

Definition at line 434 of file L1CaloSubBlock.cxx.

435 {
436  if (pin >= 0 && pin < s_maxPins)
437  {
438  packerNeutral(pin, m_oddParity[pin], 1);
439  m_oddParity[pin] = 1;
440  }
441 }

◆ packNeutral()

bool LVL1BS::CmxEnergySubBlock::packNeutral ( )
private

Pack neutral data.

Definition at line 314 of file CmxEnergySubBlock.cxx.

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 }

◆ packUncompressed()

bool LVL1BS::CmxEnergySubBlock::packUncompressed ( )
private

Pack uncompressed data.

Definition at line 421 of file CmxEnergySubBlock.cxx.

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 }

◆ parityBit()

int LVL1BS::L1CaloSubBlock::parityBit ( int  init,
uint32_t  datum,
int  nbits 
) const
inherited

Return the parity bit for given data.

Definition at line 291 of file L1CaloSubBlock.cxx.

293 {
294  // set init to 0/1 for even/odd parity
295  int parity = init;
296  for (int bit = 0; bit < nbits; ++bit) parity ^= (datum >> bit) & 0x1;
297  return parity;
298 }

◆ read()

Input complete packed sub-block from ROD array.

Definition at line 118 of file L1CaloSubBlock.cxx.

121 {
122  m_dataWords = 0;
123  m_unpackerFlag = true;
126  for (; pos != pose; ++pos)
127  {
128  const uint32_t word = *pos;
129  const SubBlockWordType type = wordType(word);
130  if (type == HEADER)
131  {
132  if (m_header) return pos;
133  m_header = word;
134  }
135  else if (type == STATUS)
136  {
137  // Word ID should be consistent with header
138  if (m_trailer || (wordId(word) != wordId() + 1)) return pos;
139  m_trailer = word;
140  }
141  else
142  {
143  // Check data word IDs
144  const int id = wordId(word);
145  bool badId = false;
146  // All neutral format '0000'
147  if (format() == NEUTRAL) badId = (id != 0);
148  // Other PPM '0xxx'
149  else if (crate() < s_ppmCrates) badId = ((id & 0x8) != 0);
150  // Other CPM/JEM '01xx' or '10xx'
151  else if (wordId() == 0xc) badId = (((id & 0xc) != 0x4) &&
152  ((id & 0xc) != 0x8));
153  // Other CMM/CMX '00xx'
154  else badId = ((id & 0xc) != 0);
155  if (m_trailer || badId) return pos;
156  m_data.push_back(word);
157  ++m_dataWords;
158  }
159  }
160  return pose;
161 }

◆ resize()

void LVL1BS::CmxEnergySubBlock::resize ( )
private

Definition at line 303 of file CmxEnergySubBlock.cxx.

304 {
305  if (m_sumsData.empty()) {
306  int size = s_maxSums;
307  if (format() == NEUTRAL) size *= timeslices();
308  m_sumsData.resize(size);
309  }
310 }

◆ seqno() [1/2]

int LVL1BS::L1CaloSubBlock::seqno ( ) const
inlineinherited

Definition at line 253 of file L1CaloSubBlock.h.

254 {
255  return (m_header >> s_seqnoBit) & s_seqnoMask;
256 }

◆ seqno() [2/2]

int LVL1BS::L1CaloSubBlock::seqno ( uint32_t  word)
staticinherited

Return seqno field from given header word.

Definition at line 513 of file L1CaloSubBlock.cxx.

514 {
515  return (word >> s_seqnoBit) & s_seqnoMask;
516 }

◆ setBunchCrossing()

void LVL1BS::L1CaloSubBlock::setBunchCrossing ( int  bc)
inlineinherited

Set the Bunch Crossing number (neutral format only)

Definition at line 328 of file L1CaloSubBlock.h.

329 {
330  if (bc) m_bunchCrossing = bc;
331 }

◆ setCmxHeader()

void LVL1BS::CmxSubBlock::setCmxHeader ( int  version,
int  format,
int  slice,
int  crate,
int  summing,
int  firmware,
int  position,
int  timeslices 
)
inherited

Store CMX header.

Definition at line 33 of file CmxSubBlock.cxx.

37 {
38  int module = 0;
39  module |= (summing & s_cmxSummingMask) << s_cmxSummingBit;
40  module |= (firmware & s_cmxFirmwareMask) << s_cmxFirmwareBit;
41  module |= (position & s_cmxPositionMask) << s_cmxPositionBit;
43  timeslices);
44 }

◆ setDaqOverflow()

void LVL1BS::L1CaloSubBlock::setDaqOverflow ( int  bit = 1)
inherited

Set DAQ FIFO Overflow bit in Sub-status word.

Definition at line 206 of file L1CaloSubBlock.cxx.

207 {
208  if (bit)
209  {
210  if (m_trailer) m_trailer |= (1 << s_daqOverflowBit);
211  else setStatus(0, false, false, false, true, false, false, false);
212  }
213 }

◆ setEtHits()

void LVL1BS::CmxEnergySubBlock::setEtHits ( int  slice,
HitsType  hType,
SumType  sType,
unsigned int  map 
)

Store hits map for given hits type and sum type.

Definition at line 226 of file CmxEnergySubBlock.cxx.

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 }

◆ setGlinkParity()

void LVL1BS::L1CaloSubBlock::setGlinkParity ( int  bit = 1)
inherited

Set G-Link Parity bit in Sub-status word.

Definition at line 217 of file L1CaloSubBlock.cxx.

218 {
219  if (bit)
220  {
221  if (m_trailer) m_trailer |= (1 << s_glinkParityBit);
222  else setStatus(0, false, false, false, false, false, false, true);
223  }
224 }

◆ setHeader()

void LVL1BS::L1CaloSubBlock::setHeader ( int  wordId,
int  version,
int  format,
int  seqno,
int  crate,
int  module,
int  slices2,
int  slices1 
)
inherited

Store header data.

Definition at line 99 of file L1CaloSubBlock.cxx.

103 {
104  uint32_t word = 0;
105  word |= (wordId & s_wordIdMask) << s_wordIdBit;
106  word |= (version & s_versionMask) << s_versionBit;
107  word |= (format & s_formatMask) << s_formatBit;
108  word |= (seqno & s_seqnoMask) << s_seqnoBit;
109  word |= (crate & s_crateMask) << s_crateBit;
110  word |= (module & s_moduleMask) << s_moduleBit;
111  word |= (slices2 & s_slices2Mask) << s_slices2Bit;
112  word |= (slices1 & s_slices1Mask) << s_slices1Bit;
113  m_header = word;
114 }

◆ setStatus()

void LVL1BS::L1CaloSubBlock::setStatus ( uint32_t  failingBCN,
bool  glinkTimeout,
bool  glinkDown,
bool  upstreamError,
bool  daqOverflow,
bool  bcnMismatch,
bool  glinkProtocol,
bool  glinkParity 
)
inherited

Store error status trailer.

Definition at line 179 of file L1CaloSubBlock.cxx.

183 {
184  uint32_t word = 0;
186  word |= glinkTimeout << s_glinkTimeoutBit;
187  word |= glinkDown << s_glinkDownBit;
189  word |= daqOverflow << s_daqOverflowBit;
190  word |= bcnMismatch << s_bcnMismatchBit;
192  word |= glinkParity << s_glinkParityBit;
193  if (word)
194  {
195  word |= (wordId() & s_wordIdMask) << s_wordIdBit;
196  word |= (s_statusVal & s_statusMask) << s_statusBit;
197  word |= (seqno() & s_seqnoMask) << s_seqnoBit;
198  word |= (crate() & s_crateMask) << s_crateBit;
199  word |= (module() & s_moduleMask) << s_moduleBit;
200  }
201  m_trailer = word;
202 }

◆ setStreamed()

void LVL1BS::L1CaloSubBlock::setStreamed ( )
inlineinherited

Set continuous bit streaming for compressed formats.

Definition at line 348 of file L1CaloSubBlock.h.

349 {
352 }

◆ setSubsums() [1/2]

void LVL1BS::CmxEnergySubBlock::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 at line 142 of file CmxEnergySubBlock.cxx.

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 }

◆ setSubsums() [2/2]

void LVL1BS::CmxEnergySubBlock::setSubsums ( int  slice,
SourceType  source,
SumType  sType,
unsigned int  ex,
unsigned int  ey,
unsigned int  et,
int  exError,
int  eyError,
int  etError 
)

Store energy subsums and errors for given source and sum type.

Definition at line 180 of file CmxEnergySubBlock.cxx.

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 }

◆ setUnpackErrorCode()

void LVL1BS::L1CaloSubBlock::setUnpackErrorCode ( int  code)
inlineinherited

Set the unpacking error code.

Definition at line 338 of file L1CaloSubBlock.h.

339 {
341 }

◆ slice()

int LVL1BS::L1CaloSubBlock::slice ( ) const
inlineinherited

Definition at line 258 of file L1CaloSubBlock.h.

259 {
260  return seqno();
261 }

◆ slices1()

int LVL1BS::L1CaloSubBlock::slices1 ( ) const
inlineinherited

Definition at line 278 of file L1CaloSubBlock.h.

279 {
280  return (m_header >> s_slices1Bit) & s_slices1Mask;
281 }

◆ slices2()

int LVL1BS::L1CaloSubBlock::slices2 ( ) const
inlineinherited

Definition at line 273 of file L1CaloSubBlock.h.

274 {
275  return (m_header >> s_slices2Bit) & s_slices2Mask;
276 }

◆ subStatus()

uint32_t LVL1BS::L1CaloSubBlock::subStatus ( ) const
inlineinherited

Return Sub-status word.

Definition at line 323 of file L1CaloSubBlock.h.

324 {
325  return m_trailer;
326 }

◆ timeslices()

int LVL1BS::CmxSubBlock::timeslices ( ) const
inherited

Definition at line 48 of file CmxSubBlock.cxx.

49 {
50  int slices = slices1();
51  if (slices == 0 && format() == NEUTRAL) {
53  }
54  if (slices == 0) slices = 1;
55  return slices;
56 }

◆ unpack()

bool LVL1BS::CmxEnergySubBlock::unpack ( )

Unpack data.

Definition at line 267 of file CmxEnergySubBlock.cxx.

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:
279  break;
280  default:
282  break;
283  }
284  break;
285  default:
287  break;
288  }
289  return rc;
290 }

◆ unpacker() [1/2]

uint32_t LVL1BS::L1CaloSubBlock::unpacker ( int  nbits)
inherited

Unpack given number of bits of data.

Definition at line 345 of file L1CaloSubBlock.cxx.

346 {
347  uint32_t word = 0;
348  if (nbits > 0)
349  {
350  if (m_dataPos == m_dataPosEnd)
351  {
352  m_unpackerFlag = false;
353  return 0;
354  }
355  int nbitsDone = nbits;
356  if (nbitsDone > m_maxBits - m_currentBit)
357  {
358  nbitsDone = m_maxBits - m_currentBit;
359  }
360  word = (m_bitword >> m_currentBit) & m_unpackingMasks[nbitsDone];
361  m_currentBit += nbits;
362 
363  if (m_currentBit >= m_maxBits)
364  {
365  m_bitword = 0;
366  if (m_dataPos != m_dataPosEnd)
367  {
368  ++m_dataPos;
369  if (m_dataPos != m_dataPosEnd)
370  {
371  m_bitword = *m_dataPos;
372  }
373  }
374  m_currentBit = 0;
375  const int bitsLeft = nbits - nbitsDone;
376  if (bitsLeft > 0)
377  {
378  if (m_dataPos == m_dataPosEnd)
379  {
380  m_unpackerFlag = false;
381  return word;
382  }
383  word |= (m_bitword & m_unpackingMasks[bitsLeft]) << nbitsDone;
384  m_currentBit = bitsLeft;
385  }
386  }
387  }
388  return word;
389 }

◆ unpacker() [2/2]

uint32_t LVL1BS::L1CaloSubBlock::unpacker ( int  nbits,
int  align 
)
inherited

◆ unpackerInit()

void LVL1BS::L1CaloSubBlock::unpackerInit ( )
inherited

Initialise unpacker.

Definition at line 393 of file L1CaloSubBlock.cxx.

394 {
395  m_bitword = 0;
396  m_currentBit = 0;
397  m_unpackerFlag = true;
398  m_dataPos = m_data.begin();
399  m_dataPosEnd = m_data.end();
400  // std::cout << "SASHA4 m_dataPosEnd - m_dataPos=" << (m_dataPosEnd - m_dataPos) << std::endl;
401  // uint16_t a = (*m_dataPos) & 0xFF;
402  // uint16_t b = (*m_dataPos >> 11) & 0xFF;
403 
404  // std::cout << "SASHA5 first " << a << std::endl;
405  // std::cout << "SASHA5 second " << b << std::endl;
406  // std::cout << "SASHA5 datawords " << m_data.size() << std::endl;
407 
409 }

◆ unpackerNeutral()

uint32_t LVL1BS::L1CaloSubBlock::unpackerNeutral ( int  pin,
int  nbits 
)
inherited

Unpack given number of bits of neutral data for given pin.

Definition at line 445 of file L1CaloSubBlock.cxx.

446 {
447  uint32_t word = 0;
448  if (pin >= 0 && pin < s_maxPins && nbits > 0
449  && m_currentPinBit[pin] + nbits <= m_dataWords)
450  {
451  for (int bit = 0; bit < nbits; ++bit)
452  {
453  word |= ((m_data[m_currentPinBit[pin] + bit] >> pin) & 0x1) << bit;
454  }
455  m_currentPinBit[pin] += nbits;
456  m_oddParity[pin] = parityBit(m_oddParity[pin], word, nbits);
457  }
458  else m_unpackerFlag = false;
459  return word;
460 }

◆ unpackerNeutralParityError()

bool LVL1BS::L1CaloSubBlock::unpackerNeutralParityError ( int  pin)
inherited

Unpack and test G-Link parity bit for given pin.

Definition at line 464 of file L1CaloSubBlock.cxx.

465 {
466  bool error = true;
467  if (pin >= 0 && pin < s_maxPins)
468  {
469  int parity = m_oddParity[pin];
470  int bit = unpackerNeutral(pin, 1);
471  m_oddParity[pin] = 1;
472  error = !(bit == parity);
473  }
474  return error;
475 }

◆ unpackErrorCode()

int LVL1BS::L1CaloSubBlock::unpackErrorCode ( ) const
inlineinherited

Return the unpacking error code.

Definition at line 343 of file L1CaloSubBlock.h.

344 {
345  return m_unpackError;
346 }

◆ unpackErrorMsg()

std::string LVL1BS::L1CaloSubBlock::unpackErrorMsg ( ) const
inherited

Return the unpacking error message for printing.

Definition at line 228 of file L1CaloSubBlock.cxx.

229 {
230  std::string msg;
231  switch (m_unpackError)
232  {
233  case UNPACK_NONE:
234  msg = "No error";
235  break;
236  case UNPACK_VERSION:
237  msg = "Unsupported Data Version";
238  break;
239  case UNPACK_FORMAT:
240  msg = "Unsupported Data Format";
241  break;
243  msg = "Unsupported Compression Version";
244  break;
246  msg = "Unsupported Number of Slices for Compression Version";
247  break;
249  msg = "Premature End of Sub-block Data";
250  break;
251  case UNPACK_EXCESS_DATA:
252  msg = "Excess Data in Sub-block";
253  break;
254  case UNPACK_SOURCE_ID:
255  msg = "Invalid Source ID in Sub-block Data";
256  break;
257  case UNPACK_EXCESS_TOBS:
258  msg = "Excess TOBs in Sub-block Data";
259  break;
260  case UNPACK_DATA_ID:
261  msg = "Invalid word ID in Sub-block Data";
262  break;
263  default:
264  msg = "Unknown Error Code";
265  break;
266  }
267  return msg;
268 }

◆ unpackerSuccess()

bool LVL1BS::L1CaloSubBlock::unpackerSuccess ( ) const
inlineinherited

Return unpacker success flag.

Definition at line 354 of file L1CaloSubBlock.h.

355 {
356  return m_unpackerFlag;
357 }

◆ unpackNeutral()

bool LVL1BS::CmxEnergySubBlock::unpackNeutral ( )
private

Unpack neutral data.

Definition at line 433 of file CmxEnergySubBlock.cxx.

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 }

◆ unpackUncompressed()

bool LVL1BS::CmxEnergySubBlock::unpackUncompressed ( )
private

Unpack uncompressed data.

Definition at line 562 of file CmxEnergySubBlock.cxx.

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 }

◆ upstreamError()

bool LVL1BS::L1CaloSubBlock::upstreamError ( ) const
inlineinherited

Definition at line 298 of file L1CaloSubBlock.h.

299 {
300  return m_trailer & (0x1 << s_upstreamErrorBit);
301 }

◆ version() [1/2]

int LVL1BS::L1CaloSubBlock::version ( ) const
inlineinherited

Definition at line 243 of file L1CaloSubBlock.h.

244 {
245  return (m_header >> s_versionBit) & s_versionMask;
246 }

◆ version() [2/2]

int LVL1BS::L1CaloSubBlock::version ( uint32_t  word)
staticinherited

Return version number from given header word.

Definition at line 499 of file L1CaloSubBlock.cxx.

500 {
501  return (word >> s_versionBit) & s_versionMask;
502 }

◆ wordId() [1/2]

int LVL1BS::L1CaloSubBlock::wordId ( ) const
inlineinherited

Definition at line 238 of file L1CaloSubBlock.h.

239 {
240  return (m_header >> s_wordIdBit) & s_wordIdMask;
241 }

◆ wordId() [2/2]

int LVL1BS::L1CaloSubBlock::wordId ( uint32_t  word)
staticinherited

Return wordID field from given header word.

Definition at line 492 of file L1CaloSubBlock.cxx.

493 {
494  return (word >> s_wordIdBit) & s_wordIdMask;
495 }

◆ wordType()

L1CaloSubBlock::SubBlockWordType LVL1BS::L1CaloSubBlock::wordType ( uint32_t  word)
staticinherited

Word identification.

Definition at line 479 of file L1CaloSubBlock.cxx.

480 {
482  if (((word >> s_headerBit) & s_headerMask) == s_headerVal)
483  {
484  if (((word >> s_statusBit) & s_statusMask) == s_statusVal) type = STATUS;
485  else type = HEADER;
486  }
487  return type;
488 }

◆ write()

void LVL1BS::L1CaloSubBlock::write ( FullEventAssembler< L1CaloSrcIdMap >::RODDATA *  theROD) const
inherited

Output complete packed sub-block to ROD vector.

Definition at line 165 of file L1CaloSubBlock.cxx.

167 {
168  theROD->push_back(m_header);
169  std::vector<uint32_t>::const_iterator pos;
170  for (pos = m_data.begin(); pos != m_data.end(); ++pos)
171  {
172  theROD->push_back(*pos);
173  }
174  if (m_trailer) theROD->push_back(m_trailer);
175 }

Member Data Documentation

◆ m_bitword

uint32_t LVL1BS::L1CaloSubBlock::m_bitword
privateinherited

Definition at line 214 of file L1CaloSubBlock.h.

◆ m_bunchCrossing

int LVL1BS::L1CaloSubBlock::m_bunchCrossing
privateinherited

Bunch Crossing number (neutral format only)

Definition at line 210 of file L1CaloSubBlock.h.

◆ m_currentBit

int LVL1BS::L1CaloSubBlock::m_currentBit
privateinherited

Definition at line 215 of file L1CaloSubBlock.h.

◆ m_currentPinBit

std::vector<int> LVL1BS::L1CaloSubBlock::m_currentPinBit
privateinherited

Definition at line 222 of file L1CaloSubBlock.h.

◆ m_data

std::vector<uint32_t> LVL1BS::L1CaloSubBlock::m_data
privateinherited

Sub-Block data.

Definition at line 227 of file L1CaloSubBlock.h.

◆ m_dataPos

std::vector<uint32_t>::const_iterator LVL1BS::L1CaloSubBlock::m_dataPos
privateinherited

Definition at line 219 of file L1CaloSubBlock.h.

◆ m_dataPosEnd

std::vector<uint32_t>::const_iterator LVL1BS::L1CaloSubBlock::m_dataPosEnd
privateinherited

Definition at line 220 of file L1CaloSubBlock.h.

◆ m_dataWords

int LVL1BS::L1CaloSubBlock::m_dataWords
privateinherited

Current number of data words.

Definition at line 225 of file L1CaloSubBlock.h.

◆ m_header

uint32_t LVL1BS::L1CaloSubBlock::m_header
privateinherited

Sub-Block Header.

Definition at line 206 of file L1CaloSubBlock.h.

◆ m_maxBits

int LVL1BS::L1CaloSubBlock::m_maxBits
privateinherited

Definition at line 216 of file L1CaloSubBlock.h.

◆ m_maxMask

uint32_t LVL1BS::L1CaloSubBlock::m_maxMask
privateinherited

Definition at line 217 of file L1CaloSubBlock.h.

◆ m_oddParity

std::vector<int> LVL1BS::L1CaloSubBlock::m_oddParity
privateinherited

Definition at line 223 of file L1CaloSubBlock.h.

◆ m_sumsData

std::vector<uint32_t> LVL1BS::CmxEnergySubBlock::m_sumsData
private

Energy subsums data.

Definition at line 116 of file CmxEnergySubBlock.h.

◆ m_trailer

uint32_t LVL1BS::L1CaloSubBlock::m_trailer
privateinherited

Sub-Block Status Trailer.

Definition at line 208 of file L1CaloSubBlock.h.

◆ m_unpackerFlag

bool LVL1BS::L1CaloSubBlock::m_unpackerFlag
privateinherited

Definition at line 218 of file L1CaloSubBlock.h.

◆ m_unpackError

int LVL1BS::L1CaloSubBlock::m_unpackError
privateinherited

Unpacking error code.

Definition at line 212 of file L1CaloSubBlock.h.

◆ m_unpackingMasks

std::vector<uint32_t> LVL1BS::L1CaloSubBlock::m_unpackingMasks
privateinherited

Unpacking masks.

Definition at line 229 of file L1CaloSubBlock.h.

◆ s_bcnMismatchBit

const int LVL1BS::L1CaloSubBlock::s_bcnMismatchBit = 2
staticprivateinherited

Definition at line 192 of file L1CaloSubBlock.h.

◆ s_bunchCrossingBits

const int LVL1BS::CmxEnergySubBlock::s_bunchCrossingBits = 12
staticprivate

Definition at line 99 of file CmxEnergySubBlock.h.

◆ s_cmxFirmwareBit

const int LVL1BS::CmxSubBlock::s_cmxFirmwareBit = 1
staticprivateinherited

Definition at line 53 of file CmxSubBlock.h.

◆ s_cmxFirmwareMask

const uint32_t LVL1BS::CmxSubBlock::s_cmxFirmwareMask = 0x3
staticprivateinherited

Definition at line 56 of file CmxSubBlock.h.

◆ s_cmxPositionBit

const int LVL1BS::CmxSubBlock::s_cmxPositionBit = 0
staticprivateinherited

Definition at line 54 of file CmxSubBlock.h.

◆ s_cmxPositionMask

const uint32_t LVL1BS::CmxSubBlock::s_cmxPositionMask = 0x1
staticprivateinherited

Definition at line 57 of file CmxSubBlock.h.

◆ s_cmxSummingBit

const int LVL1BS::CmxSubBlock::s_cmxSummingBit = 3
staticprivateinherited

Definition at line 52 of file CmxSubBlock.h.

◆ s_cmxSummingMask

const uint32_t LVL1BS::CmxSubBlock::s_cmxSummingMask = 0x1
staticprivateinherited

Definition at line 55 of file CmxSubBlock.h.

◆ s_crateBit

const int LVL1BS::L1CaloSubBlock::s_crateBit = 12
staticprivateinherited

Definition at line 174 of file L1CaloSubBlock.h.

◆ s_crateMask

const uint32_t LVL1BS::L1CaloSubBlock::s_crateMask = 0xf
staticprivateinherited

Definition at line 182 of file L1CaloSubBlock.h.

◆ s_daqOverflowBit

const int LVL1BS::L1CaloSubBlock::s_daqOverflowBit = 3
staticprivateinherited

Definition at line 191 of file L1CaloSubBlock.h.

◆ s_energyJemMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_energyJemMask = 0x3fff
staticprivate

Definition at line 83 of file CmxEnergySubBlock.h.

◆ s_energySumMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_energySumMask = 0x7fff
staticprivate

Definition at line 84 of file CmxEnergySubBlock.h.

◆ s_energyTypeBit

const int LVL1BS::CmxEnergySubBlock::s_energyTypeBit = 24
staticprivate

Definition at line 77 of file CmxEnergySubBlock.h.

◆ s_energyTypeJemBit

const int LVL1BS::CmxEnergySubBlock::s_energyTypeJemBit = 23
staticprivate

Definition at line 75 of file CmxEnergySubBlock.h.

◆ s_energyTypeMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_energyTypeMask = 0x3
staticprivate

Definition at line 89 of file CmxEnergySubBlock.h.

◆ s_errorBit

const int LVL1BS::CmxEnergySubBlock::s_errorBit = 16
staticprivate

Definition at line 73 of file CmxEnergySubBlock.h.

◆ s_errorMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_errorMask = 0x1
staticprivate

Definition at line 85 of file CmxEnergySubBlock.h.

◆ s_etHitMapsBits

const int LVL1BS::CmxEnergySubBlock::s_etHitMapsBits = 8
staticprivate

Definition at line 100 of file CmxEnergySubBlock.h.

◆ s_etHitsBit

const int LVL1BS::CmxEnergySubBlock::s_etHitsBit = 16
staticprivate

Definition at line 74 of file CmxEnergySubBlock.h.

◆ s_etHitsMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_etHitsMask = 0xff
staticprivate

Definition at line 87 of file CmxEnergySubBlock.h.

◆ s_failingBcnBit

const int LVL1BS::L1CaloSubBlock::s_failingBcnBit = 22
staticprivateinherited

Definition at line 187 of file L1CaloSubBlock.h.

◆ s_failingBcnMask

const uint32_t LVL1BS::L1CaloSubBlock::s_failingBcnMask = 0x3f
staticprivateinherited

Definition at line 195 of file L1CaloSubBlock.h.

◆ s_formatBit

const int LVL1BS::L1CaloSubBlock::s_formatBit = 22
staticprivateinherited

Definition at line 172 of file L1CaloSubBlock.h.

◆ s_formatMask

const uint32_t LVL1BS::L1CaloSubBlock::s_formatMask = 0x7
staticprivateinherited

Definition at line 180 of file L1CaloSubBlock.h.

◆ s_glinkBitsPerSlice

const int LVL1BS::CmxSubBlock::s_glinkBitsPerSlice = 97
staticprivateinherited

Needed for neutral format.

Definition at line 59 of file CmxSubBlock.h.

◆ s_glinkDavSet

const uint32_t LVL1BS::L1CaloSubBlock::s_glinkDavSet = 0x400000
staticprivateinherited

Definition at line 203 of file L1CaloSubBlock.h.

◆ s_glinkDownBit

const int LVL1BS::L1CaloSubBlock::s_glinkDownBit = 6
staticprivateinherited

Definition at line 189 of file L1CaloSubBlock.h.

◆ s_glinkParityBit

const int LVL1BS::L1CaloSubBlock::s_glinkParityBit = 0
staticprivateinherited

Definition at line 194 of file L1CaloSubBlock.h.

◆ s_glinkProtocolBit

const int LVL1BS::L1CaloSubBlock::s_glinkProtocolBit = 1
staticprivateinherited

Definition at line 193 of file L1CaloSubBlock.h.

◆ s_glinkTimeoutBit

const int LVL1BS::L1CaloSubBlock::s_glinkTimeoutBit = 7
staticprivateinherited

Definition at line 188 of file L1CaloSubBlock.h.

◆ s_headerBit

const int LVL1BS::L1CaloSubBlock::s_headerBit = 30
staticprivateinherited

Definition at line 161 of file L1CaloSubBlock.h.

◆ s_headerMask

const uint32_t LVL1BS::L1CaloSubBlock::s_headerMask = 0x3
staticprivateinherited

Definition at line 163 of file L1CaloSubBlock.h.

◆ s_headerVal

const uint32_t LVL1BS::L1CaloSubBlock::s_headerVal = 0x3
staticprivateinherited

Definition at line 165 of file L1CaloSubBlock.h.

◆ s_jemBit

const int LVL1BS::CmxEnergySubBlock::s_jemBit = 25
staticprivate

Definition at line 76 of file CmxEnergySubBlock.h.

◆ s_jemMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_jemMask = 0xf
staticprivate

Definition at line 88 of file CmxEnergySubBlock.h.

◆ s_jemPaddingBits

const int LVL1BS::CmxEnergySubBlock::s_jemPaddingBits = 9
staticprivate

Definition at line 95 of file CmxEnergySubBlock.h.

◆ s_jemSumBits

const int LVL1BS::CmxEnergySubBlock::s_jemSumBits = 14
staticprivate

Definition at line 94 of file CmxEnergySubBlock.h.

◆ s_maxJems

const int LVL1BS::CmxEnergySubBlock::s_maxJems = 16
staticprivate

Definition at line 81 of file CmxEnergySubBlock.h.

◆ s_maxPins

const int LVL1BS::L1CaloSubBlock::s_maxPins = 20
staticprivateinherited

Definition at line 202 of file L1CaloSubBlock.h.

◆ s_maxStreamedBits

const int LVL1BS::L1CaloSubBlock::s_maxStreamedBits = 31
staticprivateinherited

Definition at line 198 of file L1CaloSubBlock.h.

◆ s_maxStreamedMask

const uint32_t LVL1BS::L1CaloSubBlock::s_maxStreamedMask = 0x7fffffff
staticprivateinherited

Definition at line 200 of file L1CaloSubBlock.h.

◆ s_maxSums

const int LVL1BS::CmxEnergySubBlock::s_maxSums = 66
staticprivate

Definition at line 82 of file CmxEnergySubBlock.h.

◆ s_maxWordBits

const int LVL1BS::L1CaloSubBlock::s_maxWordBits = 32
staticprivateinherited

Definition at line 197 of file L1CaloSubBlock.h.

◆ s_maxWordMask

const uint32_t LVL1BS::L1CaloSubBlock::s_maxWordMask = 0xffffffff
staticprivateinherited

Definition at line 199 of file L1CaloSubBlock.h.

◆ s_moduleBit

const int LVL1BS::L1CaloSubBlock::s_moduleBit = 8
staticprivateinherited

Definition at line 175 of file L1CaloSubBlock.h.

◆ s_moduleMask

const uint32_t LVL1BS::L1CaloSubBlock::s_moduleMask = 0xf
staticprivateinherited

Definition at line 183 of file L1CaloSubBlock.h.

◆ s_overflowBit

const int LVL1BS::CmxEnergySubBlock::s_overflowBit = 15
staticprivate

Definition at line 72 of file CmxEnergySubBlock.h.

◆ s_overflowMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_overflowMask = 0x1
staticprivate

Definition at line 86 of file CmxEnergySubBlock.h.

◆ s_paddingBits

const int LVL1BS::CmxEnergySubBlock::s_paddingBits = 43
staticprivate

Definition at line 101 of file CmxEnergySubBlock.h.

◆ s_ppmCrates

const int LVL1BS::L1CaloSubBlock::s_ppmCrates = 8
staticprivateinherited

Definition at line 168 of file L1CaloSubBlock.h.

◆ s_seqnoBit

const int LVL1BS::L1CaloSubBlock::s_seqnoBit = 16
staticprivateinherited

Definition at line 173 of file L1CaloSubBlock.h.

◆ s_seqnoMask

const uint32_t LVL1BS::L1CaloSubBlock::s_seqnoMask = 0x3f
staticprivateinherited

Definition at line 181 of file L1CaloSubBlock.h.

◆ s_slices1Bit

const int LVL1BS::L1CaloSubBlock::s_slices1Bit = 0
staticprivateinherited

Definition at line 177 of file L1CaloSubBlock.h.

◆ s_slices1Mask

const uint32_t LVL1BS::L1CaloSubBlock::s_slices1Mask = 0x7
staticprivateinherited

Definition at line 185 of file L1CaloSubBlock.h.

◆ s_slices2Bit

const int LVL1BS::L1CaloSubBlock::s_slices2Bit = 3
staticprivateinherited

Definition at line 176 of file L1CaloSubBlock.h.

◆ s_slices2Mask

const uint32_t LVL1BS::L1CaloSubBlock::s_slices2Mask = 0x1f
staticprivateinherited

Definition at line 184 of file L1CaloSubBlock.h.

◆ s_sourceBit

const int LVL1BS::CmxEnergySubBlock::s_sourceBit = 27
staticprivate

Definition at line 79 of file CmxEnergySubBlock.h.

◆ s_sourceMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_sourceMask = 0x3
staticprivate

Definition at line 91 of file CmxEnergySubBlock.h.

◆ s_statusBit

const int LVL1BS::L1CaloSubBlock::s_statusBit = 28
staticprivateinherited

Definition at line 162 of file L1CaloSubBlock.h.

◆ s_statusMask

const uint32_t LVL1BS::L1CaloSubBlock::s_statusMask = 0x1
staticprivateinherited

Definition at line 164 of file L1CaloSubBlock.h.

◆ s_statusVal

const uint32_t LVL1BS::L1CaloSubBlock::s_statusVal = 0x1
staticprivateinherited

Definition at line 166 of file L1CaloSubBlock.h.

◆ s_sumBitsEtCrate

const int LVL1BS::CmxEnergySubBlock::s_sumBitsEtCrate = 14
staticprivate

Definition at line 96 of file CmxEnergySubBlock.h.

◆ s_sumBitsEtSys

const int LVL1BS::CmxEnergySubBlock::s_sumBitsEtSys = 15
staticprivate

Definition at line 97 of file CmxEnergySubBlock.h.

◆ s_sumBitsExEy

const int LVL1BS::CmxEnergySubBlock::s_sumBitsExEy = 15
staticprivate

Definition at line 98 of file CmxEnergySubBlock.h.

◆ s_sumTypeBit

const int LVL1BS::CmxEnergySubBlock::s_sumTypeBit = 26
staticprivate

Definition at line 78 of file CmxEnergySubBlock.h.

◆ s_sumTypeMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_sumTypeMask = 0x1
staticprivate

Definition at line 90 of file CmxEnergySubBlock.h.

◆ s_upstreamErrorBit

const int LVL1BS::L1CaloSubBlock::s_upstreamErrorBit = 4
staticprivateinherited

Definition at line 190 of file L1CaloSubBlock.h.

◆ s_versionBit

const int LVL1BS::L1CaloSubBlock::s_versionBit = 25
staticprivateinherited

Definition at line 171 of file L1CaloSubBlock.h.

◆ s_versionMask

const uint32_t LVL1BS::L1CaloSubBlock::s_versionMask = 0x7
staticprivateinherited

Definition at line 179 of file L1CaloSubBlock.h.

◆ s_wordIdBit

const int LVL1BS::CmxEnergySubBlock::s_wordIdBit = 29
staticprivate

Definition at line 80 of file CmxEnergySubBlock.h.

◆ s_wordIdMask

const uint32_t LVL1BS::CmxEnergySubBlock::s_wordIdMask = 0x7
staticprivate

Definition at line 92 of file CmxEnergySubBlock.h.

◆ s_wordIdVal

const int LVL1BS::CmxSubBlock::s_wordIdVal = 0xe
staticprivateinherited

CMX header word ID.

Definition at line 50 of file CmxSubBlock.h.

◆ s_wordLength

const int LVL1BS::CmxEnergySubBlock::s_wordLength = 32
staticprivate

Data word length.

Definition at line 70 of file CmxEnergySubBlock.h.


The documentation for this class was generated from the following files:
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
LVL1BS::CmxSubBlock::CMX_ENERGY
@ CMX_ENERGY
Definition: CmxSubBlock.h:25
LVL1BS::L1CaloSubBlock::s_moduleBit
static const int s_moduleBit
Definition: L1CaloSubBlock.h:175
LVL1BS::L1CaloSubBlock::s_bcnMismatchBit
static const int s_bcnMismatchBit
Definition: L1CaloSubBlock.h:192
LVL1BS::CmxSubBlock::CMX_JET
@ CMX_JET
Definition: CmxSubBlock.h:25
LVL1BS::L1CaloSubBlock::s_daqOverflowBit
static const int s_daqOverflowBit
Definition: L1CaloSubBlock.h:191
LVL1BS::L1CaloSubBlock::ERROR_MISSING_HEADER
@ ERROR_MISSING_HEADER
Definition: L1CaloSubBlock.h:33
LVL1BS::L1CaloSubBlock::UNPACK_COMPRESSION_VERSION
@ UNPACK_COMPRESSION_VERSION
Definition: L1CaloSubBlock.h:39
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::s_wordIdMask
static const uint32_t s_wordIdMask
Definition: L1CaloSubBlock.h:178
LVL1BS::L1CaloSubBlock::packerNeutral
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.
Definition: L1CaloSubBlock.cxx:413
LVL1BS::L1CaloSubBlock::s_failingBcnBit
static const int s_failingBcnBit
Definition: L1CaloSubBlock.h:187
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
LVL1BS::L1CaloSubBlock::m_maxBits
int m_maxBits
Definition: L1CaloSubBlock.h:216
LVL1BS::CmxEnergySubBlock::s_sumBitsExEy
static const int s_sumBitsExEy
Definition: CmxEnergySubBlock.h:98
LVL1BS::L1CaloSubBlock::m_dataPosEnd
std::vector< uint32_t >::const_iterator m_dataPosEnd
Definition: L1CaloSubBlock.h:220
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::L1CaloSubBlock::s_formatBit
static const int s_formatBit
Definition: L1CaloSubBlock.h:172
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_ROB
@ ERROR_DUPLICATE_ROB
Definition: L1CaloSubBlock.h:31
LVL1BS::CmxEnergySubBlock::m_sumsData
std::vector< uint32_t > m_sumsData
Energy subsums data.
Definition: CmxEnergySubBlock.h:116
LVL1BS::L1CaloSubBlock::s_glinkParityBit
static const int s_glinkParityBit
Definition: L1CaloSubBlock.h:194
LVL1BS::CmxEnergySubBlock::ENERGY_ET
@ ENERGY_ET
Definition: CmxEnergySubBlock.h:27
LVL1BS::L1CaloSubBlock::SUPERCOMPRESSED
@ SUPERCOMPRESSED
Definition: L1CaloSubBlock.h:29
LVL1BS::L1CaloSubBlock::s_glinkDavSet
static const uint32_t s_glinkDavSet
Definition: L1CaloSubBlock.h:203
LVL1BS::L1CaloSubBlock::DATA
@ DATA
Definition: L1CaloSubBlock.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::L1CaloSubBlock::s_glinkDownBit
static const int s_glinkDownBit
Definition: L1CaloSubBlock.h:189
LVL1BS::CmxEnergySubBlock::CRATE_SYSTEM_ID
@ CRATE_SYSTEM_ID
Definition: CmxEnergySubBlock.h:26
LVL1BS::CmxSubBlock::CmxFirmwareCode
CmxFirmwareCode
Definition: CmxSubBlock.h:25
LVL1BS::CmxSubBlock::s_cmxPositionMask
static const uint32_t s_cmxPositionMask
Definition: CmxSubBlock.h:57
LVL1BS::L1CaloSubBlock::s_slices1Mask
static const uint32_t s_slices1Mask
Definition: L1CaloSubBlock.h:185
LVL1BS::CmxEnergySubBlock::MAX_SOURCE_TYPE
@ MAX_SOURCE_TYPE
Definition: CmxEnergySubBlock.h:29
LVL1BS::L1CaloSubBlock::s_failingBcnMask
static const uint32_t s_failingBcnMask
Definition: L1CaloSubBlock.h:195
LVL1BS::CmxSubBlock::CMX_UNKNOWN
@ CMX_UNKNOWN
Definition: CmxSubBlock.h:26
LVL1BS::L1CaloSubBlock::NEUTRAL
@ NEUTRAL
Definition: L1CaloSubBlock.h:28
LVL1BS::L1CaloSubBlock::setHeader
void setHeader(int wordId, int version, int format, int seqno, int crate, int module, int slices2, int slices1)
Store header data.
Definition: L1CaloSubBlock.cxx:99
LVL1BS::L1CaloSubBlock::UNPACK_SOURCE_ID
@ UNPACK_SOURCE_ID
Definition: L1CaloSubBlock.h:41
LVL1BS::L1CaloSubBlock::s_headerVal
static const uint32_t s_headerVal
Definition: L1CaloSubBlock.h:165
LVL1BS::L1CaloSubBlock::wordId
int wordId() const
Definition: L1CaloSubBlock.h:238
LVL1BS::CmxEnergySubBlock::s_jemSumBits
static const int s_jemSumBits
Definition: CmxEnergySubBlock.h:94
LVL1BS::L1CaloSubBlock::s_slices2Mask
static const uint32_t s_slices2Mask
Definition: L1CaloSubBlock.h:184
LVL1BS::L1CaloSubBlock::s_statusVal
static const uint32_t s_statusVal
Definition: L1CaloSubBlock.h:166
LVL1BS::CmxEnergySubBlock::SUM_ET
@ SUM_ET
Definition: CmxEnergySubBlock.h:28
LVL1BS::L1CaloSubBlock::slices2
int slices2() const
Definition: L1CaloSubBlock.h:273
LVL1BS::L1CaloSubBlock::slice
int slice() const
Definition: L1CaloSubBlock.h:258
LVL1BS::CmxSubBlock::LEFT
@ LEFT
Definition: CmxSubBlock.h:28
LVL1BS::L1CaloSubBlock::packerFlush
void packerFlush()
Flush the current data word padded with zeros.
Definition: L1CaloSubBlock.cxx:331
LVL1BS::L1CaloSubBlock::ERROR_ROD_NSTATUS
@ ERROR_ROD_NSTATUS
Definition: L1CaloSubBlock.h:32
LVL1BS::L1CaloSubBlock::bunchCrossing
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:333
LVL1BS::L1CaloSubBlock::upstreamError
bool upstreamError() const
Definition: L1CaloSubBlock.h:298
LVL1BS::CmxEnergySubBlock::s_sumBitsEtSys
static const int s_sumBitsEtSys
Definition: CmxEnergySubBlock.h:97
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1BS::L1CaloSubBlock::HEADER
@ HEADER
Definition: L1CaloSubBlock.h:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
LVL1BS::L1CaloSubBlock::crate
int crate() const
Definition: L1CaloSubBlock.h:263
LVL1BS::CmxEnergySubBlock::s_sumBitsEtCrate
static const int s_sumBitsEtCrate
Definition: CmxEnergySubBlock.h:96
LVL1BS::CmxSubBlock::s_glinkBitsPerSlice
static const int s_glinkBitsPerSlice
Needed for neutral format.
Definition: CmxSubBlock.h:59
LVL1BS::CmxSubBlock::s_cmxSummingMask
static const uint32_t s_cmxSummingMask
Definition: CmxSubBlock.h:55
LVL1BS::CmxSubBlock::timeslices
int timeslices() const
Definition: CmxSubBlock.cxx:48
LVL1BS::CmxSubBlock::RIGHT
@ RIGHT
Definition: CmxSubBlock.h:28
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::L1CaloSubBlock::s_seqnoMask
static const uint32_t s_seqnoMask
Definition: L1CaloSubBlock.h:181
LVL1BS::L1CaloSubBlock::s_moduleMask
static const uint32_t s_moduleMask
Definition: L1CaloSubBlock.h:183
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
LVL1BS::L1CaloSubBlock::s_upstreamErrorBit
static const int s_upstreamErrorBit
Definition: L1CaloSubBlock.h:190
LVL1BS::CmxSubBlock::s_wordIdVal
static const int s_wordIdVal
CMX header word ID.
Definition: CmxSubBlock.h:50
LVL1BS::L1CaloSubBlock::packer
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
Definition: L1CaloSubBlock.cxx:302
LVL1BS::L1CaloSubBlock::failingBCN
uint32_t failingBCN() const
Definition: L1CaloSubBlock.h:283
LVL1BS::L1CaloSubBlock::m_data
std::vector< uint32_t > m_data
Sub-Block data.
Definition: L1CaloSubBlock.h:227
LVL1BS::L1CaloSubBlock::UNPACK_COMPRESSION_SLICES
@ UNPACK_COMPRESSION_SLICES
Definition: L1CaloSubBlock.h:40
LVL1BS::L1CaloSubBlock::ERROR_ROD_ID
@ ERROR_ROD_ID
Definition: L1CaloSubBlock.h:31
LVL1BS::L1CaloSubBlock::m_currentBit
int m_currentBit
Definition: L1CaloSubBlock.h:215
LVL1BS::L1CaloSubBlock::ERROR_CRATE_NUMBER
@ ERROR_CRATE_NUMBER
Definition: L1CaloSubBlock.h:34
LVL1BS::L1CaloSubBlock::glinkTimeout
bool glinkTimeout() const
Definition: L1CaloSubBlock.h:288
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
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1BS::L1CaloSubBlock::s_statusBit
static const int s_statusBit
Definition: L1CaloSubBlock.h:162
LVL1BS::L1CaloSubBlock::s_ppmCrates
static const int s_ppmCrates
Definition: L1CaloSubBlock.h:168
LVL1BS::L1CaloSubBlock::setDaqOverflow
void setDaqOverflow(int bit=1)
Set DAQ FIFO Overflow bit in Sub-status word.
Definition: L1CaloSubBlock.cxx:206
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_DATA
@ ERROR_DUPLICATE_DATA
Definition: L1CaloSubBlock.h:35
LVL1BS::L1CaloSubBlock::m_currentPinBit
std::vector< int > m_currentPinBit
Definition: L1CaloSubBlock.h:222
LVL1BS::L1CaloSubBlock::UNPACK_EXCESS_TOBS
@ UNPACK_EXCESS_TOBS
Definition: L1CaloSubBlock.h:42
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::L1CaloSubBlock::m_unpackError
int m_unpackError
Unpacking error code.
Definition: L1CaloSubBlock.h:212
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::CmxSubBlock::SYSTEM
@ SYSTEM
Definition: CmxSubBlock.h:27
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::m_bunchCrossing
int m_bunchCrossing
Bunch Crossing number (neutral format only)
Definition: L1CaloSubBlock.h:210
LVL1BS::L1CaloSubBlock::unpacker
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
Definition: L1CaloSubBlock.cxx:345
LVL1BS::L1CaloSubBlock::s_maxStreamedMask
static const uint32_t s_maxStreamedMask
Definition: L1CaloSubBlock.h:200
LVL1BS::L1CaloSubBlock::daqOverflow
bool daqOverflow() const
Definition: L1CaloSubBlock.h:303
LVL1BS::L1CaloSubBlock::UNPACK_VERSION
@ UNPACK_VERSION
Definition: L1CaloSubBlock.h:38
LVL1BS::L1CaloSubBlock::ERROR_NONE
@ ERROR_NONE
Definition: L1CaloSubBlock.h:31
LVL1BS::CmxEnergySubBlock::s_wordLength
static const int s_wordLength
Data word length.
Definition: CmxEnergySubBlock.h:70
LVL1BS::L1CaloSubBlock::glinkProtocol
bool glinkProtocol() const
Definition: L1CaloSubBlock.h:313
LVL1BS::CmxEnergySubBlock::MODULE_ID
@ MODULE_ID
Definition: CmxEnergySubBlock.h:26
LVL1BS::L1CaloSubBlock::wordType
static SubBlockWordType wordType(uint32_t word)
Word identification.
Definition: L1CaloSubBlock.cxx:479
LVL1BS::CmxSubBlock::s_cmxSummingBit
static const int s_cmxSummingBit
Definition: CmxSubBlock.h:52
LVL1BS::L1CaloSubBlock::m_bitword
uint32_t m_bitword
Definition: L1CaloSubBlock.h:214
LVL1BS::L1CaloSubBlock::COMPRESSED
@ COMPRESSED
Definition: L1CaloSubBlock.h:28
LVL1BS::CmxEnergySubBlock::s_sumTypeMask
static const uint32_t s_sumTypeMask
Definition: CmxEnergySubBlock.h:90
LVL1BS::L1CaloSubBlock::m_oddParity
std::vector< int > m_oddParity
Definition: L1CaloSubBlock.h:223
LVL1BS::L1CaloSubBlock::s_glinkProtocolBit
static const int s_glinkProtocolBit
Definition: L1CaloSubBlock.h:193
LVL1BS::CmxSubBlock::s_cmxPositionBit
static const int s_cmxPositionBit
Definition: CmxSubBlock.h:54
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
pmontree.code
code
Definition: pmontree.py:443
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
LVL1BS::L1CaloSubBlock::unpackerSuccess
bool unpackerSuccess() const
Return unpacker success flag.
Definition: L1CaloSubBlock.h:354
LVL1BS::L1CaloSubBlock::s_versionMask
static const uint32_t s_versionMask
Definition: L1CaloSubBlock.h:179
LVL1BS::CmxEnergySubBlock::s_maxJems
static const int s_maxJems
Definition: CmxEnergySubBlock.h:81
LVL1BS::L1CaloSubBlock::s_slices1Bit
static const int s_slices1Bit
Definition: L1CaloSubBlock.h:177
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
LVL1BS::L1CaloSubBlock::slices1
int slices1() const
Definition: L1CaloSubBlock.h:278
LVL1BS::CmxEnergySubBlock::s_jemBit
static const int s_jemBit
Definition: CmxEnergySubBlock.h:76
LVL1BS::CmxEnergySubBlock::REMOTE
@ REMOTE
Definition: CmxEnergySubBlock.h:29
LVL1BS::L1CaloSubBlock::dataWords
int dataWords() const
Return number of data words.
Definition: L1CaloSubBlock.h:233
LVL1BS::L1CaloSubBlock::s_formatMask
static const uint32_t s_formatMask
Definition: L1CaloSubBlock.h:180
LVL1BS::L1CaloSubBlock::ERROR_MAX
@ ERROR_MAX
Definition: L1CaloSubBlock.h:36
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::CmxSubBlock::s_cmxFirmwareMask
static const uint32_t s_cmxFirmwareMask
Definition: CmxSubBlock.h:56
LVL1BS::L1CaloSubBlock::m_trailer
uint32_t m_trailer
Sub-Block Status Trailer.
Definition: L1CaloSubBlock.h:208
LVL1BS::CmxEnergySubBlock::ENERGY_EX
@ ENERGY_EX
Definition: CmxEnergySubBlock.h:27
LVL1BS::L1CaloSubBlock::s_seqnoBit
static const int s_seqnoBit
Definition: L1CaloSubBlock.h:173
LVL1BS::L1CaloSubBlock::m_dataPos
std::vector< uint32_t >::const_iterator m_dataPos
Definition: L1CaloSubBlock.h:219
LVL1BS::L1CaloSubBlock::s_headerBit
static const int s_headerBit
Definition: L1CaloSubBlock.h:161
LVL1BS::L1CaloSubBlock::m_header
uint32_t m_header
Sub-Block Header.
Definition: L1CaloSubBlock.h:206
LVL1BS::L1CaloSubBlock::s_maxPins
static const int s_maxPins
Definition: L1CaloSubBlock.h:202
python.PyKernel.init
def init(v_theApp, v_rootStream=None)
Definition: PyKernel.py:45
LVL1BS::CmxEnergySubBlock::s_wordIdMask
static const uint32_t s_wordIdMask
Definition: CmxEnergySubBlock.h:92
LVL1BS::CmxSubBlock::CMX_CP
@ CMX_CP
Definition: CmxSubBlock.h:25
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::L1CaloSubBlock::UNPACK_EXCESS_DATA
@ UNPACK_EXCESS_DATA
Definition: L1CaloSubBlock.h:41
LVL1BS::L1CaloSubBlock::s_statusMask
static const uint32_t s_statusMask
Definition: L1CaloSubBlock.h:164
LVL1BS::L1CaloSubBlock::module
int module() const
Definition: L1CaloSubBlock.h:268
LVL1BS::CmxSubBlock::s_cmxFirmwareBit
static const int s_cmxFirmwareBit
Definition: CmxSubBlock.h:53
LVL1BS::L1CaloSubBlock::ERROR_MISSING_SUBBLOCK
@ ERROR_MISSING_SUBBLOCK
Definition: L1CaloSubBlock.h:33
LVL1BS::L1CaloSubBlock::m_unpackerFlag
bool m_unpackerFlag
Definition: L1CaloSubBlock.h:218
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::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
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1BS::L1CaloSubBlock::ERROR_SLICES
@ ERROR_SLICES
Definition: L1CaloSubBlock.h:35
LVL1BS::L1CaloSubBlock::glinkDown
bool glinkDown() const
Definition: L1CaloSubBlock.h:293
LVL1BS::L1CaloSubBlock::SubBlockWordType
SubBlockWordType
Definition: L1CaloSubBlock.h:27
LVL1BS::L1CaloSubBlock::s_maxStreamedBits
static const int s_maxStreamedBits
Definition: L1CaloSubBlock.h:198
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::s_headerMask
static const uint32_t s_headerMask
Definition: L1CaloSubBlock.h:163
LVL1BS::CmxEnergySubBlock::MAX_SUM_TYPE
@ MAX_SUM_TYPE
Definition: CmxEnergySubBlock.h:30
LVL1BS::L1CaloSubBlock::ERROR_MODULE_NUMBER
@ ERROR_MODULE_NUMBER
Definition: L1CaloSubBlock.h:34
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
LVL1BS::L1CaloSubBlock::m_unpackingMasks
std::vector< uint32_t > m_unpackingMasks
Unpacking masks.
Definition: L1CaloSubBlock.h:229
LVL1BS::L1CaloSubBlock::parityBit
int parityBit(int init, uint32_t datum, int nbits) const
Return the parity bit for given data.
Definition: L1CaloSubBlock.cxx:291
LVL1BS::L1CaloSubBlock::s_wordIdBit
static const int s_wordIdBit
Definition: L1CaloSubBlock.h:170
LVL1BS::L1CaloSubBlock::ERROR_ROI_TYPE
@ ERROR_ROI_TYPE
Definition: L1CaloSubBlock.h:36
LVL1BS::L1CaloSubBlock::s_crateBit
static const int s_crateBit
Definition: L1CaloSubBlock.h:174
rr
const boost::regex rr(r_r)
LVL1BS::CmxSubBlock::CRATE
@ CRATE
Definition: CmxSubBlock.h:27
LVL1BS::L1CaloSubBlock::STATUS
@ STATUS
Definition: L1CaloSubBlock.h:27
LVL1BS::L1CaloSubBlock::m_maxMask
uint32_t m_maxMask
Definition: L1CaloSubBlock.h:217
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::L1CaloSubBlock::seqno
int seqno() const
Definition: L1CaloSubBlock.h:253
LVL1BS::L1CaloSubBlock::s_slices2Bit
static const int s_slices2Bit
Definition: L1CaloSubBlock.h:176
LVL1BS::L1CaloSubBlock::UNPACK_DATA_ID
@ UNPACK_DATA_ID
Definition: L1CaloSubBlock.h:42
LVL1BS::CmxEnergySubBlock::MAX_HITS_TYPE
@ MAX_HITS_TYPE
Definition: CmxEnergySubBlock.h:28
LVL1BS::L1CaloSubBlock::s_crateMask
static const uint32_t s_crateMask
Definition: L1CaloSubBlock.h:182
error
Definition: IImpactPoint3dEstimator.h:70
LVL1BS::L1CaloSubBlock::glinkParity
bool glinkParity() const
Definition: L1CaloSubBlock.h:318
LVL1BS::L1CaloSubBlock::UNPACK_NONE
@ UNPACK_NONE
Definition: L1CaloSubBlock.h:38
LVL1BS::CmxEnergySubBlock::LOCAL
@ LOCAL
Definition: CmxEnergySubBlock.h:29
LVL1BS::L1CaloSubBlock::m_dataWords
int m_dataWords
Current number of data words.
Definition: L1CaloSubBlock.h:225
LVL1BS::L1CaloSubBlock::setStatus
void setStatus(uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity)
Store error status trailer.
Definition: L1CaloSubBlock.cxx:179
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
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
LVL1BS::L1CaloSubBlock::ERROR_USER_HEADER
@ ERROR_USER_HEADER
Definition: L1CaloSubBlock.h:32
LVL1BS::CmxEnergySubBlock::s_paddingBits
static const int s_paddingBits
Definition: CmxEnergySubBlock.h:101
LVL1BS::L1CaloSubBlock::s_versionBit
static const int s_versionBit
Definition: L1CaloSubBlock.h:171
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
LVL1BS::CmxEnergySubBlock::packUncompressed
bool packUncompressed()
Pack uncompressed data.
Definition: CmxEnergySubBlock.cxx:421
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:350
LVL1BS::L1CaloSubBlock::UNCOMPRESSED
@ UNCOMPRESSED
Definition: L1CaloSubBlock.h:28
LVL1BS::L1CaloSubBlock::bcnMismatch
bool bcnMismatch() const
Definition: L1CaloSubBlock.h:308
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
LVL1BS::CmxEnergySubBlock::TOTAL
@ TOTAL
Definition: CmxEnergySubBlock.h:29
LVL1BS::L1CaloSubBlock::s_glinkTimeoutBit
static const int s_glinkTimeoutBit
Definition: L1CaloSubBlock.h:188