ATLAS Offline Software
|
L1Calo Sub-Block base class. More...
#include <ZdcL1CaloSubBlock.h>
Public Types | |
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 | |
ZdcL1CaloSubBlock () | |
~ZdcL1CaloSubBlock () | |
void | clear () |
Clear all data. More... | |
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 | setStatus (uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity) |
Output complete packed sub-block to ROD vector. 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 SubBlockWordType | wordType (uint32_t word) |
Word identification. 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... | |
Private Attributes | |
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_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 |
L1Calo Sub-Block base class.
Provides common functionality for all L1Calo Sub-Block derived types.
Definition at line 25 of file ZdcL1CaloSubBlock.h.
Definition at line 32 of file ZdcL1CaloSubBlock.h.
Enumerator | |
---|---|
NEUTRAL | |
UNCOMPRESSED | |
COMPRESSED | |
SUPERCOMPRESSED |
Definition at line 29 of file ZdcL1CaloSubBlock.h.
Enumerator | |
---|---|
HEADER | |
DATA | |
STATUS |
Definition at line 28 of file ZdcL1CaloSubBlock.h.
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 39 of file ZdcL1CaloSubBlock.h.
ZdcL1CaloSubBlock::ZdcL1CaloSubBlock | ( | ) |
ZdcL1CaloSubBlock::~ZdcL1CaloSubBlock | ( | ) |
|
inline |
Definition at line 310 of file ZdcL1CaloSubBlock.h.
|
inline |
Return the Bunch Crossing number (neutral format only)
Definition at line 335 of file ZdcL1CaloSubBlock.h.
void ZdcL1CaloSubBlock::clear | ( | ) |
Clear all data.
|
inline |
Definition at line 265 of file ZdcL1CaloSubBlock.h.
|
inline |
Return current pin bit for given pin.
Definition at line 361 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 305 of file ZdcL1CaloSubBlock.h.
|
inline |
Return number of data words.
Definition at line 235 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 285 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 250 of file ZdcL1CaloSubBlock.h.
|
static |
Return data format from given header word.
|
inline |
Definition at line 295 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 320 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 315 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 290 of file ZdcL1CaloSubBlock.h.
int ZdcL1CaloSubBlock::minBits | ( | uint32_t | datum | ) | const |
Return the minimum number of bits needed for given data.
|
inline |
Definition at line 270 of file ZdcL1CaloSubBlock.h.
|
static |
Return module field from given header word.
void ZdcL1CaloSubBlock::packer | ( | uint32_t | datum, |
int | nbits | ||
) |
Pack given data into given number of bits.
void ZdcL1CaloSubBlock::packerFlush | ( | ) |
Flush the current data word padded with zeros.
void ZdcL1CaloSubBlock::packerNeutral | ( | int | pin, |
uint32_t | datum, | ||
int | nbits | ||
) |
Pack given neutral data from given pin.
void ZdcL1CaloSubBlock::packerNeutralParity | ( | int | pin | ) |
Pack current G-Link parity bit for given pin.
int ZdcL1CaloSubBlock::parityBit | ( | int | init, |
uint32_t | datum, | ||
int | nbits | ||
) | const |
Return the parity bit for given data.
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ZdcL1CaloSubBlock::read | ( | const OFFLINE_FRAGMENTS_NAMESPACE::PointerType | beg, |
const OFFLINE_FRAGMENTS_NAMESPACE::PointerType | end | ||
) |
Input complete packed sub-block from ROD array.
|
inline |
Definition at line 255 of file ZdcL1CaloSubBlock.h.
|
static |
Return seqno field from given header word.
|
inline |
Set the Bunch Crossing number (neutral format only)
Definition at line 330 of file ZdcL1CaloSubBlock.h.
void ZdcL1CaloSubBlock::setDaqOverflow | ( | int | bit = 1 | ) |
Set DAQ FIFO Overflow bit in Sub-status word.
void ZdcL1CaloSubBlock::setGlinkParity | ( | int | bit = 1 | ) |
Set G-Link Parity bit in Sub-status word.
void ZdcL1CaloSubBlock::setHeader | ( | int | wordId, |
int | version, | ||
int | format, | ||
int | seqno, | ||
int | crate, | ||
int | module, | ||
int | slices2, | ||
int | slices1 | ||
) |
Store header data.
void ZdcL1CaloSubBlock::setStatus | ( | uint32_t | failingBCN, |
bool | glinkTimeout, | ||
bool | glinkDown, | ||
bool | upstreamError, | ||
bool | daqOverflow, | ||
bool | bcnMismatch, | ||
bool | glinkProtocol, | ||
bool | glinkParity | ||
) |
Output complete packed sub-block to ROD vector.
Store error status trailer
|
inline |
Set continuous bit streaming for compressed formats.
Definition at line 350 of file ZdcL1CaloSubBlock.h.
|
inline |
Set the unpacking error code.
Definition at line 340 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 260 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 280 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 275 of file ZdcL1CaloSubBlock.h.
|
inline |
Return Sub-status word.
Definition at line 325 of file ZdcL1CaloSubBlock.h.
uint32_t ZdcL1CaloSubBlock::unpacker | ( | int | nbits | ) |
Unpack given number of bits of data.
uint32_t ZdcL1CaloSubBlock::unpacker | ( | int | nbits, |
int | align | ||
) |
void ZdcL1CaloSubBlock::unpackerInit | ( | ) |
Initialise unpacker.
uint32_t ZdcL1CaloSubBlock::unpackerNeutral | ( | int | pin, |
int | nbits | ||
) |
Unpack given number of bits of neutral data for given pin.
bool ZdcL1CaloSubBlock::unpackerNeutralParityError | ( | int | pin | ) |
Unpack and test G-Link parity bit for given pin.
|
inline |
Return the unpacking error code.
Definition at line 345 of file ZdcL1CaloSubBlock.h.
std::string ZdcL1CaloSubBlock::unpackErrorMsg | ( | ) | const |
Return the unpacking error message for printing.
|
inline |
Return unpacker success flag.
Definition at line 356 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 300 of file ZdcL1CaloSubBlock.h.
|
inline |
Definition at line 245 of file ZdcL1CaloSubBlock.h.
|
static |
Return version number from given header word.
|
inline |
Definition at line 240 of file ZdcL1CaloSubBlock.h.
|
static |
Return wordID field from given header word.
|
static |
Word identification.
|
private |
Definition at line 216 of file ZdcL1CaloSubBlock.h.
|
private |
Bunch Crossing number (neutral format only)
Definition at line 212 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 217 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 224 of file ZdcL1CaloSubBlock.h.
|
private |
Sub-Block data.
Definition at line 229 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 221 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 222 of file ZdcL1CaloSubBlock.h.
|
private |
Current number of data words.
Definition at line 227 of file ZdcL1CaloSubBlock.h.
|
private |
Sub-Block Header.
Definition at line 208 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 218 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 219 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 225 of file ZdcL1CaloSubBlock.h.
|
private |
Sub-Block Status Trailer.
Definition at line 210 of file ZdcL1CaloSubBlock.h.
|
private |
Definition at line 220 of file ZdcL1CaloSubBlock.h.
|
private |
Unpacking error code.
Definition at line 214 of file ZdcL1CaloSubBlock.h.
|
private |
Unpacking masks.
Definition at line 231 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 194 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 176 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 184 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 193 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 189 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 197 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 174 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 182 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 205 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 191 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 196 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 195 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 190 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 163 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 165 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 167 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 204 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 200 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 202 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 199 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 201 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 177 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 185 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 170 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 175 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 183 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 179 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 187 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 178 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 186 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 164 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 166 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 168 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 192 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 173 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 181 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 172 of file ZdcL1CaloSubBlock.h.
|
staticprivate |
Definition at line 180 of file ZdcL1CaloSubBlock.h.