ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1BS::CmxJetSubBlock Class Reference

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

#include <CmxJetSubBlock.h>

Inheritance diagram for LVL1BS::CmxJetSubBlock:
Collaboration diagram for LVL1BS::CmxJetSubBlock:

Public Types

enum  SourceId {
  REMOTE_MAIN = 0 , LOCAL_MAIN = 1 , TOTAL_MAIN = 2 , REMOTE_FORWARD = 4 ,
  LOCAL_FORWARD = 5 , TOTAL_FORWARD = 6 , TOPO_CHECKSUM = 8 , TOPO_OCCUPANCY_MAP = 9 ,
  TOPO_OCCUPANCY_COUNTS = 10 , MAX_SOURCE_ID = 11
}
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

 CmxJetSubBlock ()
 ~CmxJetSubBlock ()
void clear ()
 Clear all data.
unsigned int presenceMap (int slice, int jem) const
 Return presence map for given JEM.
int frame (int slice, int jem, int tob) const
 Return frame for given jem and tob.
int localCoord (int slice, int jem, int tob) const
 Return Local coordinate for given jem and tob.
int energyLarge (int slice, int jem, int tob) const
 Return energy large window size for given jem and tob.
int energySmall (int slice, int jem, int tob) const
 Return energy small window size for given jem and tob.
int tobError (int slice, int jem, int tob) const
 Return error bit for given jem and tob.
int parityBits (int slice, int jem) const
 Return parity bits for given JEM.
unsigned int hits (int slice, int source, int flag) const
 Return hit/topo counts for given source ID and HL flag.
int hitsError (int slice, int source, int flag) const
 Return hit error for given source ID and HL flag.
void setPresenceMap (int slice, int jem, unsigned int map)
 Store presence map.
void setTob (int slice, int jem, int frame, int loc, int energyLarge, int energySmall, int error)
 Store TOB (RoI) data for given JEM, frame, local coord.
void setParityBits (int slice, int jem, int parity)
 Store parity bits for neutral format.
void setHits (int slice, int source, int flag, unsigned int hits, int error)
 Store hit counts for given source ID and HL flag.
bool pack ()
 Pack data.
bool unpack ()
 Unpack data.
void setCmxHeader (int version, int format, int slice, int crate, int summing, int firmware, int position, int timeslices)
 Store CMX header.
int cmxSumming () const
int cmxFirmware () const
int cmxPosition () const
int timeslices () const
int dataWords () const
 Return number of data words.
void setHeader (int wordId, int version, int format, int seqno, int crate, int module, int slices2, int slices1)
 Store header data.
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.
void setBunchCrossing (int bc)
 Set the Bunch Crossing number (neutral format only)
int bunchCrossing () const
 Return the Bunch Crossing number (neutral format only)
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.
void write (FullEventAssembler< L1CaloSrcIdMap >::RODDATA *theROD) const
 Output complete packed sub-block to ROD vector.
void setStatus (uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity)
 Store error status trailer.
void setDaqOverflow (int bit=1)
 Set DAQ FIFO Overflow bit in Sub-status word.
void setGlinkParity (int bit=1)
 Set G-Link Parity bit in Sub-status word.
void setUnpackErrorCode (int code)
 Set the unpacking error code.
int unpackErrorCode () const
 Return the unpacking error code.
std::string unpackErrorMsg () const
 Return the unpacking error message for printing.
int minBits (uint32_t datum) const
 Return the minimum number of bits needed for given data.
int parityBit (int init, uint32_t datum, int nbits) const
 Return the parity bit for given data.
void packer (uint32_t datum, int nbits)
 Pack given data into given number of bits.
void packerFlush ()
 Flush the current data word padded with zeros.
void setStreamed ()
 Set continuous bit streaming for compressed formats.
uint32_t unpacker (int nbits)
 Unpack given number of bits of data.
uint32_t unpacker (int nbits, int align)
void unpackerInit ()
 Initialise unpacker.
bool unpackerSuccess () const
 Return unpacker success flag.
void packerNeutral (int pin, uint32_t datum, int nbits)
 Pack given neutral data from given pin.
void packerNeutralParity (int pin)
 Pack current G-Link parity bit for given pin.
uint32_t unpackerNeutral (int pin, int nbits)
 Unpack given number of bits of neutral data for given pin.
bool unpackerNeutralParityError (int pin)
 Unpack and test G-Link parity bit for given pin.
int currentPinBit (int pin) const
 Return current pin bit for given pin.

Static Public Member Functions

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

Private Member Functions

int dataWordId (uint32_t word) const
int sourceId (uint32_t word) const
int jem (uint32_t word) const
int hlFlag (uint32_t word) const
unsigned int mapIndex (int slice, int jem) const
unsigned int parIndex (int slice, int jem) const
unsigned int tobIndex (int slice, int jem, int tob) const
unsigned int hitIndex (int slice, int source, int flag) const
void resize ()
bool packNeutral ()
 Pack neutral data.
bool packUncompressed ()
 Pack uncompressed data.
bool unpackNeutral ()
 Unpack neutral data.
bool unpackUncompressed ()
 Unpack uncompressed data.

Private Attributes

std::vector< uint32_t > m_tobData
 TOB data.
std::vector< uint32_t > m_hitsData
 Hits and topo data.
std::vector< unsigned int > m_presenceMaps
 Presence maps.
std::vector< int > m_parityBits
 Parity data for neutral format.
std::vector< int > m_jemTobCount
 JEM TOB count vector for unpacking.
uint32_t m_header
 Sub-Block Header.
uint32_t m_trailer
 Sub-Block Status Trailer.
int m_bunchCrossing
 Bunch Crossing number (neutral format only)
int m_unpackError
 Unpacking error code.
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.
std::vector< uint32_t > m_data
 Sub-Block data.
std::vector< uint32_t > m_unpackingMasks
 Unpacking masks.

Static Private Attributes

static const int s_wordLength = 32
 Data word length.
static const int s_tobEnergyLgBit = 0
static const int s_tobEnergySmBit = 10
static const int s_tobErrorBit = 19
static const int s_tobCoordBit = 20
static const int s_tobFrameBit = 22
static const int s_tobJemBit = 25
static const int s_tobWordId = 0
static const uint32_t s_tobEnergyLgMask = 0x3ff
static const uint32_t s_tobEnergySmMask = 0x1ff
static const uint32_t s_tobErrorMask = 0x1
static const uint32_t s_tobCoordMask = 0x3
static const uint32_t s_tobFrameMask = 0x7
static const uint32_t s_tobJemMask = 0xf
static const int s_threshBit = 0
static const int s_threshErrorBit = 16
static const int s_threshHlFlagBit = 19
static const int s_topoHlFlagBit = 24
static const int s_hlFlagBit = 19
static const int s_sourceIdBit = 25
static const int s_dataWordIdBit = 29
static const int s_threshWordId = 1
static const uint32_t s_threshMainMask = 0x7fff
static const uint32_t s_threshFwdLMask = 0xffff
static const uint32_t s_threshFwdHMask = 0x3fff
static const uint32_t s_errorMask = 0x7
static const uint32_t s_topoCheckMask = 0xffff
static const uint32_t s_topoMapMask = 0xffff
static const uint32_t s_topoCountsMask = 0xffffff
static const uint32_t s_hlFlagMask = 0x1
static const uint32_t s_sourceIdMask = 0xf
static const uint32_t s_dataWordIdMask = 0x7
static const int s_presenceBits = 8
static const int s_coordBits = 2
static const int s_energyLgBits = 10
static const int s_energySmBits [8] = {3, 6, 5, 4, 7, 2, 9, 0}
static const int s_threshMainBits = 15
static const int s_threshFwdLBits = 16
static const int s_threshFwdHBits = 14
static const int s_parityErrorBits = 1
static const int s_roiOverflowBits = 1
static const int s_paddingBits = 31
static const int s_bunchCrossingBits = 12
static const int s_fifoOverflowBits = 1
static const int s_topoChecksumBits = 16
static const int s_topoMapBits = 16
static const int s_topoCountsBits = 24
static const int s_topoPaddingBits = 3
static const int s_glinkPins = 20
static const int s_modules = 16
static const int s_tobsPerModule = 4
static const int s_muxPhases = 4
static const int s_wordIdVal = 0xe
 CMX header word ID.
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.
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_wordIdBit = 28
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_wordIdMask = 0xf
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-Jet 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 CmxJetSubBlock.h.

Member Enumeration Documentation

◆ CmxFirmwareCode

Enumerator
CMX_CP 
CMX_JET 
CMX_ENERGY 
CMX_UNKNOWN 

Definition at line 25 of file CmxSubBlock.h.

◆ CmxPositions

Enumerator
LEFT 
RIGHT 

Definition at line 28 of file CmxSubBlock.h.

◆ CmxSummingCode

Enumerator
CRATE 
SYSTEM 

Definition at line 27 of file CmxSubBlock.h.

◆ 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.

◆ SourceId

Enumerator
REMOTE_MAIN 
LOCAL_MAIN 
TOTAL_MAIN 
REMOTE_FORWARD 
LOCAL_FORWARD 
TOTAL_FORWARD 
TOPO_CHECKSUM 
TOPO_OCCUPANCY_MAP 
TOPO_OCCUPANCY_COUNTS 
MAX_SOURCE_ID 

Definition at line 26 of file CmxJetSubBlock.h.

◆ SubBlockWordType

Enumerator
HEADER 
DATA 
STATUS 

Definition at line 27 of file L1CaloSubBlock.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.

Constructor & Destructor Documentation

◆ CmxJetSubBlock()

LVL1BS::CmxJetSubBlock::CmxJetSubBlock ( )

Definition at line 68 of file CmxJetSubBlock.cxx.

69{
70}

◆ ~CmxJetSubBlock()

LVL1BS::CmxJetSubBlock::~CmxJetSubBlock ( )

Definition at line 72 of file CmxJetSubBlock.cxx.

73{
74}

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}
uint32_t m_trailer
Sub-Block Status Trailer.
static const int s_bcnMismatchBit

◆ 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}
int m_bunchCrossing
Bunch Crossing number (neutral format only)

◆ clear()

void LVL1BS::CmxJetSubBlock::clear ( )

Clear all data.

Definition at line 78 of file CmxJetSubBlock.cxx.

79{
81 m_tobData.clear();
82 m_hitsData.clear();
83 m_presenceMaps.clear();
84 m_parityBits.clear();
85}
std::vector< unsigned int > m_presenceMaps
Presence maps.
std::vector< uint32_t > m_tobData
TOB data.
std::vector< int > m_parityBits
Parity data for neutral format.
std::vector< uint32_t > m_hitsData
Hits and topo data.
void clear()
Clear all data.

◆ 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}
static const int s_wordIdVal
CMX header word ID.
Definition CmxSubBlock.h:50

◆ cmxFirmware()

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

Definition at line 68 of file CmxSubBlock.h.

69{
71}
static const int s_cmxFirmwareBit
Definition CmxSubBlock.h:53
static const uint32_t s_cmxFirmwareMask
Definition CmxSubBlock.h:56

◆ cmxPosition()

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

Definition at line 73 of file CmxSubBlock.h.

74{
76}
static const int s_cmxPositionBit
Definition CmxSubBlock.h:54
static const uint32_t s_cmxPositionMask
Definition CmxSubBlock.h:57

◆ cmxSumming()

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

Definition at line 63 of file CmxSubBlock.h.

64{
66}
static const uint32_t s_cmxSummingMask
Definition CmxSubBlock.h:55
static const int s_cmxSummingBit
Definition CmxSubBlock.h:52

◆ 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:
74 break;
75 default:
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}
static const uint32_t s_crateMask
static const int s_crateBit
uint32_t m_header
Sub-Block Header.

◆ 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}
std::vector< int > m_currentPinBit

◆ daqOverflow()

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

Definition at line 303 of file L1CaloSubBlock.h.

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

◆ dataWordId()

int LVL1BS::CmxJetSubBlock::dataWordId ( uint32_t word) const
inlineprivate

Definition at line 163 of file CmxJetSubBlock.h.

164{
165 return (word >> s_dataWordIdBit) & s_dataWordIdMask;
166}
static const uint32_t s_dataWordIdMask
static const int s_dataWordIdBit

◆ 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}
int m_dataWords
Current number of data words.

◆ energyLarge()

int LVL1BS::CmxJetSubBlock::energyLarge ( int slice,
int jem,
int tob ) const

Return energy large window size for given jem and tob.

Definition at line 124 of file CmxJetSubBlock.cxx.

125{
126 int et = 0;
127 const unsigned int ix = tobIndex(slice, jem, tob);
128 if (ix < m_tobData.size()) {
130 }
131 return et;
132}
float et(const xAOD::jFexSRJetRoI *j)
static const uint32_t s_tobEnergyLgMask
int jem(uint32_t word) const
static const int s_tobEnergyLgBit
unsigned int tobIndex(int slice, int jem, int tob) const

◆ energySmall()

int LVL1BS::CmxJetSubBlock::energySmall ( int slice,
int jem,
int tob ) const

Return energy small window size for given jem and tob.

