|
ATLAS Offline Software
|
Go to the documentation of this file.
52 const int ZdcPpmSubBlock::s_ppmChannel[64] = {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60,
53 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63,
54 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61,
55 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 };
88 const int seqno,
const int crate,
89 const int module,
const int slicesFadc,
99 const int crate,
const int module,
100 const int slicesFadc,
const int slicesLut)
130 const std::vector<int>& fadc,
131 const std::vector<int>& bcidLut,
132 const std::vector<int>& bcidFadc)
136 const int slices = sliceL + sliceF;
138 if (chanPerSubBlock == 0) {
157 const int adc = (fadc[
pos] > 0) ? fadc[
pos] : 0;
168 std::vector<int>& fadc,
169 std::vector<int>& bcidLut,
170 std::vector<int>& bcidFadc)
const
200 bcidLut.resize(sliceL);
201 bcidFadc.resize(sliceF);
344 std::vector<uint32_t>::const_iterator
pos =
m_datamap.begin();
347 for (
int sl = 0; sl <
slices; ++sl) {
371 for (
int sl = 0; sl <
slices; ++sl) {
408 for (
int sl = 0; sl <
slices; ++sl) {
435 for (
int sl = 0; sl <
slices; ++sl) {
int asic(int chan) const
Return the ASIC channel corresponding to a data channel.
static const uint32_t s_bcidLutMask
bool unpackNeutral()
Unpack neutral data.
static const int s_bunchMismatchBit
void unpackerInit()
Initialise unpacker.
bool packNeutral()
Pack neutral data.
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.
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.
static const int s_glinkPins
static const int s_bcidFadcBit
bool unpackUncompressedErrors()
Unpack uncompressed error data.
static const uint32_t s_wordIdVal
Sub-Block class for PPM data.
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.
static const int s_lutBit
static const int s_errorMarker
int ppmError(int chan) const
Return the error word for a data channel.
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
bool unpack()
Unpack data.
void setPpmHeader(int version, int format, int seqno, int crate, int module, int slicesFadc, int slicesLut)
Store PPM header.
bool channelDisabled(int chan) const
static const uint32_t s_errorMask
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
static const int s_channels
void setPpmErrorHeader(int version, int format, int crate, int module, int slicesFadc, int slicesLut)
Store PPM error block header.
static const int s_errorBits
static const int s_wordLen
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.
int ppmPinError(int pin) const
Return the error word for a G-Link pin.
static const int s_timeoutBit
std::vector< uint32_t > m_datamap
Vector for intermediate data.
int channelsPerSubBlock() const
static const int s_channelDisabledBit
static bool errorBlock(uint32_t word)
Check if a header word is for an error block.
static const int s_glinkPinParityBit
void fillPpmPinError(int pin, int errorWord)
Store an error word corresponding to a G-Link pin.
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.
void clear()
Clear all data.
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)
static const int s_bunchCrossingBits
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.
static const int s_asicFullBit
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 bool pack(ZdcPpmSubBlock &subBlock)
Pack data.
static const int s_bcidLutBit
bool unpackerSuccess() const
Return unpacker success flag.
static const int s_ppmChannel[]
static const uint32_t s_lutMask
static const int s_asicChannels
bool errorBit(int pin, int bit) const
Error bit extraction.
static bool unpack(ZdcPpmSubBlock &subBlock)
Unpack data.
bool unpackUncompressedData()
Unpack uncompressed data.
static const int s_mcmAbsentBit
void fillPpmError(int chan, int errorWord)
Store an error word corresponding to a data channel.
bool packUncompressedData()
Pack uncompressed data.
void clear()
Clear all data.
static const int s_dataBits
static const int s_eventMismatchBit