CxxUtils::BitPacker8< STREAM > Class Template Reference

Pack a set of values bitwise into a stream. More...

#include <BitPacker.h>

List of all members.

Public Member Functions

 BitPacker8 (STREAM &stream)
 Constructor.
 BitPacker8 (uint8_t nbits, STREAM &stream)
 Constructor.
 ~BitPacker8 ()
 Destructor.
void pack (uint32_t x)
 Pack one value to the stream.

Detailed Description

template<class STREAM>
class CxxUtils::BitPacker8< STREAM >

Pack a set of values bitwise into a stream.

This helper can be used to pack a set of values into 32-bit words and write them to a stream. This is a special case for 8-bit values.

STREAM should support output (operator<<) with uint32_t (satisfied by a ROOT TBuffer).


Constructor & Destructor Documentation

template<class STREAM >
CxxUtils::BitPacker8< STREAM >::BitPacker8 ( STREAM &  stream  )  [inline]

Constructor.

Parameters:
stream Output stream object.
template<class STREAM >
CxxUtils::BitPacker8< STREAM >::BitPacker8 ( uint8_t  nbits,
STREAM &  stream 
) [inline]

Constructor.

Parameters:
nbits Must be 8.
stream Output stream object.
template<class STREAM >
CxxUtils::BitPacker8< STREAM >::~BitPacker8 (  )  [inline]

Destructor.

This may flush buffered data to the output stream.


Member Function Documentation

template<class STREAM >
void CxxUtils::BitPacker8< STREAM >::pack ( uint32_t  dat  )  [inline]

Pack one value to the stream.

Parameters:
x The value to pack. The upper bits should all be clear.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1