Definition at line 136 of file CmxJetSubBlock.cxx.

137{
138 int et = 0;
139 const unsigned int ix = tobIndex(slice, jem, tob);
140 if (ix < m_tobData.size()) {
142 }
143 return et;
144}
static const int s_tobEnergySmBit
static const uint32_t s_tobEnergySmMask

◆ failingBCN()

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

Definition at line 283 of file L1CaloSubBlock.h.

284{
286}
static const uint32_t s_failingBcnMask
static const int s_failingBcnBit

◆ 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}
static const int s_formatBit
static const uint32_t s_formatMask

◆ 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}

◆ frame()

int LVL1BS::CmxJetSubBlock::frame ( int slice,
int jem,
int tob ) const

Return frame for given jem and tob.

Definition at line 100 of file CmxJetSubBlock.cxx.

101{
102 int fr = 0;
103 const unsigned int ix = tobIndex(slice, jem, tob);
104 if (ix < m_tobData.size()) {
106 }
107 return fr;
108}
static const int s_tobFrameBit
static const uint32_t s_tobFrameMask

◆ glinkDown()

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

Definition at line 293 of file L1CaloSubBlock.h.

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

◆ glinkParity()

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

Definition at line 318 of file L1CaloSubBlock.h.

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

◆ glinkProtocol()

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

Definition at line 313 of file L1CaloSubBlock.h.

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

◆ glinkTimeout()

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

Definition at line 288 of file L1CaloSubBlock.h.

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

◆ hitIndex()

unsigned int LVL1BS::CmxJetSubBlock::hitIndex ( int slice,
int source,
int flag ) const
private

Definition at line 374 of file CmxJetSubBlock.cxx.

376{
377 unsigned int ix = (source << 1) | flag;
378 if (format() == NEUTRAL) ix += slice * 2 * MAX_SOURCE_ID;
379 return ix;
380}

◆ hits()

unsigned int LVL1BS::CmxJetSubBlock::hits ( int slice,
int source,
int flag ) const

Return hit/topo counts for given source ID and HL flag.

Definition at line 170 of file CmxJetSubBlock.cxx.

172{
173 unsigned int hits = 0;
174 const unsigned int ix = hitIndex(slice, source, flag);
175 if (ix < m_hitsData.size()) {
177 if (source == REMOTE_FORWARD || source == LOCAL_FORWARD
178 || source == TOTAL_FORWARD) {
180 }
181 else if (source == TOPO_CHECKSUM) mask = s_topoCheckMask;
182 else if (source == TOPO_OCCUPANCY_MAP) mask = s_topoMapMask;
183 else if (source == TOPO_OCCUPANCY_COUNTS) mask = s_topoCountsMask;
184 hits = (m_hitsData[ix] >> s_threshBit) & mask;
185 }
186 return hits;
187}
static const int s_threshBit
static const uint32_t s_topoCheckMask
unsigned int hits(int slice, int source, int flag) const
Return hit/topo counts for given source ID and HL flag.
static const uint32_t s_threshMainMask
unsigned int hitIndex(int slice, int source, int flag) const
static const uint32_t s_threshFwdLMask
static const uint32_t s_topoMapMask
static const uint32_t s_threshFwdHMask
static const uint32_t s_topoCountsMask
bool flag
Definition master.py:29
setEventNumber uint32_t

◆ hitsError()

int LVL1BS::CmxJetSubBlock::hitsError ( int slice,
int source,
int flag ) const

Return hit error for given source ID and HL flag.

Definition at line 191 of file CmxJetSubBlock.cxx.

193{
194 int error = 0;
195 if (source == REMOTE_MAIN || source == LOCAL_MAIN || source == TOTAL_MAIN ||
196 source == REMOTE_FORWARD || source == LOCAL_FORWARD ||
197 source == TOTAL_FORWARD) {
198 const unsigned int ix = hitIndex(slice, source, flag);
199 if (ix < m_hitsData.size()) {
201 }
202 }
203 return error;
204}
static const uint32_t s_errorMask
static const int s_threshErrorBit

◆ hlFlag()

int LVL1BS::CmxJetSubBlock::hlFlag ( uint32_t word) const
inlineprivate

Definition at line 178 of file CmxJetSubBlock.h.

179{
181 return (word >> shift) & s_hlFlagMask;
182}
static const int s_sourceIdBit
static const int s_threshHlFlagBit
static const int s_topoHlFlagBit
static const uint32_t s_sourceIdMask
static const uint32_t s_hlFlagMask

◆ jem()

int LVL1BS::CmxJetSubBlock::jem ( uint32_t word) const
inlineprivate

Definition at line 173 of file CmxJetSubBlock.h.

174{
175 return (word >> s_tobJemBit) & s_tobJemMask;
176}
static const uint32_t s_tobJemMask
static const int s_tobJemBit

◆ localCoord()

int LVL1BS::CmxJetSubBlock::localCoord ( int slice,
int jem,
int tob ) const

Return Local coordinate for given jem and tob.

Definition at line 112 of file CmxJetSubBlock.cxx.

113{
114 int coord = 0;
115 const unsigned int ix = tobIndex(slice, jem, tob);
116 if (ix < m_tobData.size()) {
118 }
119 return coord;
120}
double coord
Type of coordination system.
static const uint32_t s_tobCoordMask
static const int s_tobCoordBit

◆ mapIndex()

unsigned int LVL1BS::CmxJetSubBlock::mapIndex ( int slice,
int jem ) const
private

Definition at line 344 of file CmxJetSubBlock.cxx.

346{
347 unsigned int ix = jem;
348 if (format() == NEUTRAL) ix += slice * s_modules;
349 return ix;
350}
static const int s_modules

◆ 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}
static const int s_moduleBit
static const uint32_t s_moduleMask

◆ 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::CmxJetSubBlock::pack ( )

Pack data.

Definition at line 294 of file CmxJetSubBlock.cxx.

295{
296 bool rc = false;
297 switch (version()) {
298 case 1:
299 case 2: // <<== CHECK
300 switch (format()) {
301 case NEUTRAL:
302 rc = packNeutral();
303 break;
304 case UNCOMPRESSED:
306 break;
307 default:
308 break;
309 }
310 break;
311 default:
312 break;
313 }
314 return rc;
315}
static Double_t rc
bool packUncompressed()
Pack uncompressed data.
bool packNeutral()
Pack neutral data.

