Project
Loading...
Searching...
No Matches
o2::emcal::AltroDecoder Class Reference

Decoder of the ALTRO data in the raw page. More...

#include <AltroDecoder.h>

Public Member Functions

 AltroDecoder (RawReaderMemory &reader)
 Constructor.
 
 ~AltroDecoder ()=default
 Destructor.
 
void setMaxBunchLength (int maxBunchLength)
 Set the max. allowed bunch length.
 
void decode ()
 Decode the ALTRO stream.
 
const RCUTrailergetRCUTrailer () const
 Get reference to the RCU trailer object.
 
const std::vector< Channel > & getChannels () const
 Get the reference to the channel container.
 
void readRCUTrailer ()
 Read RCU trailer for the current event in the raw buffer.
 
void readChannels ()
 Read channels for the current event in the raw buffer.
 
const std::vector< MinorAltroDecodingError > & getMinorDecodingErrors () const
 Get list of minor decoding errors.
 

Detailed Description

Decoder of the ALTRO data in the raw page.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
Aug. 12, 2019

This is a base class for reading raw data digits in Altro format. The class is able to read the RCU v3 and above formats. The main difference between the format V3 and older ones is in the coding of the 10-bit Altro payload words. In V3 3 10-bit words are coded in one 32-bit word. The bits 30 and 31 are used to identify the payload, altro header and RCU trailer contents.

Based on AliAltroRawStreamV3 and AliCaloRawStreamV3 by C. Cheshkov

Definition at line 300 of file AltroDecoder.h.

Constructor & Destructor Documentation

◆ AltroDecoder()

AltroDecoder::AltroDecoder ( RawReaderMemory reader)

Constructor.

Parameters
readerRaw reader instance to be decoded

Definition at line 23 of file AltroDecoder.cxx.

◆ ~AltroDecoder()

o2::emcal::AltroDecoder::~AltroDecoder ( )
default

Destructor.

Member Function Documentation

◆ decode()

void AltroDecoder::decode ( )

Decode the ALTRO stream.

Exceptions
AltroDecoderErrorif the RCUTrailer or ALTRO payload cannot be decoded

Decoding and checking the RCUTtrailer and all channels and bunches in the ALTRO stream. After successfull decoding the Decoder can provide a reference to the RCU trailer and a vector with the decoded chanenels, each containing its bunches.

Definition at line 30 of file AltroDecoder.cxx.

◆ getChannels()

const std::vector< Channel > & AltroDecoder::getChannels ( ) const

Get the reference to the channel container.

Returns
Reference to the channel container
Exceptions
AltroDecoderErrorwith CHANNEL_ERROR if the channel container was not initialized for the current event

Definition at line 197 of file AltroDecoder.cxx.

◆ getMinorDecodingErrors()

const std::vector< MinorAltroDecodingError > & o2::emcal::AltroDecoder::getMinorDecodingErrors ( ) const
inline

Get list of minor decoding errors.

Returns
List of minor decoding errors

Definition at line 346 of file AltroDecoder.h.

◆ getRCUTrailer()

const RCUTrailer & AltroDecoder::getRCUTrailer ( ) const

Get reference to the RCU trailer object.

Returns
const reference to the RCU trailer
Exceptions
AltroDecoderErrorwith type RCU_TRAILER_ERROR if the RCU trailer was not initialized

Definition at line 189 of file AltroDecoder.cxx.

◆ readChannels()

void AltroDecoder::readChannels ( )

Read channels for the current event in the raw buffer.

decode all words for channel

Definition at line 58 of file AltroDecoder.cxx.

◆ readRCUTrailer()

void AltroDecoder::readRCUTrailer ( )

Read RCU trailer for the current event in the raw buffer.

Definition at line 38 of file AltroDecoder.cxx.

◆ setMaxBunchLength()

void o2::emcal::AltroDecoder::setMaxBunchLength ( int  maxBunchLength)
inline

Set the max. allowed bunch length.

Parameters
maxBunchLengthMax. allowed bunch lengths

Rejects bunches in case the decoded bunch length or the decoded start time exceeds the maximum allowed bunch length.

Definition at line 315 of file AltroDecoder.h.


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