|
ATLAS Offline Software
|
Sub-Block class for PPM data.
More...
#include <ZdcPpmSubBlock.h>
|
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
} |
|
|
| ZdcPpmSubBlock () |
|
| ~ZdcPpmSubBlock () |
|
void | clear () |
| Clear all data. More...
|
|
void | setPpmHeader (int version, int format, int seqno, int crate, int module, int slicesFadc, int slicesLut) |
| Store PPM header. More...
|
|
void | setPpmErrorHeader (int version, int format, int crate, int module, int slicesFadc, int slicesLut) |
| Store PPM error block header. More...
|
|
int | slicesFadc () const |
|
int | slicesLut () const |
|
void | fillPpmData (int chan, const std::vector< int > &lut, const std::vector< int > &fadc, const std::vector< int > &bcidLut, const std::vector< int > &bcidFadc) |
| Store PPM data for later packing. More...
|
|
void | ppmData (int chan, std::vector< int > &lut, std::vector< int > &fadc, std::vector< int > &bcidLut, std::vector< int > &bcidFadc) const |
| Return unpacked data for given channel. More...
|
|
void | fillPpmError (int chan, int errorWord) |
| Store an error word corresponding to a data channel. More...
|
|
void | fillPpmPinError (int pin, int errorWord) |
| Store an error word corresponding to a G-Link pin. More...
|
|
int | ppmError (int chan) const |
| Return the error word for a data channel. More...
|
|
int | ppmPinError (int pin) const |
| Return the error word for a G-Link pin. More...
|
|
bool | glinkPinParity (int chan) const |
|
bool | fpgaCorrupt (int chan) const |
|
bool | bunchMismatch (int chan) const |
|
bool | eventMismatch (int chan) const |
|
bool | asicFull (int chan) const |
|
bool | timeout (int chan) const |
|
bool | mcmAbsent (int chan) const |
|
bool | channelDisabled (int chan) const |
|
bool | channelDisabledA (int pin) const |
|
bool | channelDisabledB (int pin) const |
|
bool | channelDisabledC (int pin) const |
|
bool | channelDisabledD (int pin) const |
|
bool | glinkPinParity () const |
|
bool | fpgaCorrupt () const |
|
bool | bunchMismatch () const |
|
bool | eventMismatch () const |
|
bool | asicFull () const |
|
bool | timeout () const |
|
bool | mcmAbsent () const |
|
bool | channelDisabledA () const |
|
bool | channelDisabledB () const |
|
bool | channelDisabledC () const |
|
bool | channelDisabledD () const |
|
void | setLutOffset (int offset) |
|
void | setFadcOffset (int offset) |
|
void | setPedestal (int pedval) |
|
void | setFadcBaseline (int baseline) |
|
void | setFadcThreshold (int threshold) |
|
void | setRunNumber (int run) |
|
int | lutOffset () const |
|
int | fadcOffset () const |
|
int | pedestal () const |
|
int | fadcBaseline () const |
|
int | fadcThreshold () const |
|
int | runNumber () const |
|
int | getPpmChannel (const int channel) const |
|
bool | pack () |
| Pack data. More...
|
|
bool | unpack () |
| Unpack data. More...
|
|
int | channelsPerSubBlock () const |
|
void | setCompStats (const std::vector< uint32_t > &stats) |
| Set compression stats. More...
|
|
const std::vector< uint32_t > & | compStats () const |
| Return reference to compression stats. 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 | write (FullEventAssembler< ZdcSrcIdMap >::RODDATA *theROD) const |
| Output complete packed sub-block to ROD vector. More...
|
|
void | setStatus (uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity) |
| Store error status trailer. More...
|
|
void | setDaqOverflow (int bit=1) |
| Set DAQ FIFO Overflow bit in Sub-status word. More...
|
|
void | setGlinkParity (int bit=1) |
| Set G-Link Parity bit in Sub-status word. More...
|
|
void | setUnpackErrorCode (int code) |
| Set the unpacking error code. More...
|
|
int | unpackErrorCode () const |
| Return the unpacking error code. More...
|
|
std::string | unpackErrorMsg () const |
| Return the unpacking error message for printing. More...
|
|
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...
|
|
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...
|
|
Sub-Block class for PPM data.
- Author
- Peter Faulkner
This may be link to the equivalent in LVL1 code, TRY_LINK_LVL1 Marco Leite
Definition at line 30 of file ZdcPpmSubBlock.h.
◆ DataFormats
Enumerator |
---|
NEUTRAL | |
UNCOMPRESSED | |
COMPRESSED | |
SUPERCOMPRESSED | |
Definition at line 41 of file ZdcSubBlock.h.
◆ SubBlockWordType
◆ UnpackErrorType
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.
◆ ZdcPpmSubBlock()
ZdcPpmSubBlock::ZdcPpmSubBlock |
( |
| ) |
|
◆ ~ZdcPpmSubBlock()
ZdcPpmSubBlock::~ZdcPpmSubBlock |
( |
| ) |
|
◆ asic()
int ZdcPpmSubBlock::asic |
( |
int |
chan | ) |
const |
|
inlineprivate |
Return the ASIC channel corresponding to a data channel.
Definition at line 399 of file ZdcPpmSubBlock.h.
◆ asicFull() [1/2]
bool ZdcPpmSubBlock::asicFull |
( |
| ) |
const |
|
inline |
◆ asicFull() [2/2]
bool ZdcPpmSubBlock::asicFull |
( |
int |
chan | ) |
const |
|
inline |
◆ bcnMismatch()
bool ZdcSubBlock::bcnMismatch |
( |
| ) |
const |
|
inlineinherited |
◆ bunchCrossing()
int ZdcSubBlock::bunchCrossing |
( |
| ) |
const |
|
inlineinherited |
Return the Bunch Crossing number (neutral format only)
Definition at line 335 of file ZdcSubBlock.h.
◆ bunchMismatch() [1/2]
bool ZdcPpmSubBlock::bunchMismatch |
( |
| ) |
const |
|
inline |
◆ bunchMismatch() [2/2]
bool ZdcPpmSubBlock::bunchMismatch |
( |
int |
chan | ) |
const |
|
inline |
◆ channelDisabled()
bool ZdcPpmSubBlock::channelDisabled |
( |
int |
chan | ) |
const |
|
inline |
◆ channelDisabledA() [1/2]
bool ZdcPpmSubBlock::channelDisabledA |
( |
| ) |
const |
|
inline |
◆ channelDisabledA() [2/2]
bool ZdcPpmSubBlock::channelDisabledA |
( |
int |
pin | ) |
const |
|
inline |
◆ channelDisabledB() [1/2]
bool ZdcPpmSubBlock::channelDisabledB |
( |
| ) |
const |
|
inline |
◆ channelDisabledB() [2/2]
bool ZdcPpmSubBlock::channelDisabledB |
( |
int |
pin | ) |
const |
|
inline |
◆ channelDisabledC() [1/2]
bool ZdcPpmSubBlock::channelDisabledC |
( |
| ) |
const |
|
inline |
◆ channelDisabledC() [2/2]
bool ZdcPpmSubBlock::channelDisabledC |
( |
int |
pin | ) |
const |
|
inline |
◆ channelDisabledD() [1/2]
bool ZdcPpmSubBlock::channelDisabledD |
( |
| ) |
const |
|
inline |
◆ channelDisabledD() [2/2]
bool ZdcPpmSubBlock::channelDisabledD |
( |
int |
pin | ) |
const |
|
inline |
◆ channelsPerSubBlock() [1/2]
int ZdcPpmSubBlock::channelsPerSubBlock |
( |
| ) |
const |
◆ channelsPerSubBlock() [2/2]
int ZdcPpmSubBlock::channelsPerSubBlock |
( |
int |
version, |
|
|
int |
format |
|
) |
| |
|
static |
◆ clear()
void ZdcPpmSubBlock::clear |
( |
| ) |
|
◆ compStats()
const std::vector< uint32_t > & ZdcPpmSubBlock::compStats |
( |
| ) |
const |
|
inline |
◆ crate()
int ZdcSubBlock::crate |
( |
| ) |
const |
|
inlineinherited |
◆ daqOverflow()
bool ZdcSubBlock::daqOverflow |
( |
| ) |
const |
|
inlineinherited |
◆ dataWords()
int ZdcSubBlock::dataWords |
( |
| ) |
const |
|
inlineinherited |
◆ errorBit() [1/2]
bool ZdcPpmSubBlock::errorBit |
( |
int |
bit | ) |
const |
|
private |
◆ errorBit() [2/2]
bool ZdcPpmSubBlock::errorBit |
( |
int |
pin, |
|
|
int |
bit |
|
) |
| const |
|
inlineprivate |
◆ errorBlock()
bool ZdcPpmSubBlock::errorBlock |
( |
uint32_t |
word | ) |
|
|
static |
◆ eventMismatch() [1/2]
bool ZdcPpmSubBlock::eventMismatch |
( |
| ) |
const |
|
inline |
◆ eventMismatch() [2/2]
bool ZdcPpmSubBlock::eventMismatch |
( |
int |
chan | ) |
const |
|
inline |
◆ fadcBaseline()
int ZdcPpmSubBlock::fadcBaseline |
( |
| ) |
const |
|
inline |
◆ fadcOffset()
int ZdcPpmSubBlock::fadcOffset |
( |
| ) |
const |
|
inline |
◆ fadcThreshold()
int ZdcPpmSubBlock::fadcThreshold |
( |
| ) |
const |
|
inline |
◆ failingBCN()
uint32_t ZdcSubBlock::failingBCN |
( |
| ) |
const |
|
inlineinherited |
◆ fillPpmData()
void ZdcPpmSubBlock::fillPpmData |
( |
int |
chan, |
|
|
const std::vector< int > & |
lut, |
|
|
const std::vector< int > & |
fadc, |
|
|
const std::vector< int > & |
bcidLut, |
|
|
const std::vector< int > & |
bcidFadc |
|
) |
| |
Store PPM data for later packing.
Definition at line 129 of file ZdcPpmSubBlock.cxx.
136 const int slices = sliceL + sliceF;
138 if (chanPerSubBlock == 0) {
157 const int adc = (fadc[
pos] > 0) ? fadc[
pos] : 0;
◆ fillPpmError()
void ZdcPpmSubBlock::fillPpmError |
( |
int |
chan, |
|
|
int |
errorWord |
|
) |
| |
◆ fillPpmPinError()
void ZdcPpmSubBlock::fillPpmPinError |
( |
int |
pin, |
|
|
int |
errorWord |
|
) |
| |
◆ format() [1/2]
int ZdcSubBlock::format |
( |
| ) |
const |
|
inlineinherited |
◆ format() [2/2]
int ZdcSubBlock::format |
( |
uint32_t |
word | ) |
|
|
staticinherited |
Return data format from given header word.
Definition at line 441 of file ZdcSubBlock.cxx.
◆ fpgaCorrupt() [1/2]
bool ZdcPpmSubBlock::fpgaCorrupt |
( |
| ) |
const |
|
inline |
◆ fpgaCorrupt() [2/2]
bool ZdcPpmSubBlock::fpgaCorrupt |
( |
int |
chan | ) |
const |
|
inline |
◆ getPpmChannel()
int ZdcPpmSubBlock::getPpmChannel |
( |
const int |
channel | ) |
const |
|
inline |
◆ glinkDown()
bool ZdcSubBlock::glinkDown |
( |
| ) |
const |
|
inlineinherited |
◆ glinkParity()
bool ZdcSubBlock::glinkParity |
( |
| ) |
const |
|
inlineinherited |
◆ glinkPinParity() [1/2]
bool ZdcPpmSubBlock::glinkPinParity |
( |
| ) |
const |
|
inline |
◆ glinkPinParity() [2/2]
bool ZdcPpmSubBlock::glinkPinParity |
( |
int |
chan | ) |
const |
|
inline |
◆ glinkProtocol()
bool ZdcSubBlock::glinkProtocol |
( |
| ) |
const |
|
inlineinherited |
◆ glinkTimeout()
bool ZdcSubBlock::glinkTimeout |
( |
| ) |
const |
|
inlineinherited |
◆ lutOffset()
int ZdcPpmSubBlock::lutOffset |
( |
| ) |
const |
|
inline |
◆ mcmAbsent() [1/2]
bool ZdcPpmSubBlock::mcmAbsent |
( |
| ) |
const |
|
inline |
◆ mcmAbsent() [2/2]
bool ZdcPpmSubBlock::mcmAbsent |
( |
int |
chan | ) |
const |
|
inline |
◆ minBits()
int ZdcSubBlock::minBits |
( |
uint32_t |
datum | ) |
|
|
staticinherited |
Return the minimum number of bits needed for given data.
Definition at line 245 of file ZdcSubBlock.cxx.
247 const int maxBits = 32;
249 for (
int i = 0;
i < maxBits; ++
i) {
250 if ( !(datum >>
i)) {
◆ module() [1/2]
int ZdcSubBlock::module |
( |
| ) |
const |
|
inlineinherited |
◆ module() [2/2]
int ZdcSubBlock::module |
( |
uint32_t |
word | ) |
|
|
staticinherited |
Return module field from given header word.
Definition at line 455 of file ZdcSubBlock.cxx.
◆ pack()
bool ZdcPpmSubBlock::pack |
( |
| ) |
|
◆ packer()
void ZdcSubBlock::packer |
( |
uint32_t |
datum, |
|
|
int |
nbits |
|
) |
| |
|
inherited |
Pack given data into given number of bits.
Definition at line 271 of file ZdcSubBlock.cxx.
275 for (
int i = 1;
i < nbits; ++
i)
mask |= (
mask << 1);
◆ packerFlush()
void ZdcSubBlock::packerFlush |
( |
| ) |
|
|
inherited |
Flush the current data word padded with zeros.
Definition at line 296 of file ZdcSubBlock.cxx.
◆ packerNeutral()
void ZdcSubBlock::packerNeutral |
( |
int |
pin, |
|
|
uint32_t |
datum, |
|
|
int |
nbits |
|
) |
| |
|
inherited |
Pack given neutral data from given pin.
Definition at line 364 of file ZdcSubBlock.cxx.
367 if (pin >= 0 && pin < s_maxPins && nbits > 0) {
372 for (
int bit = 0; bit < nbits; ++bit) {
◆ packerNeutralParity()
void ZdcSubBlock::packerNeutralParity |
( |
int |
pin | ) |
|
|
inherited |
Pack current G-Link parity bit for given pin.
Definition at line 382 of file ZdcSubBlock.cxx.
◆ packNeutral()
bool ZdcPpmSubBlock::packNeutral |
( |
| ) |
|
|
private |
◆ packUncompressedData()
bool ZdcPpmSubBlock::packUncompressedData |
( |
| ) |
|
|
private |
◆ packUncompressedErrors()
bool ZdcPpmSubBlock::packUncompressedErrors |
( |
| ) |
|
|
private |
◆ parityBit()
int ZdcSubBlock::parityBit |
( |
int |
init, |
|
|
uint32_t |
datum, |
|
|
int |
nbits |
|
) |
| |
|
staticinherited |
Return the parity bit for given data.
Definition at line 260 of file ZdcSubBlock.cxx.
265 for (
int bit = 0; bit < nbits; ++bit) parity ^= (datum >> bit) & 0x1;
◆ pedestal()
int ZdcPpmSubBlock::pedestal |
( |
| ) |
const |
|
inline |
◆ pin()
int ZdcPpmSubBlock::pin |
( |
int |
chan | ) |
const |
|
inlineprivate |
Return the G-Link pin corresponding to a data channel.
Definition at line 404 of file ZdcPpmSubBlock.h.
◆ ppmData()
void ZdcPpmSubBlock::ppmData |
( |
int |
chan, |
|
|
std::vector< int > & |
lut, |
|
|
std::vector< int > & |
fadc, |
|
|
std::vector< int > & |
bcidLut, |
|
|
std::vector< int > & |
bcidFadc |
|
) |
| const |
Return unpacked data for given channel.
Definition at line 167 of file ZdcPpmSubBlock.cxx.
200 bcidLut.resize(sliceL);
201 bcidFadc.resize(sliceF);
◆ ppmError()
int ZdcPpmSubBlock::ppmError |
( |
int |
chan | ) |
const |
◆ ppmPinError()
int ZdcPpmSubBlock::ppmPinError |
( |
int |
pin | ) |
const |
◆ read()
Input complete packed sub-block from ROD array.
Definition at line 121 of file ZdcSubBlock.cxx.
129 for (;
pos != pose; ++
pos) {
◆ runNumber()
int ZdcPpmSubBlock::runNumber |
( |
| ) |
const |
|
inline |
◆ seqno() [1/2]
int ZdcSubBlock::seqno |
( |
| ) |
const |
|
inlineinherited |
◆ seqno() [2/2]
int ZdcSubBlock::seqno |
( |
uint32_t |
word | ) |
|
|
staticinherited |
Return seqno field from given header word.
Definition at line 448 of file ZdcSubBlock.cxx.
◆ setBunchCrossing()
void ZdcSubBlock::setBunchCrossing |
( |
int |
bc | ) |
|
|
inlineinherited |
Set the Bunch Crossing number (neutral format only)
Definition at line 330 of file ZdcSubBlock.h.
◆ setCompStats()
void ZdcPpmSubBlock::setCompStats |
( |
const std::vector< uint32_t > & |
stats | ) |
|
|
inline |
◆ setDaqOverflow()
void ZdcSubBlock::setDaqOverflow |
( |
int |
bit = 1 | ) |
|
|
inherited |
Set DAQ FIFO Overflow bit in Sub-status word.
Definition at line 186 of file ZdcSubBlock.cxx.
190 else setStatus(0,
false,
false,
false,
true,
false,
false,
false);
◆ setFadcBaseline()
void ZdcPpmSubBlock::setFadcBaseline |
( |
int |
baseline | ) |
|
|
inline |
◆ setFadcOffset()
void ZdcPpmSubBlock::setFadcOffset |
( |
int |
offset | ) |
|
|
inline |
◆ setFadcThreshold()
void ZdcPpmSubBlock::setFadcThreshold |
( |
int |
threshold | ) |
|
|
inline |
◆ setGlinkParity()
void ZdcSubBlock::setGlinkParity |
( |
int |
bit = 1 | ) |
|
|
inherited |
◆ setHeader()
void ZdcSubBlock::setHeader |
( |
int |
wordId, |
|
|
int |
version, |
|
|
int |
format, |
|
|
int |
seqno, |
|
|
int |
crate, |
|
|
int |
module, |
|
|
int |
slices2, |
|
|
int |
slices1 |
|
) |
| |
|
inherited |
◆ setLutOffset()
void ZdcPpmSubBlock::setLutOffset |
( |
int |
offset | ) |
|
|
inline |
◆ setPedestal()
void ZdcPpmSubBlock::setPedestal |
( |
int |
pedval | ) |
|
|
inline |
◆ setPpmErrorHeader()
void ZdcPpmSubBlock::setPpmErrorHeader |
( |
int |
version, |
|
|
int |
format, |
|
|
int |
crate, |
|
|
int |
module, |
|
|
int |
slicesFadc, |
|
|
int |
slicesLut |
|
) |
| |
◆ setPpmHeader()
void ZdcPpmSubBlock::setPpmHeader |
( |
int |
version, |
|
|
int |
format, |
|
|
int |
seqno, |
|
|
int |
crate, |
|
|
int |
module, |
|
|
int |
slicesFadc, |
|
|
int |
slicesLut |
|
) |
| |
◆ setRunNumber()
void ZdcPpmSubBlock::setRunNumber |
( |
int |
run | ) |
|
|
inline |
◆ setStatus()
void ZdcSubBlock::setStatus |
( |
uint32_t |
failingBCN, |
|
|
bool |
glinkTimeout, |
|
|
bool |
glinkDown, |
|
|
bool |
upstreamError, |
|
|
bool |
daqOverflow, |
|
|
bool |
bcnMismatch, |
|
|
bool |
glinkProtocol, |
|
|
bool |
glinkParity |
|
) |
| |
|
inherited |
◆ setStreamed()
void ZdcSubBlock::setStreamed |
( |
| ) |
|
|
inlineinherited |
Set continuous bit streaming for compressed formats.
Definition at line 350 of file ZdcSubBlock.h.
◆ setUnpackErrorCode()
void ZdcSubBlock::setUnpackErrorCode |
( |
int |
code | ) |
|
|
inlineinherited |
◆ slice()
int ZdcSubBlock::slice |
( |
| ) |
const |
|
inlineinherited |
◆ slices1()
int ZdcSubBlock::slices1 |
( |
| ) |
const |
|
inlineinherited |
◆ slices2()
int ZdcSubBlock::slices2 |
( |
| ) |
const |
|
inlineinherited |
◆ slicesFadc()
int ZdcPpmSubBlock::slicesFadc |
( |
| ) |
const |
◆ slicesLut()
int ZdcPpmSubBlock::slicesLut |
( |
| ) |
const |
◆ subStatus()
uint32_t ZdcSubBlock::subStatus |
( |
| ) |
const |
|
inlineinherited |
◆ timeout() [1/2]
bool ZdcPpmSubBlock::timeout |
( |
| ) |
const |
|
inline |
◆ timeout() [2/2]
bool ZdcPpmSubBlock::timeout |
( |
int |
chan | ) |
const |
|
inline |
◆ unpack()
bool ZdcPpmSubBlock::unpack |
( |
| ) |
|
◆ unpacker()
uint32_t ZdcSubBlock::unpacker |
( |
int |
nbits | ) |
|
|
inherited |
Unpack given number of bits of data.
Definition at line 309 of file ZdcSubBlock.cxx.
317 int nbitsDone = nbits;
322 for (
int i = 1;
i < nbitsDone; ++
i)
mask |= (
mask << 1);
334 const int bitsLeft = nbits - nbitsDone;
341 for (
int i = 1;
i < bitsLeft; ++
i)
mask |= (
mask << 1);
◆ unpackerInit()
void ZdcSubBlock::unpackerInit |
( |
| ) |
|
|
inherited |
◆ unpackerNeutral()
uint32_t ZdcSubBlock::unpackerNeutral |
( |
int |
pin, |
|
|
int |
nbits |
|
) |
| |
|
inherited |
Unpack given number of bits of neutral data for given pin.
Definition at line 392 of file ZdcSubBlock.cxx.
395 if (pin >= 0 && pin < s_maxPins && nbits > 0
397 for (
int bit = 0; bit < nbits; ++bit) {
◆ unpackerNeutralParityError()
bool ZdcSubBlock::unpackerNeutralParityError |
( |
int |
pin | ) |
|
|
inherited |
Unpack and test G-Link parity bit for given pin.
Definition at line 408 of file ZdcSubBlock.cxx.
415 error = !(bit == parity);
◆ unpackErrorCode()
int ZdcSubBlock::unpackErrorCode |
( |
| ) |
const |
|
inlineinherited |
◆ unpackErrorMsg()
std::string ZdcSubBlock::unpackErrorMsg |
( |
| ) |
const |
|
inherited |
Return the unpacking error message for printing.
Definition at line 206 of file ZdcSubBlock.cxx.
214 msg =
"Unsupported Data Version";
217 msg =
"Unsupported Data Format";
220 msg =
"Unsupported Compression Version";
223 msg =
"Unsupported Number of Slices for Compression Version";
226 msg =
"Premature End of Sub-block Data";
229 msg =
"Invalid Source ID in Sub-block Data";
232 msg =
"Invalid Word ID in Sub-block Data";
235 msg =
"Unknown Error Code";
◆ unpackerSuccess()
bool ZdcSubBlock::unpackerSuccess |
( |
| ) |
const |
|
inlineinherited |
◆ unpackNeutral()
bool ZdcPpmSubBlock::unpackNeutral |
( |
| ) |
|
|
private |
◆ unpackUncompressedData()
bool ZdcPpmSubBlock::unpackUncompressedData |
( |
| ) |
|
|
private |
◆ unpackUncompressedErrors()
bool ZdcPpmSubBlock::unpackUncompressedErrors |
( |
| ) |
|
|
private |
◆ upstreamError()
bool ZdcSubBlock::upstreamError |
( |
| ) |
const |
|
inlineinherited |
◆ version()
int ZdcSubBlock::version |
( |
| ) |
const |
|
inlineinherited |
◆ wordId() [1/2]
int ZdcSubBlock::wordId |
( |
| ) |
const |
|
inlineinherited |
◆ wordId() [2/2]
int ZdcSubBlock::wordId |
( |
uint32_t |
word | ) |
|
|
staticinherited |
Return wordID field from given header word.
Definition at line 434 of file ZdcSubBlock.cxx.
◆ wordType()
◆ write()
Output complete packed sub-block to ROD vector.
Definition at line 147 of file ZdcSubBlock.cxx.
151 std::vector<uint32_t>::const_iterator
pos;
153 theROD->push_back(*
pos);
◆ m_bitword
uint32_t ZdcSubBlock::m_bitword |
|
privateinherited |
◆ m_bunchCrossing
int ZdcSubBlock::m_bunchCrossing |
|
privateinherited |
Bunch Crossing number (neutral format only)
Definition at line 214 of file ZdcSubBlock.h.
◆ m_compStats
std::vector<uint32_t> ZdcPpmSubBlock::m_compStats |
|
private |
◆ m_currentBit
int ZdcSubBlock::m_currentBit |
|
privateinherited |
◆ m_currentPinBit
std::vector<int> ZdcSubBlock::m_currentPinBit |
|
privateinherited |
◆ m_data
std::vector<uint32_t> ZdcSubBlock::m_data |
|
privateinherited |
◆ m_datamap
std::vector<uint32_t> ZdcPpmSubBlock::m_datamap |
|
private |
◆ m_dataPos
std::vector<uint32_t>::const_iterator ZdcSubBlock::m_dataPos |
|
privateinherited |
◆ m_dataPosEnd
std::vector<uint32_t>::const_iterator ZdcSubBlock::m_dataPosEnd |
|
privateinherited |
◆ m_dataWords
int ZdcSubBlock::m_dataWords |
|
privateinherited |
◆ m_errormap
std::vector<uint32_t> ZdcPpmSubBlock::m_errormap |
|
private |
◆ m_fadcBaseline
int ZdcPpmSubBlock::m_fadcBaseline |
|
private |
◆ m_fadcOffset
int ZdcPpmSubBlock::m_fadcOffset |
|
private |
◆ m_fadcThreshold
int ZdcPpmSubBlock::m_fadcThreshold |
|
private |
◆ m_globalError
uint32_t ZdcPpmSubBlock::m_globalError |
|
private |
◆ m_header
uint32_t ZdcSubBlock::m_header |
|
privateinherited |
◆ m_lutOffset
int ZdcPpmSubBlock::m_lutOffset |
|
private |
◆ m_maxBits
int ZdcSubBlock::m_maxBits |
|
privateinherited |
◆ m_maxMask
uint32_t ZdcSubBlock::m_maxMask |
|
privateinherited |
◆ m_oddParity
std::vector<int> ZdcSubBlock::m_oddParity |
|
privateinherited |
◆ m_pedestal
int ZdcPpmSubBlock::m_pedestal |
|
private |
◆ m_runNumber
int ZdcPpmSubBlock::m_runNumber |
|
private |
◆ m_trailer
uint32_t ZdcSubBlock::m_trailer |
|
privateinherited |
◆ m_unpackerFlag
bool ZdcSubBlock::m_unpackerFlag |
|
privateinherited |
◆ m_unpackError
int ZdcSubBlock::m_unpackError |
|
privateinherited |
◆ s_asicChannels
const int ZdcPpmSubBlock::s_asicChannels = 4 |
|
staticprivate |
◆ s_asicFullBit
const int ZdcPpmSubBlock::s_asicFullBit = 6 |
|
staticprivate |
◆ s_bcidFadcBit
const int ZdcPpmSubBlock::s_bcidFadcBit = 0 |
|
staticprivate |
◆ s_bcidFadcMask
const uint32_t ZdcPpmSubBlock::s_bcidFadcMask = 0x1 |
|
staticprivate |
◆ s_bcidLutBit
const int ZdcPpmSubBlock::s_bcidLutBit = 8 |
|
staticprivate |
◆ s_bcidLutMask
const uint32_t ZdcPpmSubBlock::s_bcidLutMask = 0x7 |
|
staticprivate |
◆ s_bcnMismatchBit
const int ZdcSubBlock::s_bcnMismatchBit = 2 |
|
staticprivateinherited |
◆ s_bunchCrossingBits
const int ZdcPpmSubBlock::s_bunchCrossingBits = 12 |
|
staticprivate |
◆ s_bunchMismatchBit
const int ZdcPpmSubBlock::s_bunchMismatchBit = 8 |
|
staticprivate |
◆ s_channelDisabledBit
const int ZdcPpmSubBlock::s_channelDisabledBit = 0 |
|
staticprivate |
◆ s_channels
const int ZdcPpmSubBlock::s_channels = 64 |
|
staticprivate |
◆ s_crateBit
const int ZdcSubBlock::s_crateBit = 12 |
|
staticprivateinherited |
◆ s_crateMask
const uint32_t ZdcSubBlock::s_crateMask = 0xf |
|
staticprivateinherited |
◆ s_daqOverflowBit
const int ZdcSubBlock::s_daqOverflowBit = 3 |
|
staticprivateinherited |
◆ s_dataBits
const int ZdcPpmSubBlock::s_dataBits = 11 |
|
staticprivate |
◆ s_errorBits
const int ZdcPpmSubBlock::s_errorBits = 10 |
|
staticprivate |
◆ s_errorMarker
const int ZdcPpmSubBlock::s_errorMarker = 63 |
|
staticprivate |
◆ s_errorMask
const uint32_t ZdcPpmSubBlock::s_errorMask = 0x7ff |
|
staticprivate |
◆ s_eventMismatchBit
const int ZdcPpmSubBlock::s_eventMismatchBit = 7 |
|
staticprivate |
◆ s_fadcBit
const int ZdcPpmSubBlock::s_fadcBit = 1 |
|
staticprivate |
◆ s_fadcMask
const uint32_t ZdcPpmSubBlock::s_fadcMask = 0x3ff |
|
staticprivate |
◆ s_failingBcnBit
const int ZdcSubBlock::s_failingBcnBit = 22 |
|
staticprivateinherited |
◆ s_failingBcnMask
const uint32_t ZdcSubBlock::s_failingBcnMask = 0x3f |
|
staticprivateinherited |
◆ s_formatBit
const int ZdcSubBlock::s_formatBit = 22 |
|
staticprivateinherited |
◆ s_formatMask
const uint32_t ZdcSubBlock::s_formatMask = 0x7 |
|
staticprivateinherited |
◆ s_fpgaCorruptBit
const int ZdcPpmSubBlock::s_fpgaCorruptBit = 9 |
|
staticprivate |
◆ s_glinkDavSet
const uint32_t ZdcSubBlock::s_glinkDavSet = 0x400000 |
|
staticprivateinherited |
◆ s_glinkDownBit
const int ZdcSubBlock::s_glinkDownBit = 6 |
|
staticprivateinherited |
◆ s_glinkParityBit
const int ZdcSubBlock::s_glinkParityBit = 0 |
|
staticprivateinherited |
◆ s_glinkPinParityBit
const int ZdcPpmSubBlock::s_glinkPinParityBit = 10 |
|
staticprivate |
◆ s_glinkPins
const int ZdcPpmSubBlock::s_glinkPins = 16 |
|
staticprivate |
◆ s_glinkProtocolBit
const int ZdcSubBlock::s_glinkProtocolBit = 1 |
|
staticprivateinherited |
◆ s_glinkTimeoutBit
const int ZdcSubBlock::s_glinkTimeoutBit = 7 |
|
staticprivateinherited |
◆ s_headerBit
const int ZdcSubBlock::s_headerBit = 30 |
|
staticprivateinherited |
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.
◆ s_headerMask
const uint32_t ZdcSubBlock::s_headerMask = 0x3 |
|
staticprivateinherited |
◆ s_headerVal
const uint32_t ZdcSubBlock::s_headerVal = 0x3 |
|
staticprivateinherited |
◆ s_lutBit
const int ZdcPpmSubBlock::s_lutBit = 0 |
|
staticprivate |
◆ s_lutMask
const uint32_t ZdcPpmSubBlock::s_lutMask = 0xff |
|
staticprivate |
◆ s_maxPins
const int ZdcSubBlock::s_maxPins = 20 |
|
staticprivateinherited |
◆ s_maxStreamedBits
const int ZdcSubBlock::s_maxStreamedBits = 31 |
|
staticprivateinherited |
◆ s_maxStreamedMask
const uint32_t ZdcSubBlock::s_maxStreamedMask = 0x7fffffff |
|
staticprivateinherited |
◆ s_maxWordBits
const int ZdcSubBlock::s_maxWordBits = 32 |
|
staticprivateinherited |
◆ s_maxWordMask
const uint32_t ZdcSubBlock::s_maxWordMask = 0xffffffff |
|
staticprivateinherited |
◆ s_mcmAbsentBit
const int ZdcPpmSubBlock::s_mcmAbsentBit = 4 |
|
staticprivate |
◆ s_moduleBit
const int ZdcSubBlock::s_moduleBit = 8 |
|
staticprivateinherited |
◆ s_moduleMask
const uint32_t ZdcSubBlock::s_moduleMask = 0xf |
|
staticprivateinherited |
◆ s_ppmChannel
const int ZdcPpmSubBlock::s_ppmChannel |
|
staticprivate |
Initial value:= {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60,
3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63,
1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61,
2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 }
Definition at line 164 of file ZdcPpmSubBlock.h.
◆ s_seqnoBit
const int ZdcSubBlock::s_seqnoBit = 16 |
|
staticprivateinherited |
◆ s_seqnoMask
const uint32_t ZdcSubBlock::s_seqnoMask = 0x3f |
|
staticprivateinherited |
◆ s_slices1Bit
const int ZdcSubBlock::s_slices1Bit = 0 |
|
staticprivateinherited |
◆ s_slices1Mask
const uint32_t ZdcSubBlock::s_slices1Mask = 0x7 |
|
staticprivateinherited |
◆ s_slices2Bit
const int ZdcSubBlock::s_slices2Bit = 3 |
|
staticprivateinherited |
◆ s_slices2Mask
const uint32_t ZdcSubBlock::s_slices2Mask = 0x1f |
|
staticprivateinherited |
◆ s_statusBit
const int ZdcSubBlock::s_statusBit = 28 |
|
staticprivateinherited |
◆ s_statusMask
const uint32_t ZdcSubBlock::s_statusMask = 0x1 |
|
staticprivateinherited |
◆ s_statusVal
const uint32_t ZdcSubBlock::s_statusVal = 0x1 |
|
staticprivateinherited |
◆ s_timeoutBit
const int ZdcPpmSubBlock::s_timeoutBit = 5 |
|
staticprivate |
◆ s_upstreamErrorBit
const int ZdcSubBlock::s_upstreamErrorBit = 4 |
|
staticprivateinherited |
◆ s_versionBit
const int ZdcSubBlock::s_versionBit = 25 |
|
staticprivateinherited |
◆ s_versionMask
const uint32_t ZdcSubBlock::s_versionMask = 0x7 |
|
staticprivateinherited |
◆ s_wordIdBit
const int ZdcSubBlock::s_wordIdBit = 28 |
|
staticprivateinherited |
◆ s_wordIdMask
const uint32_t ZdcSubBlock::s_wordIdMask = 0xf |
|
staticprivateinherited |
◆ s_wordIdVal
const uint32_t ZdcPpmSubBlock::s_wordIdVal = 0xc |
|
staticprivate |
Sub-Block class for PPM data.
This may be link to the equivalent in LVL1 code, TRY_LINK_LVL1 Marco Leite
Definition at line 135 of file ZdcPpmSubBlock.h.
◆ s_wordLen
const int ZdcPpmSubBlock::s_wordLen = 16 |
|
staticprivate |
The documentation for this class was generated from the following files:
int asic(int chan) const
Return the ASIC channel corresponding to a data channel.
static const uint32_t s_bcidLutMask
uint32_t m_trailer
Sub-Block Status Trailer.
bool unpackNeutral()
Unpack neutral data.
static const int s_bunchMismatchBit
bool glinkTimeout() const
void unpackerInit()
Initialise unpacker.
std::vector< uint32_t > m_data
Sub-Block data.
bool glinkProtocol() const
std::vector< uint32_t >::const_iterator m_dataPosEnd
static const uint32_t s_seqnoMask
bool packNeutral()
Pack neutral data.
static const uint32_t s_glinkDavSet
static const int s_wordIdBit
uint32_t unpackerNeutral(int pin, int nbits)
Unpack given number of bits of neutral data for given pin.
static const int s_fadcBit
void setUnpackErrorCode(int code)
Set the unpacking error code.
int m_bunchCrossing
Bunch Crossing number (neutral format only)
static const int s_glinkPins
static const int s_formatBit
static const int s_bcidFadcBit
static const int s_maxStreamedBits
static const uint32_t s_maxStreamedMask
bool unpackUncompressedErrors()
Unpack uncompressed error data.
static const uint32_t s_wordIdVal
Sub-Block class for PPM data.
static const int s_upstreamErrorBit
static const int s_fpgaCorruptBit
bool packUncompressedErrors()
Pack uncompressed error data.
std::vector< uint32_t > m_errormap
Vector for intermediate error 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.
bool upstreamError() const
static const int s_lutBit
int run(int argc, char *argv[])
static const uint32_t s_statusMask
static const int s_statusBit
std::vector< int > m_oddParity
static const int s_errorMarker
static const int s_glinkTimeoutBit
int m_dataWords
Current number of data words.
std::vector< int > m_currentPinBit
static const int s_glinkParityBit
static const uint32_t s_bcidFadcMask
bool unpackerNeutralParityError(int pin)
Unpack and test G-Link parity bit for given pin.
void packerFlush()
Flush the current data word padded with zeros.
constexpr auto lut(Generator &&f)
static const uint32_t s_fadcMask
static const int s_slices1Bit
static SubBlockWordType wordType(uint32_t word)
Word identification.
static const uint32_t s_crateMask
static const uint32_t s_versionMask
static const int s_versionBit
bool channelDisabled(int chan) const
const DataType * PointerType
static const uint32_t s_failingBcnMask
uint32_t m_header
Sub-Block Header.
static const uint32_t s_errorMask
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
static const int s_channels
@ UNPACK_COMPRESSION_VERSION
static const uint32_t s_headerVal
static const int s_errorBits
static const int s_wordLen
static const int s_bcnMismatchBit
void setStatus(uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity)
Store error status trailer.
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.
static const uint32_t s_statusVal
int m_unpackError
Unpacking error code.
@ UNPACK_COMPRESSION_SLICES
static const int s_timeoutBit
static const int s_slices2Bit
static const int s_glinkProtocolBit
std::vector< uint32_t > m_datamap
Vector for intermediate data.
int channelsPerSubBlock() const
static const int s_crateBit
static const int s_maxPins
static const int s_channelDisabledBit
static const int s_glinkPinParityBit
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.
std::vector< uint32_t > m_compStats
Vector for compression statistics.
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)
static const int s_bunchCrossingBits
static const int s_asicFullBit
uint32_t failingBCN() const
def init(v_theApp, v_rootStream=None)
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
int pin(int chan) const
Return the G-Link pin corresponding to a data channel.
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
static const int s_headerBit
ZdcSubBlock.cxx this is a base class derived (copyed) from LVL1 I do not think we need this this way;...
static const int s_daqOverflowBit
static bool pack(ZdcPpmSubBlock &subBlock)
Pack data.
static const int s_bcidLutBit
bool unpackerSuccess() const
Return unpacker success flag.
static const uint32_t s_slices2Mask
static const int s_ppmChannel[]
static const uint32_t s_lutMask
static const uint32_t s_moduleMask
static const uint32_t s_slices1Mask
static const int s_asicChannels
static const int s_moduleBit
bool errorBit(int pin, int bit) const
Error bit extraction.
std::vector< uint32_t >::const_iterator m_dataPos
static const int s_glinkDownBit
static bool unpack(ZdcPpmSubBlock &subBlock)
Unpack data.
bool unpackUncompressedData()
Unpack uncompressed data.
static int parityBit(int init, uint32_t datum, int nbits)
Return the parity bit for given data.
static const uint32_t s_formatMask
static const int s_seqnoBit
static const int s_mcmAbsentBit
static const uint32_t s_wordIdMask
static const int s_failingBcnBit
static const uint32_t s_headerMask
bool packUncompressedData()
Pack uncompressed data.
void clear()
Clear all data.
static const int s_dataBits
static const int s_eventMismatchBit