◆ 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 {
307 m_bitword |= (datum & mask) << m_currentBit;
308 m_currentBit += nbits;
309 if (m_currentBit >= m_maxBits)
310 {
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}
std::vector< uint32_t > m_data
Sub-Block data.
std::vector< uint32_t > m_unpackingMasks
Unpacking masks.

◆ 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 {
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}
std::vector< int > m_oddParity
int parityBit(int init, uint32_t datum, int nbits) const
Return the parity bit for given data.
static const uint32_t s_glinkDavSet

◆ 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}
static const int s_maxPins
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.

◆ packNeutral()

bool LVL1BS::CmxJetSubBlock::packNeutral ( )
private

Pack neutral data.

Definition at line 406 of file CmxJetSubBlock.cxx.

407{
408 resize();
409 std::vector<int> locVec(s_tobsPerModule);
410 std::vector<int> energyLgVec(s_tobsPerModule);
411 std::vector<int> energySmVec(s_tobsPerModule);
412 const int slices = timeslices();
413 for (int slice = 0; slice < slices; ++slice) {
414 for (int pin = 0; pin < s_glinkPins; ++pin) {
415 if (pin < s_modules) { // TOB data
416 const int jem = pin;
417 // Presence map
419 // Get tob data for this jem
420 locVec.clear();
421 energyLgVec.clear();
422 energySmVec.clear();
423 for (int tob = 0; tob < s_tobsPerModule; ++tob) {
424 locVec.push_back(localCoord(slice, jem, tob));
425 energyLgVec.push_back(energyLarge(slice, jem, tob));
426 energySmVec.push_back(energySmall(slice, jem, tob));
427 }
428 const int parity = parityBits(slice, jem);
429 // And pack
430 for (int tob = 0; tob < s_tobsPerModule; ++tob) {
431 // Energy small window LSB
432 const int nbitsL = s_energySmBits[2 * tob];
433 packerNeutral(pin, energySmVec[tob], nbitsL);
434 // Local coordinates
435 packerNeutral(pin, locVec[tob], s_coordBits);
436 // Energy large window
437 packerNeutral(pin, energyLgVec[tob], s_energyLgBits);
438 // Backplane parity error
439 packerNeutral(pin, (parity >> tob), s_parityErrorBits);
440 // Energy small window HSB
441 const int nbitsH = s_energySmBits[2 * tob + 1];
442 if (nbitsH > 0) {
443 packerNeutral(pin, (energySmVec[tob] >> nbitsL), nbitsH);
444 }
445 }
446 } else { // Hits and Topo data
447 if (pin < s_glinkPins - 1) {
448 // Remote, local and total hits; parity error
449 const int source1 = pin - s_modules + REMOTE_MAIN;
450 const int source2 = pin - s_modules + REMOTE_FORWARD;
451 packerNeutral(pin, hits(slice, source1, 0), s_threshMainBits);
453 packerNeutral(pin, hits(slice, source1, 1), s_threshMainBits);
454 packerNeutral(pin, (hitsError(slice, source1, 1) >> 1), s_parityErrorBits);
455 packerNeutral(pin, hits(slice, source2, 0), s_threshFwdLBits);
457 packerNeutral(pin, hits(slice, source2, 1), s_threshFwdHBits);
458 packerNeutral(pin, (hitsError(slice, source2, 1) >> 1), s_parityErrorBits);
459 packerNeutral(pin, (hitsError(slice, source1, 0) >> 2), s_roiOverflowBits);
461 } else {
462 // Bunch crossing number, Fifo overflow and Topo data
470 }
471 }
472 // G-Link parity
474 }
475 }
476 return true;
477}
int energyLarge(int slice, int jem, int tob) const
Return energy large window size for given jem and tob.
static const int s_topoCountsBits
static const int s_coordBits
int localCoord(int slice, int jem, int tob) const
Return Local coordinate for given jem and tob.
static const int s_topoPaddingBits
static const int s_parityErrorBits
int energySmall(int slice, int jem, int tob) const
Return energy small window size for given jem and tob.
static const int s_energySmBits[8]
static const int s_topoMapBits
unsigned int presenceMap(int slice, int jem) const
Return presence map for given JEM.
static const int s_bunchCrossingBits
static const int s_threshMainBits
int parityBits(int slice, int jem) const
Return parity bits for given JEM.
static const int s_fifoOverflowBits
static const int s_threshFwdLBits
static const int s_threshFwdHBits
static const int s_presenceBits
static const int s_energyLgBits
static const int s_paddingBits
static const int s_roiOverflowBits
int hitsError(int slice, int source, int flag) const
Return hit error for given source ID and HL flag.
static const int s_topoChecksumBits
static const int s_glinkPins
static const int s_tobsPerModule
int timeslices() const
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)

◆ packUncompressed()

bool LVL1BS::CmxJetSubBlock::packUncompressed ( )
private

Pack uncompressed data.

Definition at line 481 of file CmxJetSubBlock.cxx.

482{
483 std::vector<uint32_t>::const_iterator pos;
484 for (pos = m_tobData.begin(); pos != m_tobData.end(); ++pos) {
485 if (*pos) packer(*pos, s_wordLength);
486 }
487 for (pos = m_hitsData.begin(); pos != m_hitsData.end(); ++pos) {
488 if (*pos) packer(*pos, s_wordLength);
489 }
490 packerFlush();
491 return true;
492}
static const int s_wordLength
Data word length.
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
void packerFlush()
Flush the current data word padded with zeros.

◆ parIndex()

unsigned int LVL1BS::CmxJetSubBlock::parIndex ( int slice,
int jem ) const
private

Definition at line 354 of file CmxJetSubBlock.cxx.

356{
357 unsigned int ix = jem;
358 if (format() == NEUTRAL) ix += slice * s_modules;
359 return ix;
360}

◆ 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}
init(v_theApp, v_rootStream=None)
Definition PyKernel.py:45

◆ parityBits()

int LVL1BS::CmxJetSubBlock::parityBits ( int slice,
int jem ) const

Return parity bits for given JEM.

Definition at line 160 of file CmxJetSubBlock.cxx.

161{
162 int parity = 0;
163 const unsigned int ix = parIndex(slice, jem);
164 if (ix < m_parityBits.size()) parity = m_parityBits[ix];
165 return parity;
166}
unsigned int parIndex(int slice, int jem) const

◆ presenceMap()

unsigned int LVL1BS::CmxJetSubBlock::presenceMap ( int slice,
int jem ) const

Return presence map for given JEM.

Definition at line 89 of file CmxJetSubBlock.cxx.

91{
92 unsigned int map = 0;
93 const unsigned int ix = mapIndex(slice, jem);
94 if (ix < m_presenceMaps.size()) map = m_presenceMaps[ix];
95 return map;
96}
unsigned int mapIndex(int slice, int jem) const

