Belle II Software  release-08-01-10
Tracker2D Struct Reference

unpacker for the 2D tracker More...

Inheritance diagram for Tracker2D:
Collaboration diagram for Tracker2D:

Public Member Functions

 Tracker2D (StoreArray< TSFOutputBitStream > *inArrayPtr, StoreArray< T2DOutputBitStream > *outArrayPtr, const std::string &inName, unsigned inEventWidth, unsigned inOffset, unsigned inHeaderSize, const std::vector< int > &inNodeID, const std::vector< int > &inNodeID_pcie40, unsigned inNumTS, int &inDelay, int &inCnttrg, int inDebugLevel)
 constructor
 
void reserve (int subDetectorId, std::array< int, nFinesse > nWords, bool pciedata) override
 Calculate the number of clocks in the data, reserve that much of clocks in the Bitstream(s) More...
 
void unpack (int subDetectorId, std::array< int *, 48 > data32tab, std::array< int, 48 > nWords, bool pciedata) override
 Unpack the Belle2Link data and fill the Bitstream. More...
 
virtual void unpack (int, std::array< int *, nFinesse >, std::array< int, nFinesse >, bool)
 Unpack the Belle2Link data and fill the Bitstream. More...
 
virtual int getHeaders (int subDetectorId, std::array< int *, 48 > data32tab, std::array< int, 48 > nWords, bool pciedata)
 Get the Belle2Link header information. More...
 

Public Attributes

StoreArray< TSFOutputBitStream > * inputArrayPtr
 pointer to the Bitstream of 2D input
 
StoreArray< T2DOutputBitStream > * outputArrayPtr
 pointer to the Bitstream of 2D output to 3D/Neuro
 
unsigned iTracker
 ID of the 2D tracker (0 to 3)
 
unsigned numTS
 Number of TS sent to 2D (0 to 20)
 
unsigned offsetBitWidth
 starting point of the input data in an Belle2Link event
 
std::string name
 Name of the UT3.
 
unsigned eventWidth
 Size of an event in the Belle2Link data in 32-bit words.
 
unsigned offset
 The starting point of the data in an event.
 
int headerSize
 Size of the B2L header in words.
 
int iNode
 COPPER id of the board.
 
int iFinesse
 FINESSE (HSLB) id) of the board.
 
int iNode_pcie40
 PCIe40 id of the board.
 
int iFinesse_pcie40
 PCIe40 ch id of the board.
 
std::string firmwareType
 type of the FPGA firmware
 
std::string firmwareVersion
 version of the FPGA firmware
 
int & delay
 Reference to the variable of its Belle2Link delay.
 
int & cnttrg
 counter of trgger signal, total 32 bits, the 20 LSBs recorded in the event header
 
int debugLevel
 debug level in the steering file
 

Detailed Description

unpacker for the 2D tracker

Definition at line 155 of file CDCTriggerUnpackerModule.cc.

Member Function Documentation

◆ getHeaders()

virtual int getHeaders ( int  subDetectorId,
std::array< int *, 48 >  data32tab,
std::array< int, 48 >  nWords,
bool  pciedata 
)
inlinevirtualinherited

Get the Belle2Link header information.

Parameters
subDetectorIdCOPPER id of the current data
data32tablist of pointers to the Belle2Link data buffers
nWordsNumber of words of each FINESSE in the COPPER
Returns
1 if there are data other than the header

Definition at line 136 of file CDCTriggerUnpackerModule.h.

◆ reserve()

void reserve ( int  subDetectorId,
std::array< int, nFinesse nWords,
bool  pciedata 
)
inlineoverridevirtual

Calculate the number of clocks in the data, reserve that much of clocks in the Bitstream(s)

Parameters
subDetectorIdCOPPER id of the current data
nWordsNumber of words of each FINESSE in the COPPER

Reimplemented from SubTrigger.

Definition at line 189 of file CDCTriggerUnpackerModule.cc.

190  {
191  int iNode_i = 0;
192  int iFinesse_i = 0;
193  if (pciedata) {
194  iNode_i = iNode_pcie40;
195  iFinesse_i = iFinesse_pcie40;
196  } else {
197  iNode_i = iNode;
198  iFinesse_i = iFinesse;
199  }
200 
201  size_t nClocks = (nWords[iFinesse_i] - headerSize) / eventWidth;
202  size_t entries = inputArrayPtr->getEntries();
203  if (subDetectorId == iNode_i) {
204  if (entries == 0) {
205  for (unsigned i = 0; i < nClocks; ++i) {
206  TSFOutputBitStream* inputClock = inputArrayPtr->appendNew();
207  T2DOutputBitStream* outputClock = outputArrayPtr->appendNew();
208  // fill bitstreams for all trackers with zeros
209  for (unsigned j = 0; j < nTrackers; ++j) {
210  for (unsigned iAxialTSF = 0; iAxialTSF < nAxialTSF; ++iAxialTSF) {
211  inputClock->m_signal[iAxialTSF][j].fill(zero_val);
212  }
213  outputClock->m_signal[j].fill(zero_val);
214  }
215  }
216  B2DEBUG(20, name << ": " << nClocks << " clocks");
217  } else if (entries != nClocks) {
218  B2DEBUG(20, "Number of clocks in " << name << " conflicts with others!");
219  }
220  }
221  };
Class to hold one clock cycle of raw bit content.
Definition: Bitstream.h:54
SignalBus m_signal
SignalBus of the Bitstream.
Definition: Bitstream.h:77
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
int iNode_pcie40
PCIe40 id of the board.
int headerSize
Size of the B2L header in words.
int iFinesse
FINESSE (HSLB) id) of the board.
int iFinesse_pcie40
PCIe40 ch id of the board.
std::string name
Name of the UT3.
unsigned eventWidth
Size of an event in the Belle2Link data in 32-bit words.
int iNode
COPPER id of the board.
StoreArray< T2DOutputBitStream > * outputArrayPtr
pointer to the Bitstream of 2D output to 3D/Neuro
StoreArray< TSFOutputBitStream > * inputArrayPtr
pointer to the Bitstream of 2D input

◆ unpack() [1/2]

void unpack ( int  subDetectorId,
std::array< int *, 48 >  data32tab,
std::array< int, 48 >  nWords,
bool  pciedata 
)
inlineoverride

Unpack the Belle2Link data and fill the Bitstream.

Parameters
subDetectorIdCOPPER id of the current data
data32tablist of pointers to the Belle2Link data buffers
nWordsNumber of words of each FINESSE in the COPPER

Definition at line 232 of file CDCTriggerUnpackerModule.cc.

◆ unpack() [2/2]

virtual void unpack ( int  ,
std::array< int *, nFinesse ,
std::array< int, nFinesse ,
bool   
)
inlinevirtualinherited

Unpack the Belle2Link data and fill the Bitstream.

Parameters
subDetectorIdCOPPER id of the current data
data32tablist of pointers to the Belle2Link data buffers
nWordsNumber of words of each FINESSE in the COPPER

Reimplemented in Neuro.

Definition at line 120 of file CDCTriggerUnpackerModule.h.


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