|
ATLAS Offline Software
|
Go to the documentation of this file.
44 m_lutOffset(-1), m_fadcOffset(-1),
45 m_pedestal(10), m_fadcBaseline(0),
46 m_fadcThreshold(0), m_runNumber(0)
69 const int seqno,
const int crate,
70 const int module,
const int slicesFadc,
80 const int crate,
const int module,
81 const int slicesFadc,
const int slicesLut)
111 const std::vector<int>& fadc,
112 const std::vector<int>& bcidLut,
113 const std::vector<int>& bcidFadc)
117 const int slices = sliceL + sliceF;
134 const int adc = (fadc[
pos] > 0) ? fadc[
pos] : 0;
145 std::vector<int>& fadc,
146 std::vector<int>& bcidLut,
147 std::vector<int>& bcidFadc)
174 bcidLut.resize(sliceL);
175 bcidFadc.resize(sliceF);
318 std::vector<uint32_t>::const_iterator
pos =
m_datamap.begin();
321 for (
int sl = 0; sl <
slices; ++sl) {
345 for (
int sl = 0; sl <
slices; ++sl) {
382 for (
int sl = 0; sl <
slices; ++sl) {
409 for (
int sl = 0; sl <
slices; ++sl) {
static const uint32_t s_bcidFadcMask
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)
void fillPpmError(int chan, int errorWord)
Store an error word corresponding to a data channel.
static const int s_dataBits
void fillPpmPinError(int pin, int errorWord)
Store an error word corresponding to a G-Link pin.
static const uint32_t s_lutMask
static const int s_channelDisabledBit
int ppmPinError(int pin) const
Return the error word for a G-Link pin.
bool packUncompressedData()
Pack uncompressed data.
static const int s_bunchCrossingBits
static const uint32_t s_wordIdVal
void clear()
Clear all data.
static const int s_asicChannels
bool unpackUncompressedData()
Unpack uncompressed data.
static const int s_timeoutBit
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.
static const int s_glinkPinParityBit
static const int s_asicFullBit
static bool pack(PpmSubBlockV1 &subBlock)
Pack data.
int asic(int chan) const
Return the ASIC channel corresponding to a data channel.
void unpackerInit()
Initialise unpacker.
static const int s_fadcBit
void setHeader(int wordId, int version, int format, int seqno, int crate, int module, int slices2, int slices1)
Store header data.
void packerFlush()
Flush the current data word padded with zeros.
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
constexpr auto lut(Generator &&f)
std::vector< uint32_t > m_datamap
Vector for intermediate data.
static const int s_errorBits
static const int s_mcmAbsentBit
static const int s_channels
static const int s_bunchMismatchBit
void setPpmErrorHeader(int version, int format, int crate, int module, int slicesFadc, int slicesLut)
Store PPM error block header.
static const uint32_t s_bcidLutMask
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
int ppmError(int chan) const
Return the error word for a data channel.
bool unpackUncompressedErrors()
Unpack uncompressed error data.
bool unpackerNeutralParityError(int pin)
Unpack and test G-Link parity bit for given pin.
static const int s_eventMismatchBit
bool unpackNeutral()
Unpack neutral data.
int pin(int chan) const
Return the G-Link pin corresponding to a data channel.
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
static const int s_wordLen
static const int s_fpgaCorruptBit
static const int s_bcidFadcBit
void setPpmHeader(int version, int format, int seqno, int crate, int module, int slicesFadc, int slicesLut)
Store PPM header.
bool packUncompressedErrors()
Pack uncompressed error data.
static const uint32_t s_errorMask
bool packNeutral()
Pack neutral data.
void clear()
Clear all data.
bool unpackerSuccess() const
Return unpacker success flag.
static const int s_lutBit
static const uint32_t s_fadcMask
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
int dataWords() const
Return number of data words.
static bool errorBlock(uint32_t word)
Check if a header word is for an error block.
static bool unpack(PpmSubBlockV1 &subBlock)
Unpack data.
void ppmData(int chan, std::vector< int > &lut, std::vector< int > &fadc, std::vector< int > &bcidLut, std::vector< int > &bcidFadc)
Return unpacked data for given channel.
bool channelDisabled(int chan) const
bool unpack()
Unpack data.
void setUnpackErrorCode(int code)
Set the unpacking error code.
bool errorBit(int pin, int bit) const
Error bit extraction.
static const int s_glinkPins
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.
int channelsPerSubBlock()
static const int s_bcidLutBit
uint32_t unpackerNeutral(int pin, int nbits)
Unpack given number of bits of neutral data for given pin.
static const int s_errorMarker
std::vector< uint32_t > m_errormap
Vector for intermediate error data.
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.