◆ 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}
static const int s_ppmCrates
static SubBlockWordType wordType(uint32_t word)
Word identification.
const DataType * PointerType
Definition RawEvent.h:25

◆ resize()

void LVL1BS::CmxJetSubBlock::resize ( )
private

Definition at line 384 of file CmxJetSubBlock.cxx.

385{
386 if (m_tobData.empty()) {
387 int size1 = s_modules * s_tobsPerModule;
388 int size2 = 2 * MAX_SOURCE_ID;
389 int size3 = s_modules;
390 int size4 = s_modules;
391 if (format() == NEUTRAL) {
392 size1 *= timeslices();
393 size2 *= timeslices();
394 size3 *= timeslices();
395 size4 *= timeslices();
396 }
397 m_tobData.resize(size1);
398 m_hitsData.resize(size2);
399 m_presenceMaps.resize(size3);
400 m_parityBits.resize(size4);
401 }
402}

◆ 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}
static const uint32_t s_seqnoMask
static const int s_seqnoBit

◆ 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;
44}
void setHeader(int wordId, int version, int format, int seqno, int crate, int module, int slices2, int slices1)
Store header data.

◆ 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}
void setStatus(uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity)
Store error status trailer.

◆ 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}
static const uint32_t s_wordIdMask
static const uint32_t s_slices1Mask
static const int s_slices2Bit
static const int s_versionBit
static const int s_slices1Bit
static const int s_wordIdBit
static const uint32_t s_versionMask
static const uint32_t s_slices2Mask

◆ setHits()

void LVL1BS::CmxJetSubBlock::setHits ( int slice,
int source,
int flag,
unsigned int hits,
int error )

Store hit counts for given source ID and HL flag.

Definition at line 268 of file CmxJetSubBlock.cxx.

270{
271 resize();
272 const unsigned int ix = hitIndex(slice, source, flag);
273 if (ix < m_hitsData.size() && (hits || error)) {
274 uint32_t word = m_hitsData[ix];
276 if (source == REMOTE_FORWARD || source == LOCAL_FORWARD ||
277 source == TOTAL_FORWARD) {
279 }
280 else if (source == TOPO_CHECKSUM) mask = s_topoCheckMask;
281 else if (source == TOPO_OCCUPANCY_MAP) mask = s_topoMapMask;
282 else if (source == TOPO_OCCUPANCY_COUNTS) mask = s_topoCountsMask;
283 word |= (hits & mask) << s_threshBit;
284 word |= (error & s_errorMask) << s_threshErrorBit;
285 word |= (flag & s_hlFlagMask) << s_hlFlagBit;
286 word |= (source & s_sourceIdMask) << s_sourceIdBit;
287 word |= (s_threshWordId) << s_dataWordIdBit;
288 m_hitsData[ix] = word;
289 }
290}
static const int s_threshWordId
static const int s_hlFlagBit

◆ setParityBits()

void LVL1BS::CmxJetSubBlock::setParityBits ( int slice,
int jem,
int parity )

Store parity bits for neutral format.

Definition at line 256 of file CmxJetSubBlock.cxx.

258{
259 resize();
260 if (parity) {
261 const unsigned int ix = parIndex(slice, jem);
262 if (ix < m_parityBits.size()) m_parityBits[ix] = parity;
263 }
264}

◆ setPresenceMap()

void LVL1BS::CmxJetSubBlock::setPresenceMap ( int slice,
int jem,
unsigned int map )

Store presence map.

Definition at line 208 of file CmxJetSubBlock.cxx.

210{
211 resize();
212 if (map) {
213 const unsigned int ix = mapIndex(slice, jem);
214 if (ix < m_presenceMaps.size()) m_presenceMaps[ix] = map;
215 }
216}

◆ 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;
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}
static const int s_upstreamErrorBit
uint32_t failingBCN() const
static const uint32_t s_statusVal
static const int s_statusBit
static const uint32_t s_statusMask

◆ setStreamed()

void LVL1BS::L1CaloSubBlock::setStreamed ( )
inlineinherited

Set continuous bit streaming for compressed formats.

Definition at line 348 of file L1CaloSubBlock.h.

349{
352}
static const uint32_t s_maxStreamedMask
static const int s_maxStreamedBits

◆ setTob()

void LVL1BS::CmxJetSubBlock::setTob ( int slice,
int jem,
int frame,
int loc,
int energyLarge,
int energySmall,
int error )

Store TOB (RoI) data for given JEM, frame, local coord.

Definition at line 220 of file CmxJetSubBlock.cxx.

223{
224 resize();
225 if (energyLarge || energySmall || error) {
226 uint32_t word = 0;
229 word |= (error & s_tobErrorMask) << s_tobErrorBit;
230 word |= (loc & s_tobCoordMask) << s_tobCoordBit;
231 word |= (frame & s_tobFrameMask) << s_tobFrameBit;
232 word |= (jem & s_tobJemMask) << s_tobJemBit;
233 word |= (s_tobWordId) << s_dataWordIdBit;
234 // Order by frame == presence bit // <<== CHECK
235 for (int tob = 0; tob < s_tobsPerModule; ++tob) {
236 const unsigned int ix = tobIndex(slice, jem, tob);
237 if (m_tobData[ix] == 0) {
238 m_tobData[ix] = word;
239 break;
240 } else {
241 const int frameOld = (m_tobData[ix] >> s_tobFrameBit)&s_tobFrameMask;
242 if (frame < frameOld) {
243 for (int i = s_tobsPerModule - tob - 1; i > 0; --i) {
244 m_tobData[ix + i] = m_tobData[ix + i - 1];
245 }
246 m_tobData[ix] = word;
247 break;
248 }
249 }
250 }
251 }
252}
int frame(int slice, int jem, int tob) const
Return frame for given jem and tob.
static const int s_tobWordId
static const int s_tobErrorBit
static const uint32_t s_tobErrorMask

◆ setUnpackErrorCode()

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

Set the unpacking error code.

Definition at line 338 of file L1CaloSubBlock.h.

339{
341}
int m_unpackError
Unpacking error code.

◆ 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}

◆ sourceId()

int LVL1BS::CmxJetSubBlock::sourceId ( uint32_t word) const
inlineprivate

Definition at line 168 of file CmxJetSubBlock.h.

169{
170 return (word >> s_sourceIdBit) & s_sourceIdMask;
171}

◆ 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}
static const int s_glinkBitsPerSlice
Needed for neutral format.
Definition CmxSubBlock.h:59
int dataWords() const
Return number of data words.

◆ tobError()

int LVL1BS::CmxJetSubBlock::tobError ( int slice,
int jem,
int tob ) const

Return error bit for given jem and tob.

Definition at line 148 of file CmxJetSubBlock.cxx.

