![]() |
ATLAS Offline Software
|
Sub-Block class for CPM RoI data (neutral format) post LS1. More...
#include <CpmRoiSubBlockV2.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 | |
| CpmRoiSubBlockV2 () | |
| ~CpmRoiSubBlockV2 () | |
| void | clear () |
| Clear all data. | |
| void | setRoiHeader (int version, int crate, int module) |
| Store header. | |
| void | fillRoi (LVL1::CPMTobRoI roi) |
| Store RoI. | |
| LVL1::CPMTobRoI | roi (int chip, int loc, int type) const |
| Return RoI for given chip and location (left/right) and type (em/tau) | |
| bool | pack () |
| Pack data. | |
| bool | unpack () |
| Unpack 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< 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 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 | |
| bool | packNeutral () |
| Pack neutral data. | |
| bool | unpackNeutral () |
| Unpack neutral data. | |
Private Attributes | |
| std::vector< LVL1::CPMTobRoI > | m_roiData |
| RoI words. | |
| 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_wordIdVal = 0xc |
| Header word ID. | |
| static const int | s_glinkPins = 16 |
| static const int | s_energyLen = 8 |
| static const int | s_isolLen = 5 |
| static const int | s_locationLen = 2 |
| static const int | s_bunchCrossingBits = 12 |
| 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 |
Sub-Block class for CPM RoI data (neutral format) post LS1.
Based on "ATLAS Level-1 Calorimeter Trigger Read-out Driver" Version X.xxx <<== CHECK
Definition at line 26 of file CpmRoiSubBlockV2.h.
|
inherited |
Definition at line 31 of file L1CaloSubBlock.h.
|
inherited |
| Enumerator | |
|---|---|
| NEUTRAL | |
| UNCOMPRESSED | |
| COMPRESSED | |
| SUPERCOMPRESSED | |
Definition at line 28 of file L1CaloSubBlock.h.
|
inherited |
|
inherited |
| 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.
| LVL1BS::CpmRoiSubBlockV2::CpmRoiSubBlockV2 | ( | ) |
Definition at line 23 of file CpmRoiSubBlockV2.cxx.
| LVL1BS::CpmRoiSubBlockV2::~CpmRoiSubBlockV2 | ( | ) |
Definition at line 27 of file CpmRoiSubBlockV2.cxx.
|
inlineinherited |
Definition at line 308 of file L1CaloSubBlock.h.
|
inlineinherited |
Return the Bunch Crossing number (neutral format only)
Definition at line 333 of file L1CaloSubBlock.h.
| void LVL1BS::CpmRoiSubBlockV2::clear | ( | ) |
Clear all data.
Definition at line 33 of file CpmRoiSubBlockV2.cxx.
|
inlineinherited |
Definition at line 263 of file L1CaloSubBlock.h.
|
inlineinherited |
Return current pin bit for given pin.
Definition at line 359 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 303 of file L1CaloSubBlock.h.
|
inlineinherited |
Return number of data words.
Definition at line 233 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 283 of file L1CaloSubBlock.h.
| void LVL1BS::CpmRoiSubBlockV2::fillRoi | ( | LVL1::CPMTobRoI | roi | ) |
Store RoI.
Definition at line 49 of file CpmRoiSubBlockV2.cxx.
|
inlineinherited |
Definition at line 248 of file L1CaloSubBlock.h.
|
staticinherited |
Return data format from given header word.
Definition at line 506 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Definition at line 293 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 318 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 313 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 288 of file L1CaloSubBlock.h.
|
inherited |
Return the minimum number of bits needed for given data.
Definition at line 274 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Definition at line 268 of file L1CaloSubBlock.h.
|
staticinherited |
Return module field from given header word.
Definition at line 520 of file L1CaloSubBlock.cxx.
| bool LVL1BS::CpmRoiSubBlockV2::pack | ( | ) |
Pack data.
Definition at line 73 of file CpmRoiSubBlockV2.cxx.
|
inherited |
Pack given data into given number of bits.
Definition at line 302 of file L1CaloSubBlock.cxx.
|
inherited |
Flush the current data word padded with zeros.
Definition at line 331 of file L1CaloSubBlock.cxx.
|
inherited |
Pack given neutral data from given pin.
Definition at line 413 of file L1CaloSubBlock.cxx.
|
inherited |
Pack current G-Link parity bit for given pin.
Definition at line 434 of file L1CaloSubBlock.cxx.
|
private |
Pack neutral data.
Definition at line 115 of file CpmRoiSubBlockV2.cxx.
|
inherited |
Return the parity bit for given data.
Definition at line 291 of file L1CaloSubBlock.cxx.
|
inherited |
Input complete packed sub-block from ROD array.
Definition at line 118 of file L1CaloSubBlock.cxx.
| LVL1::CPMTobRoI LVL1BS::CpmRoiSubBlockV2::roi | ( | int | chip, |
| int | loc, | ||
| int | type ) const |
Return RoI for given chip and location (left/right) and type (em/tau)
Definition at line 63 of file CpmRoiSubBlockV2.cxx.
|
inlineinherited |
Definition at line 253 of file L1CaloSubBlock.h.
|
staticinherited |
Return seqno field from given header word.
Definition at line 513 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Set the Bunch Crossing number (neutral format only)
Definition at line 328 of file L1CaloSubBlock.h.
|
inherited |
Set DAQ FIFO Overflow bit in Sub-status word.
Definition at line 206 of file L1CaloSubBlock.cxx.
|
inherited |
Set G-Link Parity bit in Sub-status word.
Definition at line 217 of file L1CaloSubBlock.cxx.
|
inherited |
Store header data.
Definition at line 99 of file L1CaloSubBlock.cxx.
| void LVL1BS::CpmRoiSubBlockV2::setRoiHeader | ( | int | version, |
| int | crate, | ||
| int | module ) |
Store header.
Definition at line 41 of file CpmRoiSubBlockV2.cxx.
|
inherited |
Store error status trailer.
Definition at line 179 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Set continuous bit streaming for compressed formats.
Definition at line 348 of file L1CaloSubBlock.h.
|
inlineinherited |
Set the unpacking error code.
Definition at line 338 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 258 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 278 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 273 of file L1CaloSubBlock.h.
|
inlineinherited |
Return Sub-status word.
Definition at line 323 of file L1CaloSubBlock.h.
| bool LVL1BS::CpmRoiSubBlockV2::unpack | ( | ) |
Unpack data.
Definition at line 92 of file CpmRoiSubBlockV2.cxx.
|
inherited |
Unpack given number of bits of data.
Definition at line 345 of file L1CaloSubBlock.cxx.
|
inherited |
|
inherited |
Initialise unpacker.
Definition at line 393 of file L1CaloSubBlock.cxx.
|
inherited |
Unpack given number of bits of neutral data for given pin.
Definition at line 445 of file L1CaloSubBlock.cxx.
|
inherited |
Unpack and test G-Link parity bit for given pin.
Definition at line 464 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Return the unpacking error code.
Definition at line 343 of file L1CaloSubBlock.h.
|
inherited |
Return the unpacking error message for printing.
Definition at line 228 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Return unpacker success flag.
Definition at line 354 of file L1CaloSubBlock.h.
|
private |
Unpack neutral data.
Definition at line 143 of file CpmRoiSubBlockV2.cxx.
|
inlineinherited |
Definition at line 298 of file L1CaloSubBlock.h.
|
inlineinherited |
Definition at line 243 of file L1CaloSubBlock.h.
|
staticinherited |
Return version number from given header word.
Definition at line 499 of file L1CaloSubBlock.cxx.
|
inlineinherited |
Definition at line 238 of file L1CaloSubBlock.h.
|
staticinherited |
Return wordID field from given header word.
Definition at line 492 of file L1CaloSubBlock.cxx.
|
staticinherited |
Word identification.
Definition at line 479 of file L1CaloSubBlock.cxx.
|
inherited |
Output complete packed sub-block to ROD vector.
Definition at line 165 of file L1CaloSubBlock.cxx.
|
privateinherited |
Definition at line 214 of file L1CaloSubBlock.h.
|
privateinherited |
Bunch Crossing number (neutral format only)
Definition at line 210 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 215 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 222 of file L1CaloSubBlock.h.
|
privateinherited |
Sub-Block data.
Definition at line 227 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 219 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 220 of file L1CaloSubBlock.h.
|
privateinherited |
Current number of data words.
Definition at line 225 of file L1CaloSubBlock.h.
|
privateinherited |
Sub-Block Header.
Definition at line 206 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 216 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 217 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 223 of file L1CaloSubBlock.h.
|
private |
RoI words.
Definition at line 64 of file CpmRoiSubBlockV2.h.
|
privateinherited |
Sub-Block Status Trailer.
Definition at line 208 of file L1CaloSubBlock.h.
|
privateinherited |
Definition at line 218 of file L1CaloSubBlock.h.
|
privateinherited |
Unpacking error code.
Definition at line 212 of file L1CaloSubBlock.h.
|
privateinherited |
Unpacking masks.
Definition at line 229 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 192 of file L1CaloSubBlock.h.
|
staticprivate |
Definition at line 56 of file CpmRoiSubBlockV2.h.
|
staticprivateinherited |
Definition at line 174 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 182 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 191 of file L1CaloSubBlock.h.
|
staticprivate |
Definition at line 53 of file CpmRoiSubBlockV2.h.
|
staticprivateinherited |
Definition at line 187 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 195 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 172 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 180 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 203 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 189 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 194 of file L1CaloSubBlock.h.
|
staticprivate |
Definition at line 52 of file CpmRoiSubBlockV2.h.
|
staticprivateinherited |
Definition at line 193 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 188 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 161 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 163 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 165 of file L1CaloSubBlock.h.
|
staticprivate |
Definition at line 54 of file CpmRoiSubBlockV2.h.
|
staticprivate |
Definition at line 55 of file CpmRoiSubBlockV2.h.
|
staticprivateinherited |
Definition at line 202 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 198 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 200 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 197 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 199 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 175 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 183 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 168 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 173 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 181 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 177 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 185 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 176 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 184 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 162 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 164 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 166 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 190 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 171 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 179 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 170 of file L1CaloSubBlock.h.
|
staticprivateinherited |
Definition at line 178 of file L1CaloSubBlock.h.
|
staticprivate |
Header word ID.
Definition at line 50 of file CpmRoiSubBlockV2.h.