ATLAS Offline Software
|
Class providing the association between TileCal problems and status word bits. More...
#include <TileBchDecoder.h>
Public Types | |
enum | BitPatVer { BitPat_ofl01, BitPat_onl01, MaxVersion } |
Public Member Functions | |
TileBchDecoder (BitPatVer bitPatVer) | |
Ctor. More... | |
void | printBitAssignment () const |
Print status bits and their assigned problem. More... | |
void | printBitAssignment (std::ostream &stm) const |
Print status bits and their assigned problem. More... | |
TileBchStatus | decode (uint32_t status_channel, uint32_t status_adc=0) const |
Decode the status word. More... | |
TileBchStatus | decode (const TileBchWords &words) const |
Decode the status word. More... | |
TileBchWords | encode (const TileBchStatus &status) const |
Encode an ADC status into channel and adc status word bits. More... | |
Private Member Functions | |
void | init_BitPat_ofl01 () |
Initializes bit pattern version "ofl01". More... | |
void | init_BitPat_onl01 () |
Initializes bit pattern version "ofl01". More... | |
void | initPrbToBit () |
Initializes the problem to bit map. More... | |
Private Attributes | |
std::vector< TileBchPrbs::Prb > | m_bitToPrbChn |
Bit to problem association for the channel word. More... | |
std::vector< TileBchPrbs::Prb > | m_bitToPrbAdc |
Bit to problem association for the ADC word. More... | |
std::map< TileBchPrbs::Prb, std::pair< unsigned int, unsigned int > > | m_prbToBit |
Problem to status word and bit association. More... | |
Class providing the association between TileCal problems and status word bits.
The status of each TileCal ADC is stored in the database as a combination of two 32 bit integers: One 32 bit word encodes channel problems common to both ADCs (stored in gain=2), and one 32 bit word encodes ADC specific problems (gain=0 or 1).
Each bit is assigned to a specific problem. The association between bits and problems is generally not static and could change over time. This class provides a flexible mechanism to translate between problems and current bit pattern implementation. The different problems are encoded as enums (see TileBchPrbs class).
One TileBchDecoder object should be instanciated for each bitPatternVersion.
Definition at line 36 of file TileBchDecoder.h.
Enumerator | |
---|---|
BitPat_ofl01 | |
BitPat_onl01 | |
MaxVersion |
Definition at line 40 of file TileBchDecoder.h.
TileBchDecoder::TileBchDecoder | ( | BitPatVer | bitPatVer | ) |
|
inline |
Decode the status word.
Definition at line 59 of file TileBchDecoder.h.
TileBchStatus TileBchDecoder::decode | ( | uint32_t | status_channel, |
uint32_t | status_adc = 0 |
||
) | const |
TileBchWords TileBchDecoder::encode | ( | const TileBchStatus & | status | ) | const |
Encode an ADC status into channel and adc status word bits.
The returned vector is of length 2, where the first word encodes the common channel problems and the second word the specific adc problems.
status | The ADC status |
Definition at line 40 of file TileBchDecoder.cxx.
|
private |
|
private |
|
private |
|
inline |
void TileBchDecoder::printBitAssignment | ( | std::ostream & | stm | ) | const |
Print status bits and their assigned problem.
stm | The stream to print to |
Definition at line 174 of file TileBchDecoder.cxx.
|
private |
Bit to problem association for the ADC word.
Definition at line 84 of file TileBchDecoder.h.
|
private |
Bit to problem association for the channel word.
Definition at line 82 of file TileBchDecoder.h.
|
private |
Problem to status word and bit association.
pair.first==0 means channel status word, pair.first==1 means adc status word. pair.second is the bit number.
Definition at line 88 of file TileBchDecoder.h.