149{
150 int error = 0;
151 const unsigned int ix = tobIndex(slice, jem, tob);
152 if (ix < m_tobData.size()) {
154 }
155 return error;
156}

◆ tobIndex()

unsigned int LVL1BS::CmxJetSubBlock::tobIndex ( int slice,
int jem,
int tob ) const
private

Definition at line 364 of file CmxJetSubBlock.cxx.

366{
367 unsigned int ix = jem * s_tobsPerModule + tob;
368 if (format() == NEUTRAL) ix += slice * s_modules * s_tobsPerModule;
369 return ix;
370}

◆ unpack()

bool LVL1BS::CmxJetSubBlock::unpack ( )

Unpack data.

Definition at line 317 of file CmxJetSubBlock.cxx.

318{
319 bool rc = false;
320 switch (version()) {
321 case 1:
322 case 2: // <<== CHECK
323 switch (format()) {
324 case NEUTRAL:
325 rc = unpackNeutral();
326 break;
327 case UNCOMPRESSED:
329 break;
330 default:
332 break;
333 }
334 break;
335 default:
337 break;
338 }
339 return rc;
340}
bool unpackNeutral()
Unpack neutral data.
bool unpackUncompressed()
Unpack uncompressed data.
void setUnpackErrorCode(int code)
Set the unpacking error code.

◆ 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 {
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}
std::vector< uint32_t >::const_iterator m_dataPos
std::vector< uint32_t >::const_iterator m_dataPosEnd

◆ 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}
uint32_t unpackerNeutral(int pin, int nbits)
Unpack given number of bits of neutral data for given pin.

◆ 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;
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;
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}
MsgStream & msg
Definition testRead.cxx:32

◆ 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::CmxJetSubBlock::unpackNeutral ( )
private

Unpack neutral data.

Definition at line 496 of file CmxJetSubBlock.cxx.

497{
498 resize();
499 int bunchCrossing = 0;
500 int fifoOverflow = 0;
501 int glinkParity = 0;
502 std::vector<int> locVec(s_tobsPerModule);
503 std::vector<int> energyLgVec(s_tobsPerModule);
504 std::vector<int> energySmVec(s_tobsPerModule);
505 const int slices = timeslices();
506 for (int slice = 0; slice < slices; ++slice) {
507 for (int pin = 0; pin < s_glinkPins; ++pin) {
508 if (pin < s_modules) { // TOB data
509 // Presence map
510 const unsigned int map = unpackerNeutral(pin, s_presenceBits);
511 locVec.assign(s_tobsPerModule, 0);
512 energyLgVec.assign(s_tobsPerModule, 0);
513 energySmVec.assign(s_tobsPerModule, 0);
514 int parity = 0;
515 for (int tob = 0; tob < s_tobsPerModule; ++tob) {
516 // Energy small window LSB
517 const int nbitsL = s_energySmBits[2 * tob];
518 energySmVec[tob] = unpackerNeutral(pin, nbitsL);
519 // Local coordinates
520 locVec[tob] = unpackerNeutral(pin, s_coordBits);
521 // Energy large window
522 energyLgVec[tob] = unpackerNeutral(pin, s_energyLgBits);
523 // Backplane parity error
524 parity |= (unpackerNeutral(pin, s_parityErrorBits) << tob);
525 // Energy small window HSB
526 const int nbitsH = s_energySmBits[2 * tob + 1];
527 if (nbitsH > 0) {
528 energySmVec[tob] += (unpackerNeutral(pin, nbitsH) << nbitsL);
529 }
530 }
531 const int error = (parity) ? 1 : 0;
532 int tob = 0;
533 const int jem = pin;
534 for (int frame = 0; frame < s_presenceBits && tob < s_tobsPerModule; ++frame) { // <<== CHECK - assuming bit==frame
535 if ((map >> frame) & 1) {
536 setTob(slice, jem, frame, locVec[tob], energyLgVec[tob],
537 energySmVec[tob], error);
538 ++tob;
539 }
540 }
541 setPresenceMap(slice, jem, map);
542 setParityBits(slice, jem, parity);
543 } else { // Hits and Topo data
544 if (pin < s_glinkPins - 1) {
545 // Remote, local and total hits; parity error, RoI overflow
546 const int source1 = pin - s_modules + REMOTE_MAIN;
547 const int source2 = pin - s_modules + REMOTE_FORWARD;
548 const unsigned int main0 = unpackerNeutral(pin, s_threshMainBits);
549 int errorMain = unpackerNeutral(pin, s_parityErrorBits);
550 const unsigned int main1 = unpackerNeutral(pin, s_threshMainBits);
551 errorMain |= (unpackerNeutral(pin, s_parityErrorBits) << 1);
552 const unsigned int fwd0 = unpackerNeutral(pin, s_threshFwdLBits);
553 int errorFwd = unpackerNeutral(pin, s_parityErrorBits);
554 const unsigned int fwd1 = unpackerNeutral(pin, s_threshFwdHBits);
555 errorFwd |= (unpackerNeutral(pin, s_parityErrorBits) << 1);
556 const int overflow = (unpackerNeutral(pin, s_roiOverflowBits) << 2);
557 errorMain |= overflow;
558 errorFwd |= overflow;
559 setHits(slice, source1, 0, main0, errorMain);
560 setHits(slice, source1, 1, main1, errorMain);
561 setHits(slice, source2, 0, fwd0, errorFwd);
562 setHits(slice, source2, 1, fwd1, errorFwd);
564 } else {
565 // Bunch crossing number, Fifo overflow and Topo data
567 fifoOverflow |= unpackerNeutral(pin, s_fifoOverflowBits);
568 unsigned int hits = unpackerNeutral(pin, s_topoChecksumBits);
569 int error = 0;
570 setHits(slice, TOPO_CHECKSUM, 0, hits, error);
578 }
579 }
580 // G-Link parity errors
582 }
583 }
585 setDaqOverflow(fifoOverflow);
587
588 const bool rc = unpackerSuccess();
590 return rc;
591}
void setParityBits(int slice, int jem, int parity)
Store parity bits for neutral format.
void setHits(int slice, int source, int flag, unsigned int hits, int error)
Store hit counts for given source ID and HL flag.
void setPresenceMap(int slice, int jem, unsigned int map)
Store presence map.
void setTob(int slice, int jem, int frame, int loc, int energyLarge, int energySmall, int error)
Store TOB (RoI) data for given JEM, frame, local coord.
void setDaqOverflow(int bit=1)
Set DAQ FIFO Overflow bit in Sub-status word.
void setGlinkParity(int bit=1)
Set G-Link Parity bit in Sub-status word.
bool unpackerSuccess() const
Return unpacker success flag.
bool unpackerNeutralParityError(int pin)
Unpack and test G-Link parity bit for given pin.
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)

