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

KLM raw data. More...

#include <RawData.h>

Public Member Functions

 RawData (int copper, int slot, const int *buffer, StoreArray< KLMDigitRaw > *klmDigitRaws, KLMDigitRaw **newDigitRaw, bool fillDigitRaws)
 Constructor (unpack KLM raw data). More...
 
 ~RawData ()
 Destructor.
 
uint16_t getType () const
 Get packet type.
 
uint16_t getLane () const
 Get lane.
 
uint16_t getAxis () const
 Get axis.
 
uint16_t getChannel () const
 Get channel.
 
uint16_t getCTime () const
 Get CTIME.
 
uint16_t getTriggerBits () const
 Get trigger bits.
 
uint16_t getTDC () const
 Get TDC.
 
uint16_t getCharge () const
 Get charge.
 
uint16_t getFE () const
 Get feature-extraction mode.
 
bool multipleStripHit () const
 Check whether this hit corresponds to multiple strips.
 
void getChannelGroups (std::vector< ChannelGroup > &channelGroups) const
 Get channel groups corresponding to this hit. More...
 

Static Public Member Functions

static uint16_t unpackType (uint16_t raw)
 Unpack packet type. More...
 
static uint16_t unpackLane (uint16_t raw)
 Unpack lane. More...
 
static uint16_t unpackAxis (uint16_t raw)
 Unpack axis. More...
 
static uint16_t unpackChannel (uint16_t raw)
 Unpack channel. More...
 
static uint16_t unpackCTime (uint16_t raw)
 Unpack CTIME. More...
 
static uint16_t unpackTriggerBits (uint16_t raw)
 Unpack trigger bits. More...
 
static uint16_t unpackTDC (uint16_t raw)
 Unpack TDC. More...
 
static uint16_t unpackCharge (uint16_t raw)
 Unpack charge.
 
static uint16_t unpackFE (uint16_t raw)
 Unpack feature-extraction bit.
 

Protected Attributes

uint16_t m_Type
 Packet type (3 bits).
 
uint16_t m_Lane
 Lane (5 bits).
 
uint16_t m_Axis
 Axis (1 bit).
 
uint16_t m_Channel
 Channel (7 bits).
 
uint16_t m_CTime
 CTIME (16 bits).
 
uint16_t m_TriggerBits
 Trigger bits (5 bits).
 
uint16_t m_TDC
 TDC (11 bits).
 
uint16_t m_Charge
 Charge (12 bits).
 
uint16_t m_FE
 Feature extraction mode (1 bit).
 

Detailed Description

KLM raw data.

Definition at line 50 of file RawData.h.

Constructor & Destructor Documentation

◆ RawData()

RawData ( int  copper,
int  slot,
const int *  buffer,
StoreArray< KLMDigitRaw > *  klmDigitRaws,
KLMDigitRaw **  newDigitRaw,
bool  fillDigitRaws 
)

Constructor (unpack KLM raw data).

Parameters
[in]copperCopper identifier.
[in]slotSlot number (1-based).
[in]bufferData buffer (to be unpacked).
[in,out]klmDigitRawsKLMDigitRaw array.
[out]newDigitRawNew KLMRawDigit.
[in]fillDigitRawsWhether to fill klmDigitRaws.

Definition at line 20 of file RawData.cc.

