Belle II Software development
Bitstream< SignalBus > Class Template Reference

Class to hold one clock cycle of raw bit content. More...

#include <Bitstream.h>

Inheritance diagram for Bitstream< SignalBus >:

Public Member Functions

 Bitstream ()
 default constructor
 
 Bitstream (SignalBus bus)
 constructor from Signal Bus
 
 ~Bitstream ()
 destructor, empty because we don't allocate memory explicitly.
 
const SignalBus & signal ()
 accessors
 

Protected Member Functions

 ClassDef (Bitstream, 4)
 Needed to make the ROOT object storable.
 

Protected Attributes

SignalBus m_signal
 SignalBus of the Bitstream.
 

Friends

class CDCTriggerUnpackerModule
 
struct Merger
 
struct Tracker2D
 
struct Neuro
 

Detailed Description

template<typename SignalBus>
class Belle2::Bitstream< SignalBus >

Class to hold one clock cycle of raw bit content.

It is intended to be put into a StoreArray, where each element contains the data in one clock cycle.

The recommended type of the signal bus is nested std::array<char, N> or std::array<std::bitset, N> (although it can be virtually any container).

To add a signal bus with a new type (or dimension), declare the type in linkdef.h, e.g.

#pragma link C++ class Belle2::Bitstream<array<array<array<char, 429>, 4>, 5> >+

and then it can be used in a module.

using namespace Belle2; using std::array; using signalBus = array<array<array<char, 429>, 4>, 5>; StoreArray<Bitstream<signalBus> > bitsFromTSFTo2D;

Definition at line 54 of file Bitstream.h.

Constructor & Destructor Documentation

◆ Bitstream() [1/2]

Bitstream ( )
inline

default constructor

Definition at line 61 of file Bitstream.h.

61{};

◆ Bitstream() [2/2]

Bitstream ( SignalBus  bus)
inlineexplicit

constructor from Signal Bus

Definition at line 64 of file Bitstream.h.

64: m_signal(bus) {}
SignalBus m_signal
SignalBus of the Bitstream.
Definition: Bitstream.h:77

◆ ~Bitstream()

~Bitstream ( )
inline

destructor, empty because we don't allocate memory explicitly.

Definition at line 67 of file Bitstream.h.

67{ };

Member Function Documentation

◆ signal()

const SignalBus & signal ( )
inline

accessors

Definition at line 70 of file Bitstream.h.

71 {
72 return m_signal;
73 }

Friends And Related Function Documentation

◆ CDCTriggerUnpackerModule

friend class CDCTriggerUnpackerModule
friend

Definition at line 55 of file Bitstream.h.

◆ Merger

friend struct Merger
friend

Definition at line 56 of file Bitstream.h.

◆ Neuro

friend struct Neuro
friend

Definition at line 58 of file Bitstream.h.

◆ Tracker2D

friend struct Tracker2D
friend

Definition at line 57 of file Bitstream.h.

Member Data Documentation

◆ m_signal

SignalBus m_signal
protected

SignalBus of the Bitstream.

Definition at line 77 of file Bitstream.h.


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