ATLAS Offline Software
|
Helper to unpack a set of values bitwise from a stream. More...
#include <BitUnpacker.h>
Public Member Functions | |
BitUnpacker16 (STREAM &stream) | |
Constructor. More... | |
BitUnpacker16 (uint8_t nbits, STREAM &stream) | |
Constructor. More... | |
uint32_t | unpack () |
Unpack one value from the stream. More... | |
Private Attributes | |
uint32_t | m_buf |
Buffer for the current word being unpacked. More... | |
uint8_t | m_nbuf |
Number of valid words currently buffered. More... | |
STREAM & | m_stream |
The input stream. More... | |
Helper to unpack a set of values bitwise from a stream.
This helper can be used to unpack a set of values from a stream and return them as a set of 32-bit words. This is a special case for 16-bit values.
STREAM
should support input (operator>>) with uint32_t
(satisfied by a ROOT TBuffer).
Definition at line 131 of file BitUnpacker.h.
CxxUtils::BitUnpacker16< STREAM >::BitUnpacker16 | ( | STREAM & | stream | ) |
Constructor.
stream | Input stream object. |
CxxUtils::BitUnpacker16< STREAM >::BitUnpacker16 | ( | uint8_t | nbits, |
STREAM & | stream | ||
) |
Constructor.
nbits | Must be 16. |
stream | Input stream object. |
uint32_t CxxUtils::BitUnpacker16< STREAM >::unpack | ( | ) |
Unpack one value from the stream.
|
private |
Buffer for the current word being unpacked.
Definition at line 157 of file BitUnpacker.h.
|
private |
Number of valid words currently buffered.
Definition at line 160 of file BitUnpacker.h.
|
private |
The input stream.
Definition at line 163 of file BitUnpacker.h.