Belle II Software  release-08-01-10
TRGBitStream Class Reference

A class to represent a bit stream. More...

#include <BitStream.h>

Collaboration diagram for TRGBitStream:

Public Member Functions

 TRGBitStream ()
 Default constructor.
 
 TRGBitStream (int size, const std::string &name="unknown")
 Constructor of fixed size.
 
 TRGBitStream (const TRGBitStream &)
 Copy constructor.
 
 TRGBitStream (const char *const, unsigned sizeInBit)
 Constructor with char stream.
 
virtual ~TRGBitStream ()
 Destructor.
 
const std::string & name (void) const
 returns name.
 
const std::string & name (const std::string &newName)
 sets and returns name.
 
void dump (const std::string &message="", const std::string &pre="") const
 dumps contents. "message" is to select information to dump. "pre" will be printed in head of each line.
 
unsigned size (void) const
 returns size of stream in unit of bit.
 
unsigned sizeInChar (void) const
 returns size in char's.
 
char c (unsigned positionInChar) const
 returns a pointer to char's.
 
bool bit (unsigned positionInBit) const
 returns true if given position is active.
 
void clear (void)
 clears contents.
 
void append (bool)
 appends a bit to a stream.
 
void append (int)
 appends a bit to a stream.
 
void append (unsigned)
 appends a bit to a stream.
 

Static Public Member Functions

static std::vector< TRGSignalTRGBitStream2TRGSignal (const TRGClock &clock, int initialClockPosition, std::vector< TRGBitStream * > stream)
 Make trigger signals from bit stream.
 

Private Attributes

std::string _name
 Name.
 
unsigned _sizeMax
 Bit stream max size.
 
unsigned _size
 Bit stream size.
 
std::vector< unsigned * > _stream
 Bit stream storage.
 

Detailed Description

A class to represent a bit stream.

Definition at line 45 of file BitStream.h.


The documentation for this class was generated from the following files: