Belle II Software  release-05-02-19
Neuro Struct Reference

unpacker for the Neuro More...

Inheritance diagram for Neuro:
Collaboration diagram for Neuro:

Public Member Functions

 Neuro (StoreArray< NNBitStream > *arrPtr, std::string inName, unsigned inEventWidth, unsigned inOffset, unsigned inHeaderSize, std::vector< int > inNodeID, int &inDelay, int &inCnttrg, int inDebugLevel)
 Constructor.
 
void reserve (int subDetectorId, std::array< int, nFinesse > nWords) 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 *, nFinesse > data32tab, std::array< int, nFinesse > nWords) override
 Unpack the Belle2Link data and fill the Bitstream. More...
 
virtual int getHeaders (int subDetectorId, std::array< int *, 4 > data32tab, std::array< int, 4 > nWords)
 Get the Belle2Link header information. More...
 

Public Attributes

StoreArray< NNBitStream > * ArrayPtr
 Array pointer for NN.
 
unsigned iTracker
 Tracker board ID.
 
unsigned offsetBitWidth
 Offset bit width.
 
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.
 
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 Neuro

Definition at line 402 of file CDCTriggerUnpackerModule.cc.

Member Function Documentation

◆ getHeaders()

virtual int getHeaders ( int  subDetectorId,
std::array< int *, 4 >  data32tab,
std::array< int, 4 >  nWords 
)
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 138 of file CDCTriggerUnpackerModule.h.

◆ reserve()

void reserve ( int  ,
std::array< int, nFinesse  
)
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 422 of file CDCTriggerUnpackerModule.cc.

423  {
424  size_t nClocks = (nWords[iFinesse] - headerSize) / eventWidth;
425  size_t entries = ArrayPtr->getEntries();
426  if (subDetectorId == iNode) {
427  if (entries == 0) {
428  for (unsigned i = 0; i < nClocks; ++i) {
429  NNBitStream* nnclock = ArrayPtr->appendNew();
430  // fill bitstreams for all trackers with zeros
431  for (unsigned j = 0; j < nTrackers; ++j) {
432  nnclock->m_signal[j].fill(zero_val);
433  }
434  }
435  B2DEBUG(20, name << ": " << nClocks << " clocks");
436  } else if (entries != nClocks) {
437  B2DEBUG(20, "Number of clocks in " << name << " conflicts with others!");
438  }
439  }
440  };

◆ unpack()

void unpack ( int  ,
std::array< int *, nFinesse ,
std::array< int, nFinesse  
)
inlineoverridevirtual

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 from SubTrigger.

Definition at line 442 of file CDCTriggerUnpackerModule.cc.


The documentation for this struct was generated from the following file:
Belle2::StoreArray::appendNew
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:256
Belle2::Bitstream
Class to hold one clock cycle of raw bit content.
Definition: Bitstream.h:47
Belle2::SubTrigger::iFinesse
int iFinesse
FINESSE (HSLB) id) of the board.
Definition: CDCTriggerUnpackerModule.h:89
Belle2::SubTrigger::name
std::string name
Name of the UT3.
Definition: CDCTriggerUnpackerModule.h:76
Belle2::SubTrigger::iNode
int iNode
COPPER id of the board.
Definition: CDCTriggerUnpackerModule.h:87
Belle2::SubTrigger::eventWidth
unsigned eventWidth
Size of an event in the Belle2Link data in 32-bit words.
Definition: CDCTriggerUnpackerModule.h:81
Belle2::SubTrigger::headerSize
int headerSize
Size of the B2L header in words.
Definition: CDCTriggerUnpackerModule.h:85
Belle2::Neuro::ArrayPtr
StoreArray< NNBitStream > * ArrayPtr
Array pointer for NN.
Definition: CDCTriggerUnpackerModule.cc:413
Belle2::Bitstream::m_signal
SignalBus m_signal
SignalBus of the Bitstream.
Definition: Bitstream.h:73
Belle2::StoreArray::getEntries
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:226