![]() |
ATLAS Offline Software
|
Zdc Sub Block base class. More...
#include <ZdcSubBlock.h>
Public Types | |
| enum | SubBlockWordType { HEADER , DATA , STATUS } |
| enum | DataFormats { NEUTRAL = 0 , UNCOMPRESSED = 1 , COMPRESSED = 2 , SUPERCOMPRESSED = 3 } |
| enum | UnpackErrorType { UNPACK_NONE , UNPACK_VERSION , UNPACK_FORMAT , UNPACK_COMPRESSION_VERSION , UNPACK_COMPRESSION_SLICES , UNPACK_DATA_TRUNCATED , UNPACK_SOURCE_ID , UNPACK_WORD_ID } |
Public Member Functions | |
| ZdcSubBlock () | |
| ~ZdcSubBlock () | |
| void | clear () |
| Clear all data. | |
| 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< ZdcSrcIdMap >::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. | |
| 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. | |
| 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. | |
Static Public Member Functions | |
| static SubBlockWordType | wordType (uint32_t word) |
| Word identification. | |
| static int | wordId (uint32_t word) |
| Return wordID field 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 int | minBits (uint32_t datum) |
| Return the minimum number of bits needed for given data. | |
| static int | parityBit (int init, uint32_t datum, int nbits) |
| Return the parity bit for given data. | |
Private Attributes | |
| 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. | |
Static Private Attributes | |
| static const int | s_headerBit = 30 |
| ZdcSubBlock.cxx this is a base class derived (copyed) from LVL1 I do not think we need this this way; either implement directly on PpmSubBlock or link to LVL1. | |
| 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_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 |
Zdc Sub Block base class.
Derived (copied !) from L1Calo Sub-Block base class.
Don't think we need this, as there is only one type of subblock (only PPM) being used by ZDC. Implement at once inside ZdcPpmSubBlock
Marco Leite
TRY_LINK_LVL1
Definition at line 34 of file ZdcSubBlock.h.
| Enumerator | |
|---|---|
| NEUTRAL | |
| UNCOMPRESSED | |
| COMPRESSED | |
| SUPERCOMPRESSED | |
Definition at line 41 of file ZdcSubBlock.h.
| Enumerator | |
|---|---|
| HEADER | |
| DATA | |
| STATUS | |
Definition at line 37 of file ZdcSubBlock.h.
| Enumerator | |
|---|---|
| UNPACK_NONE | |
| UNPACK_VERSION | |
| UNPACK_FORMAT | |
| UNPACK_COMPRESSION_VERSION | |
| UNPACK_COMPRESSION_SLICES | |
| UNPACK_DATA_TRUNCATED | |
| UNPACK_SOURCE_ID | |
| UNPACK_WORD_ID | |
Definition at line 46 of file ZdcSubBlock.h.
| ZdcSubBlock::ZdcSubBlock | ( | ) |
Definition at line 66 of file ZdcSubBlock.cxx.
| ZdcSubBlock::~ZdcSubBlock | ( | ) |
Definition at line 79 of file ZdcSubBlock.cxx.
|
inline |
Definition at line 310 of file ZdcSubBlock.h.
|
inline |
Return the Bunch Crossing number (neutral format only)
Definition at line 335 of file ZdcSubBlock.h.
| void ZdcSubBlock::clear | ( | ) |
Clear all data.
Definition at line 85 of file ZdcSubBlock.cxx.
|
inline |
Definition at line 265 of file ZdcSubBlock.h.
|
inline |
Definition at line 305 of file ZdcSubBlock.h.
|
inline |
Return number of data words.
Definition at line 235 of file ZdcSubBlock.h.
|
inline |
Definition at line 285 of file ZdcSubBlock.h.
|
inline |
Definition at line 250 of file ZdcSubBlock.h.
|
static |
Return data format from given header word.
Definition at line 441 of file ZdcSubBlock.cxx.
|
inline |
Definition at line 295 of file ZdcSubBlock.h.
|
inline |
Definition at line 320 of file ZdcSubBlock.h.
|
inline |
Definition at line 315 of file ZdcSubBlock.h.
|
inline |
Definition at line 290 of file ZdcSubBlock.h.
|
static |
Return the minimum number of bits needed for given data.
Definition at line 245 of file ZdcSubBlock.cxx.
|
inline |
Definition at line 270 of file ZdcSubBlock.h.
|
static |
Return module field from given header word.
Definition at line 455 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::packer | ( | uint32_t | datum, |
| int | nbits ) |
Pack given data into given number of bits.
Definition at line 271 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::packerFlush | ( | ) |
Flush the current data word padded with zeros.
Definition at line 296 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::packerNeutral | ( | int | pin, |
| uint32_t | datum, | ||
| int | nbits ) |
Pack given neutral data from given pin.
Definition at line 364 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::packerNeutralParity | ( | int | pin | ) |
Pack current G-Link parity bit for given pin.
Definition at line 382 of file ZdcSubBlock.cxx.
|
static |
Return the parity bit for given data.
Definition at line 260 of file ZdcSubBlock.cxx.
| OFFLINE_FRAGMENTS_NAMESPACE::PointerType ZdcSubBlock::read | ( | const OFFLINE_FRAGMENTS_NAMESPACE::PointerType | beg, |
| const OFFLINE_FRAGMENTS_NAMESPACE::PointerType | end ) |
Input complete packed sub-block from ROD array.
Definition at line 121 of file ZdcSubBlock.cxx.
|
inline |
Definition at line 255 of file ZdcSubBlock.h.
|
static |
Return seqno field from given header word.
Definition at line 448 of file ZdcSubBlock.cxx.
|
inline |
Set the Bunch Crossing number (neutral format only)
Definition at line 330 of file ZdcSubBlock.h.
| void ZdcSubBlock::setDaqOverflow | ( | int | bit = 1 | ) |
Set DAQ FIFO Overflow bit in Sub-status word.
Definition at line 186 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::setGlinkParity | ( | int | bit = 1 | ) |
Set G-Link Parity bit in Sub-status word.
Definition at line 196 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::setHeader | ( | int | wordId, |
| int | version, | ||
| int | format, | ||
| int | seqno, | ||
| int | crate, | ||
| int | module, | ||
| int | slices2, | ||
| int | slices1 ) |
Store header data.
Definition at line 102 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::setStatus | ( | uint32_t | failingBCN, |
| bool | glinkTimeout, | ||
| bool | glinkDown, | ||
| bool | upstreamError, | ||
| bool | daqOverflow, | ||
| bool | bcnMismatch, | ||
| bool | glinkProtocol, | ||
| bool | glinkParity ) |
Store error status trailer.
Definition at line 160 of file ZdcSubBlock.cxx.
|
inline |
Set continuous bit streaming for compressed formats.
Definition at line 350 of file ZdcSubBlock.h.
|
inline |
Set the unpacking error code.
Definition at line 340 of file ZdcSubBlock.h.
|
inline |
Definition at line 260 of file ZdcSubBlock.h.
|
inline |
Definition at line 280 of file ZdcSubBlock.h.
|
inline |
Definition at line 275 of file ZdcSubBlock.h.
|
inline |
Return Sub-status word.
Definition at line 325 of file ZdcSubBlock.h.
| uint32_t ZdcSubBlock::unpacker | ( | int | nbits | ) |
Unpack given number of bits of data.
Definition at line 309 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::unpackerInit | ( | ) |
Initialise unpacker.
Definition at line 352 of file ZdcSubBlock.cxx.
| uint32_t ZdcSubBlock::unpackerNeutral | ( | int | pin, |
| int | nbits ) |
Unpack given number of bits of neutral data for given pin.
Definition at line 392 of file ZdcSubBlock.cxx.
| bool ZdcSubBlock::unpackerNeutralParityError | ( | int | pin | ) |
Unpack and test G-Link parity bit for given pin.
Definition at line 408 of file ZdcSubBlock.cxx.
|
inline |
Return the unpacking error code.
Definition at line 345 of file ZdcSubBlock.h.
| std::string ZdcSubBlock::unpackErrorMsg | ( | ) | const |
Return the unpacking error message for printing.
Definition at line 206 of file ZdcSubBlock.cxx.
|
inline |
Return unpacker success flag.
Definition at line 356 of file ZdcSubBlock.h.
|
inline |
Definition at line 300 of file ZdcSubBlock.h.
|
inline |
Definition at line 245 of file ZdcSubBlock.h.
|
inline |
Definition at line 240 of file ZdcSubBlock.h.
|
static |
Return wordID field from given header word.
Definition at line 434 of file ZdcSubBlock.cxx.
|
static |
Word identification.
Definition at line 422 of file ZdcSubBlock.cxx.
| void ZdcSubBlock::write | ( | FullEventAssembler< ZdcSrcIdMap >::RODDATA * | theROD | ) | const |
Output complete packed sub-block to ROD vector.
Definition at line 147 of file ZdcSubBlock.cxx.
|
private |
Definition at line 218 of file ZdcSubBlock.h.
|
private |
|
private |
Definition at line 219 of file ZdcSubBlock.h.
|
private |
Definition at line 226 of file ZdcSubBlock.h.
|
private |
Sub-Block data.
Definition at line 231 of file ZdcSubBlock.h.
|
private |
Definition at line 223 of file ZdcSubBlock.h.
|
private |
Definition at line 224 of file ZdcSubBlock.h.
|
private |
|
private |
|
private |
Definition at line 220 of file ZdcSubBlock.h.
|
private |
Definition at line 221 of file ZdcSubBlock.h.
|
private |
Definition at line 227 of file ZdcSubBlock.h.
|
private |
|
private |
Definition at line 222 of file ZdcSubBlock.h.
|
private |
|
staticprivate |
Definition at line 196 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 178 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 186 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 195 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 191 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 199 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 176 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 184 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 207 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 193 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 198 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 197 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 192 of file ZdcSubBlock.h.
|
staticprivate |
ZdcSubBlock.cxx this is a base class derived (copyed) from LVL1 I do not think we need this this way; either implement directly on PpmSubBlock or link to LVL1.
TRY_LINK_LVL1
Marco Leite 27 May 2009
Definition at line 167 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 169 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 171 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 206 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 202 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 204 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 201 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 203 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 179 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 187 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 177 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 185 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 181 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 189 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 180 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 188 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 168 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 170 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 172 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 194 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 175 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 183 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 174 of file ZdcSubBlock.h.
|
staticprivate |
Definition at line 182 of file ZdcSubBlock.h.