◆ unpackUncompressed()

bool LVL1BS::CmxJetSubBlock::unpackUncompressed ( )
private

Unpack uncompressed data.

Definition at line 595 of file CmxJetSubBlock.cxx.

596{
597 resize();
598 const int maxHits = m_hitsData.size();
599 m_jemTobCount.assign(s_modules, 0);
600 unpackerInit();
602 while (unpackerSuccess()) {
603 const int id = dataWordId(word);
604 if (id == s_tobWordId) { // TOB data
605 const int index = jem(word);
606 const int count = m_jemTobCount[index];
607 const int index2 = index * s_tobsPerModule + count;
608 if (count < s_tobsPerModule) {
609 m_tobData[index2] = word;
611 } else {
612 setUnpackErrorCode(UNPACK_EXCESS_TOBS); // New code. Check consequences
613 return false;
614 }
615 } else if (id == s_threshWordId) { // Hits and Topo data
616 const int index = (sourceId(word) << 1) | hlFlag(word);
617 if (index < maxHits && m_hitsData[index] == 0) {
618 m_hitsData[index] = word;
619 } else {
621 return false;
622 }
623 } else {
625 return false;
626 }
627 word = unpacker(s_wordLength);
628 }
629 return true;
630}
int sourceId(uint32_t word) const
int dataWordId(uint32_t word) const
std::vector< int > m_jemTobCount
JEM TOB count vector for unpacking.
int hlFlag(uint32_t word) const
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
void unpackerInit()
Initialise unpacker.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
str index
Definition DeMoScan.py:362

◆ 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}
static const int s_headerBit
static const uint32_t s_headerVal
static const uint32_t s_headerMask

◆ 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.

219{};

◆ m_dataPosEnd

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

Definition at line 220 of file L1CaloSubBlock.h.

220{};

◆ 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_hitsData

std::vector<uint32_t> LVL1BS::CmxJetSubBlock::m_hitsData
private

Hits and topo data.

Definition at line 153 of file CmxJetSubBlock.h.

◆ m_jemTobCount

std::vector<int> LVL1BS::CmxJetSubBlock::m_jemTobCount
private

JEM TOB count vector for unpacking.

Definition at line 159 of file CmxJetSubBlock.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_parityBits

std::vector<int> LVL1BS::CmxJetSubBlock::m_parityBits
private

Parity data for neutral format.

Definition at line 157 of file CmxJetSubBlock.h.

◆ m_presenceMaps

std::vector<unsigned int> LVL1BS::CmxJetSubBlock::m_presenceMaps
private

Presence maps.

Definition at line 155 of file CmxJetSubBlock.h.

◆ m_tobData

std::vector<uint32_t> LVL1BS::CmxJetSubBlock::m_tobData
private

TOB data.

Definition at line 151 of file CmxJetSubBlock.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::CmxJetSubBlock::s_bunchCrossingBits = 12
staticprivate

Definition at line 120 of file CmxJetSubBlock.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_coordBits

const int LVL1BS::CmxJetSubBlock::s_coordBits = 2
staticprivate

Definition at line 110 of file CmxJetSubBlock.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_dataWordIdBit

const int LVL1BS::CmxJetSubBlock::s_dataWordIdBit = 29
staticprivate

Definition at line 96 of file CmxJetSubBlock.h.

◆ s_dataWordIdMask

const uint32_t LVL1BS::CmxJetSubBlock::s_dataWordIdMask = 0x7
staticprivate

Definition at line 107 of file CmxJetSubBlock.h.

◆ s_energyLgBits

const int LVL1BS::CmxJetSubBlock::s_energyLgBits = 10
staticprivate

Definition at line 111 of file CmxJetSubBlock.h.

◆ s_energySmBits

const int LVL1BS::CmxJetSubBlock::s_energySmBits = {3, 6, 5, 4, 7, 2, 9, 0}
staticprivate

Definition at line 113 of file CmxJetSubBlock.h.

◆ s_errorMask

const uint32_t LVL1BS::CmxJetSubBlock::s_errorMask = 0x7
staticprivate

Definition at line 101 of file CmxJetSubBlock.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_fifoOverflowBits

const int LVL1BS::CmxJetSubBlock::s_fifoOverflowBits = 1
staticprivate

Definition at line 121 of file CmxJetSubBlock.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_glinkPins

const int LVL1BS::CmxJetSubBlock::s_glinkPins = 20
staticprivate

Definition at line 126 of file CmxJetSubBlock.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_hlFlagBit

const int LVL1BS::CmxJetSubBlock::s_hlFlagBit = 19
staticprivate

Definition at line 94 of file CmxJetSubBlock.h.

◆ s_hlFlagMask

const uint32_t LVL1BS::CmxJetSubBlock::s_hlFlagMask = 0x1
staticprivate

Definition at line 105 of file CmxJetSubBlock.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_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_modules

const int LVL1BS::CmxJetSubBlock::s_modules = 16
staticprivate

Definition at line 127 of file CmxJetSubBlock.h.

◆ s_muxPhases

const int LVL1BS::CmxJetSubBlock::s_muxPhases = 4
staticprivate

Definition at line 129 of file CmxJetSubBlock.h.

◆ s_paddingBits

const int LVL1BS::CmxJetSubBlock::s_paddingBits = 31
staticprivate

Definition at line 119 of file CmxJetSubBlock.h.

◆ s_parityErrorBits

const int LVL1BS::CmxJetSubBlock::s_parityErrorBits = 1
staticprivate

Definition at line 117 of file CmxJetSubBlock.h.

◆ s_ppmCrates

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

Definition at line 168 of file L1CaloSubBlock.h.

◆ s_presenceBits

const int LVL1BS::CmxJetSubBlock::s_presenceBits = 8
staticprivate

Definition at line 109 of file CmxJetSubBlock.h.

◆ s_roiOverflowBits

const int LVL1BS::CmxJetSubBlock::s_roiOverflowBits = 1
staticprivate

Definition at line 118 of file CmxJetSubBlock.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_sourceIdBit

const int LVL1BS::CmxJetSubBlock::s_sourceIdBit = 25
staticprivate

Definition at line 95 of file CmxJetSubBlock.h.

◆ s_sourceIdMask

const uint32_t LVL1BS::CmxJetSubBlock::s_sourceIdMask = 0xf
staticprivate

Definition at line 106 of file CmxJetSubBlock.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_threshBit

const int LVL1BS::CmxJetSubBlock::s_threshBit = 0
staticprivate