24 {
25  uint16_t dataWords[4];
26  dataWords[0] = (buffer[0] >> 16) & 0xFFFF;
27  dataWords[1] = buffer[0] & 0xFFFF;
28  dataWords[2] = (buffer[1] >> 16) & 0xFFFF;
29  dataWords[3] = buffer[1] & 0xFFFF;
30  m_Type = unpackType(dataWords[0]);
31  m_Lane = unpackLane(dataWords[0]);
32  m_Axis = unpackAxis(dataWords[0]);
33  m_Channel = unpackChannel(dataWords[0]);
34  m_CTime = unpackCTime(dataWords[1]);
35  m_TriggerBits = unpackTriggerBits(dataWords[2]);
36  m_TDC = unpackTDC(dataWords[2]);
37  m_Charge = unpackCharge(dataWords[3]);
38  m_FE = unpackFE(dataWords[3]);
39  if (fillDigitRaws) {
40  *newDigitRaw = klmDigitRaws->appendNew(copper, slot,
41  dataWords[0], dataWords[1],
42  dataWords[2], dataWords[3]);
43  }
44 }
uint16_t m_Charge
Charge (12 bits).
Definition: RawData.h:262
static uint16_t unpackFE(uint16_t raw)
Unpack feature-extraction bit.
Definition: RawData.h:233
uint16_t m_TDC
TDC (11 bits).
Definition: RawData.h:259
static uint16_t unpackTDC(uint16_t raw)
Unpack TDC.
Definition: RawData.h:217
static uint16_t unpackType(uint16_t raw)
Unpack packet type.
Definition: RawData.h:163
static uint16_t unpackChannel(uint16_t raw)
Unpack channel.
Definition: RawData.h:190
static uint16_t unpackCharge(uint16_t raw)
Unpack charge.
Definition: RawData.h:225
uint16_t m_Axis
Axis (1 bit).
Definition: RawData.h:247
uint16_t m_Channel
Channel (7 bits).
Definition: RawData.h:250
uint16_t m_TriggerBits
Trigger bits (5 bits).
Definition: RawData.h:256
static uint16_t unpackCTime(uint16_t raw)
Unpack CTIME.
Definition: RawData.h:199
uint16_t m_Type
Packet type (3 bits).
Definition: RawData.h:241
uint16_t m_FE
Feature extraction mode (1 bit).
Definition: RawData.h:265
static uint16_t unpackLane(uint16_t raw)
Unpack lane.
Definition: RawData.h:172
static uint16_t unpackTriggerBits(uint16_t raw)
Unpack trigger bits.
Definition: RawData.h:208
uint16_t m_Lane
Lane (5 bits).
Definition: RawData.h:244
static uint16_t unpackAxis(uint16_t raw)
Unpack axis.
Definition: RawData.h:181
uint16_t m_CTime
CTIME (16 bits).
Definition: RawData.h:253

Member Function Documentation

◆ getChannelGroups()

void getChannelGroups ( std::vector< ChannelGroup > &  channelGroups) const

Get channel groups corresponding to this hit.

Parameters
[out]channelGroupsChannel groups.

Definition at line 50 of file RawData.cc.

◆ unpackAxis()

static uint16_t unpackAxis ( uint16_t  raw)
inlinestatic

Unpack axis.

Parameters
[in]rawRaw-data word.

Definition at line 181 of file RawData.h.

182  {
183  return (raw >> 7) & 0x1;
184  };

◆ unpackChannel()

static uint16_t unpackChannel ( uint16_t  raw)
inlinestatic

Unpack channel.

Parameters
[in]rawRaw-data word.

Definition at line 190 of file RawData.h.

◆ unpackCTime()

static uint16_t unpackCTime ( uint16_t  raw)
inlinestatic

Unpack CTIME.

Parameters
[in]rawRaw-data word.

Definition at line 199 of file RawData.h.

◆ unpackLane()

static uint16_t unpackLane ( uint16_t  raw)
inlinestatic

Unpack lane.

Parameters
[in]rawRaw-data word.

Definition at line 172 of file RawData.h.

◆ unpackTDC()

static uint16_t unpackTDC ( uint16_t  raw)
inlinestatic

Unpack TDC.

Parameters
[in]rawRaw-data word.

Definition at line 217 of file RawData.h.

◆ unpackTriggerBits()

static uint16_t unpackTriggerBits ( uint16_t  raw)
inlinestatic

Unpack trigger bits.

Parameters
[in]rawRaw-data word.

Definition at line 208 of file RawData.h.

◆ unpackType()

static uint16_t unpackType ( uint16_t  raw)
inlinestatic

Unpack packet type.

Parameters
[in]rawRaw-data word.

Definition at line 163 of file RawData.h.


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