![]() |
ATLAS Offline Software
|
This class converts TileDigits to and from bytestream in ROD format. More...
#include <TileDigits2Bytes.h>
Public Member Functions | |
| TileDigits2Bytes () | |
| int | getBytes (const TileDigits *digi, const TileHWID *tileHWID, std::vector< unsigned int > &v) |
| std::array< std::vector< float >, 3 > | getDigits (const uint32_t *data, int dataWordsPerChip) const |
| Extract samples(digits) for 3 channels, stored in 9 words. More... | |
| int | getBCID (const uint32_t *data, int chipCount, int wordsPerChip) const |
| Get BCID from Chip header, bit 0-11. More... | |
| int | getDigiMode (const uint32_t *data, int chipCount, int wordsPerChip) const |
| Determine digitizer mode for a number of channels. More... | |
| int | getGain (const uint32_t *data, int chan) const |
| Extract gain for <chip> in chip header. More... | |
| bool | checkWordParity (const uint32_t *data) const |
| Verify ODD parity for one word. More... | |
| uint32_t | calculateParity (const uint32_t *data) const |
| Calculate parity for one word. More... | |
| uint32_t | checkParity (const uint32_t *data, int length) const |
| Verify parity for <length> words. More... | |
| bool | checkStartBit (const uint32_t *data, int length, uint32_t startbit) const |
| Check that the MSB of <length> words are equal to LSB of <startbit> More... | |
| void | setVerbose (bool verbose) |
Private Attributes | |
| bool | m_verbose |
This class converts TileDigits to and from bytestream in ROD format.
Definition at line 20 of file TileDigits2Bytes.h.
|
inline |
Definition at line 24 of file TileDigits2Bytes.h.
|
inline |
Calculate parity for one word.
| data | Pointer to word |
Definition at line 133 of file TileDigits2Bytes.cxx.
|
inline |
Verify parity for <length> words.
The parity bit for each word is stored in an unsigned int LSB is parity bit from first word and so on.
| data | Pointer to first data word |
| length | Number of data words |
Definition at line 145 of file TileDigits2Bytes.cxx.
|
inline |
Check that the MSB of <length> words are equal to LSB of <startbit>
MSB of datawords should is checked.
| data | Pointer to forst data word |
| length | Number of words to check |
| startbit | Word with LSB to check against |
Definition at line 162 of file TileDigits2Bytes.cxx.
|
inline |
Verify ODD parity for one word.
| data | Pointer to data word |
Definition at line 128 of file TileDigits2Bytes.cxx.
| int TileDigits2Bytes::getBCID | ( | const uint32_t * | data, |
| int | chipCount, | ||
| int | wordsPerChip | ||
| ) | const |
Get BCID from Chip header, bit 0-11.
Go through all chip headers, check their parity and extract BCID from them (bits 0-11)
| data | Pointer to first word |
| chipCount | Number of chips |
| wordsPerChip | Number of data words per chip |
Definition at line 65 of file TileDigits2Bytes.cxx.
| int TileDigits2Bytes::getBytes | ( | const TileDigits * | digi, |
| const TileHWID * | tileHWID, | ||
| std::vector< unsigned int > & | v | ||
| ) |
Definition at line 12 of file TileDigits2Bytes.cxx.
| int TileDigits2Bytes::getDigiMode | ( | const uint32_t * | data, |
| int | chipCount, | ||
| int | wordsPerChip | ||
| ) | const |
Determine digitizer mode for a number of channels.
Go through all chip headers, check their parity and extract digi mode from them (bit 15,16)
| data | Pointer to first word |
| chipCount | Number of chips |
| wordsPerChip | Number of data words per chip |
Definition at line 89 of file TileDigits2Bytes.cxx.
| std::array< std::vector< float >, 3 > TileDigits2Bytes::getDigits | ( | const uint32_t * | data, |
| int | dataWordsPerChip | ||
| ) | const |
Extract samples(digits) for 3 channels, stored in 9 words.
| data | Pointer to ROD-data |
Definition at line 35 of file TileDigits2Bytes.cxx.
| int TileDigits2Bytes::getGain | ( | const uint32_t * | data, |
| int | chan | ||
| ) | const |
Extract gain for <chip> in chip header.
Gain bits are bit 12-14 in chip header.
| data | Pointer to chip header word |
| chan | is channel number in chip (0-2) return 0-low gain, 1-high gain |
Bit 12 corresponds to chan with lowest #.
Definition at line 56 of file TileDigits2Bytes.cxx.
|
inline |
Definition at line 92 of file TileDigits2Bytes.h.
|
private |
Definition at line 96 of file TileDigits2Bytes.h.
1.8.18