Definition at line 90 of file CmxJetSubBlock.h.

◆ s_threshErrorBit

const int LVL1BS::CmxJetSubBlock::s_threshErrorBit = 16
staticprivate

Definition at line 91 of file CmxJetSubBlock.h.

◆ s_threshFwdHBits

const int LVL1BS::CmxJetSubBlock::s_threshFwdHBits = 14
staticprivate

Definition at line 116 of file CmxJetSubBlock.h.

◆ s_threshFwdHMask

const uint32_t LVL1BS::CmxJetSubBlock::s_threshFwdHMask = 0x3fff
staticprivate

Definition at line 100 of file CmxJetSubBlock.h.

◆ s_threshFwdLBits

const int LVL1BS::CmxJetSubBlock::s_threshFwdLBits = 16
staticprivate

Definition at line 115 of file CmxJetSubBlock.h.

◆ s_threshFwdLMask

const uint32_t LVL1BS::CmxJetSubBlock::s_threshFwdLMask = 0xffff
staticprivate

Definition at line 99 of file CmxJetSubBlock.h.

◆ s_threshHlFlagBit

const int LVL1BS::CmxJetSubBlock::s_threshHlFlagBit = 19
staticprivate

Definition at line 92 of file CmxJetSubBlock.h.

◆ s_threshMainBits

const int LVL1BS::CmxJetSubBlock::s_threshMainBits = 15
staticprivate

Definition at line 114 of file CmxJetSubBlock.h.

◆ s_threshMainMask

const uint32_t LVL1BS::CmxJetSubBlock::s_threshMainMask = 0x7fff
staticprivate

Definition at line 98 of file CmxJetSubBlock.h.

◆ s_threshWordId

const int LVL1BS::CmxJetSubBlock::s_threshWordId = 1
staticprivate

Definition at line 97 of file CmxJetSubBlock.h.

◆ s_tobCoordBit

const int LVL1BS::CmxJetSubBlock::s_tobCoordBit = 20
staticprivate

Definition at line 79 of file CmxJetSubBlock.h.

◆ s_tobCoordMask

const uint32_t LVL1BS::CmxJetSubBlock::s_tobCoordMask = 0x3
staticprivate

Definition at line 86 of file CmxJetSubBlock.h.

◆ s_tobEnergyLgBit

const int LVL1BS::CmxJetSubBlock::s_tobEnergyLgBit = 0
staticprivate

Definition at line 76 of file CmxJetSubBlock.h.

◆ s_tobEnergyLgMask

const uint32_t LVL1BS::CmxJetSubBlock::s_tobEnergyLgMask = 0x3ff
staticprivate

Definition at line 83 of file CmxJetSubBlock.h.

◆ s_tobEnergySmBit

const int LVL1BS::CmxJetSubBlock::s_tobEnergySmBit = 10
staticprivate

Definition at line 77 of file CmxJetSubBlock.h.

◆ s_tobEnergySmMask

const uint32_t LVL1BS::CmxJetSubBlock::s_tobEnergySmMask = 0x1ff
staticprivate

Definition at line 84 of file CmxJetSubBlock.h.

◆ s_tobErrorBit

const int LVL1BS::CmxJetSubBlock::s_tobErrorBit = 19
staticprivate

Definition at line 78 of file CmxJetSubBlock.h.

◆ s_tobErrorMask

const uint32_t LVL1BS::CmxJetSubBlock::s_tobErrorMask = 0x1
staticprivate

Definition at line 85 of file CmxJetSubBlock.h.

◆ s_tobFrameBit

const int LVL1BS::CmxJetSubBlock::s_tobFrameBit = 22
staticprivate

Definition at line 80 of file CmxJetSubBlock.h.

◆ s_tobFrameMask

const uint32_t LVL1BS::CmxJetSubBlock::s_tobFrameMask = 0x7
staticprivate

Definition at line 87 of file CmxJetSubBlock.h.

◆ s_tobJemBit

const int LVL1BS::CmxJetSubBlock::s_tobJemBit = 25
staticprivate

Definition at line 81 of file CmxJetSubBlock.h.

◆ s_tobJemMask

const uint32_t LVL1BS::CmxJetSubBlock::s_tobJemMask = 0xf
staticprivate

Definition at line 88 of file CmxJetSubBlock.h.

◆ s_tobsPerModule

const int LVL1BS::CmxJetSubBlock::s_tobsPerModule = 4
staticprivate

Definition at line 128 of file CmxJetSubBlock.h.

◆ s_tobWordId

const int LVL1BS::CmxJetSubBlock::s_tobWordId = 0
staticprivate

Definition at line 82 of file CmxJetSubBlock.h.

◆ s_topoCheckMask

const uint32_t LVL1BS::CmxJetSubBlock::s_topoCheckMask = 0xffff
staticprivate

Definition at line 102 of file CmxJetSubBlock.h.

◆ s_topoChecksumBits

const int LVL1BS::CmxJetSubBlock::s_topoChecksumBits = 16
staticprivate

Definition at line 122 of file CmxJetSubBlock.h.

◆ s_topoCountsBits

const int LVL1BS::CmxJetSubBlock::s_topoCountsBits = 24
staticprivate

Definition at line 124 of file CmxJetSubBlock.h.

◆ s_topoCountsMask

const uint32_t LVL1BS::CmxJetSubBlock::s_topoCountsMask = 0xffffff
staticprivate

Definition at line 104 of file CmxJetSubBlock.h.

◆ s_topoHlFlagBit

const int LVL1BS::CmxJetSubBlock::s_topoHlFlagBit = 24
staticprivate

Definition at line 93 of file CmxJetSubBlock.h.

◆ s_topoMapBits

const int LVL1BS::CmxJetSubBlock::s_topoMapBits = 16
staticprivate

Definition at line 123 of file CmxJetSubBlock.h.

◆ s_topoMapMask

const uint32_t LVL1BS::CmxJetSubBlock::s_topoMapMask = 0xffff
staticprivate

Definition at line 103 of file CmxJetSubBlock.h.

◆ s_topoPaddingBits

const int LVL1BS::CmxJetSubBlock::s_topoPaddingBits = 3
staticprivate

Definition at line 125 of file CmxJetSubBlock.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::L1CaloSubBlock::s_wordIdBit = 28
staticprivateinherited

Definition at line 170 of file L1CaloSubBlock.h.

◆ s_wordIdMask

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

Definition at line 178 of file L1CaloSubBlock.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::CmxJetSubBlock::s_wordLength = 32
staticprivate

Data word length.

Definition at line 74 of file CmxJetSubBlock.h.


The documentation for this class was generated from the following files: