Project
Loading...
Searching...
No Matches
o2::tpc::sac::Decoder Class Reference

#include <SACDecoder.h>

Public Types

enum class  DebugFlags {
  PacketInfo = 0x01 , TimingInfo = 0x02 , ProcessingInfo = 0x04 , DumpFullStream = 0x10 ,
  StreamSingleFE = 0x100 , StreamFinalData = 0x200
}
 
enum class  ReAlignType { None = 0 , AlignOnly = 1 , AlignAndFillMissing = 2 , MaxType = AlignAndFillMissing }
 

Public Member Functions

bool process (const char *data, size_t size)
 
void runDecoding ()
 
void finalize ()
 
void setReferenceTime (double time)
 
double getReferenceTime () const
 
void setDecodeAdditional (std::string_view additional)
 
void enableDebugTree ()
 
void setDebugLevel (uint32_t level=(uint32_t) DebugFlags::PacketInfo)
 set a debug level, see DebugFlags
 
void clearDecodedData ()
 
void streamDecodedData (bool streamAll=false)
 
const DecodedDatagetDecodedData () const
 
void setReAlignType (ReAlignType type=ReAlignType::AlignOnly)
 
ReAlignType getReAlignType () const
 

Static Public Member Functions

static void setNThreads (const int nThreads)
 
static int getNThreads ()
 

Static Public Attributes

static constexpr std::string_view AllowedAdditionalStreams {"MRLIX"}
 Allowed additional data streams that can be decoded with debug stream enabled.
 
static constexpr uint32_t SampleDistance = 16
 Number of samples between time data stamps.
 
static constexpr double SampleTimeMS = LHCBunchSpacingMUS * 2.5
 Internal timer sampling time in milli seconds (downsampled from LHC clock x 2500)
 
static constexpr double SampleDistanceTimeMS = SampleTimeMS * SampleDistance
 Time distance in MS between samples.
 

Detailed Description

Definition at line 131 of file SACDecoder.h.

Member Enumeration Documentation

◆ DebugFlags

Enumerator
PacketInfo 

Print packe information.

TimingInfo 

Print timing information.

ProcessingInfo 

Print some processing info.

DumpFullStream 

Dump the data character streams.

StreamSingleFE 

Stream debug output for each single FE.

StreamFinalData 

Stream debug output for each single FE.

Definition at line 139 of file SACDecoder.h.

◆ ReAlignType

Enumerator
None 

Print packe information.

AlignOnly 

Try re-alignment.

AlignAndFillMissing 

Try re-alignment and fill missing packets with 0s.

MaxType 

Largest type number.

Definition at line 148 of file SACDecoder.h.

Member Function Documentation

◆ clearDecodedData()

void Decoder::clearDecodedData ( )

Definition at line 419 of file SACDecoder.cxx.

◆ enableDebugTree()

void o2::tpc::sac::Decoder::enableDebugTree ( )
inline

Definition at line 190 of file SACDecoder.h.

◆ finalize()

void Decoder::finalize ( )

Definition at line 401 of file SACDecoder.cxx.

◆ getDecodedData()

const DecodedData & o2::tpc::sac::Decoder::getDecodedData ( ) const
inline

Definition at line 209 of file SACDecoder.h.

◆ getNThreads()

static int o2::tpc::sac::Decoder::getNThreads ( )
inlinestatic
Returns
returns the number of threads used for decoding

Definition at line 219 of file SACDecoder.h.

◆ getReAlignType()

ReAlignType o2::tpc::sac::Decoder::getReAlignType ( ) const
inline

Definition at line 212 of file SACDecoder.h.

◆ getReferenceTime()

double o2::tpc::sac::Decoder::getReferenceTime ( ) const
inline

Definition at line 166 of file SACDecoder.h.

◆ process()

bool Decoder::process ( const char data,
size_t  size 
)

Definition at line 39 of file SACDecoder.cxx.

◆ runDecoding()

void Decoder::runDecoding ( )

Definition at line 365 of file SACDecoder.cxx.

◆ setDebugLevel()

void o2::tpc::sac::Decoder::setDebugLevel ( uint32_t  level = (uint32_t)DebugFlags::PacketInfo)
inline

set a debug level, see DebugFlags

Definition at line 198 of file SACDecoder.h.

◆ setDecodeAdditional()

void o2::tpc::sac::Decoder::setDecodeAdditional ( std::string_view  additional)
inline

Set additional data to decode

These data streams will only be decoded for debug purposes and written in the debug tree, if debug tree output is enabled

Parameters
additionaladditional data streams (case sensitive) Parameters are 'M': mean values over some integration time 'R': RMS values 'L': low voltage data 'I': min values 'X': max values

Definition at line 180 of file SACDecoder.h.

◆ setNThreads()

static void o2::tpc::sac::Decoder::setNThreads ( const int  nThreads)
inlinestatic

set the number of threads used for decoding

Parameters
nThreadsnumber of threads

Definition at line 216 of file SACDecoder.h.

◆ setReAlignType()

void o2::tpc::sac::Decoder::setReAlignType ( ReAlignType  type = ReAlignType::AlignOnly)
inline

Definition at line 211 of file SACDecoder.h.

◆ setReferenceTime()

void o2::tpc::sac::Decoder::setReferenceTime ( double  time)
inline

Definition at line 161 of file SACDecoder.h.

◆ streamDecodedData()

void Decoder::streamDecodedData ( bool  streamAll = false)

Definition at line 381 of file SACDecoder.cxx.

Member Data Documentation

◆ AllowedAdditionalStreams

constexpr std::string_view o2::tpc::sac::Decoder::AllowedAdditionalStreams {"MRLIX"}
staticconstexpr

Allowed additional data streams that can be decoded with debug stream enabled.

Definition at line 134 of file SACDecoder.h.

◆ SampleDistance

constexpr uint32_t o2::tpc::sac::Decoder::SampleDistance = 16
staticconstexpr

Number of samples between time data stamps.

Definition at line 135 of file SACDecoder.h.

◆ SampleDistanceTimeMS

constexpr double o2::tpc::sac::Decoder::SampleDistanceTimeMS = SampleTimeMS * SampleDistance
staticconstexpr

Time distance in MS between samples.

Definition at line 137 of file SACDecoder.h.

◆ SampleTimeMS

constexpr double o2::tpc::sac::Decoder::SampleTimeMS = LHCBunchSpacingMUS * 2.5
staticconstexpr

Internal timer sampling time in milli seconds (downsampled from LHC clock x 2500)

Definition at line 136 of file SACDecoder.h.


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