Project
Loading...
Searching...
No Matches
o2::mch::raw::PayloadEncoder Class Referenceabstract

A PayloadEncoder builds MCH raw data (payload part only) More...

#include <PayloadEncoder.h>

Inherited by o2::mch::raw::PayloadEncoderImpl< FORMAT, CHARGESUM, VERSION >.

Public Member Functions

virtual ~PayloadEncoder ()=default
 

Main interface.

virtual void addChannelData (DsElecId dsId, DualSampaChannelId chId, const std::vector< SampaCluster > &data)=0
 
virtual void startHeartbeatFrame (uint32_t orbit, uint16_t bunchCrossing)=0
 
virtual void addHeartbeatHeaders (const std::set< DsElecId > &dsids)=0
 
virtual size_t moveToBuffer (std::vector< std::byte > &buffer)=0
 

Detailed Description

A PayloadEncoder builds MCH raw data (payload part only)

Data is added using the addChannelData() method. Then it can be exported using the moveToBuffer() method. The output buffer contains pairs of (DataBlockHeader,payload)

Definition at line 35 of file PayloadEncoder.h.

Constructor & Destructor Documentation

◆ ~PayloadEncoder()

virtual o2::mch::raw::PayloadEncoder::~PayloadEncoder ( )
virtualdefault

Member Function Documentation

◆ addChannelData()

virtual void o2::mch::raw::PayloadEncoder::addChannelData ( DsElecId  dsId,
DualSampaChannelId  chId,
const std::vector< SampaCluster > &  data 
)
pure virtual

add data for one channel.

Parameters
dsIdis the (electronic) identifier of a dual sampa
chIddual sampa channel id 0..63
datathe actual data to be added

Implemented in o2::mch::raw::PayloadEncoderImpl< FORMAT, CHARGESUM, VERSION >.

◆ addHeartbeatHeaders()

virtual void o2::mch::raw::PayloadEncoder::addHeartbeatHeaders ( const std::set< DsElecId > &  dsids)
pure virtual

◆ moveToBuffer()

virtual size_t o2::mch::raw::PayloadEncoder::moveToBuffer ( std::vector< std::byte > &  buffer)
pure virtual

Export our encoded data.

The internal words that have been accumulated so far are moved (i.e. deleted from this object) to the external buffer of bytes Returns the number of bytes added to buffer.

Implemented in o2::mch::raw::PayloadEncoderImpl< FORMAT, CHARGESUM, VERSION >.

◆ startHeartbeatFrame()

virtual void o2::mch::raw::PayloadEncoder::startHeartbeatFrame ( uint32_t  orbit,
uint16_t  bunchCrossing 
)
pure virtual

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