19#ifndef CbmTrdUnpackAlgoR_H
20#define CbmTrdUnpackAlgoR_H
26#include <Timeslice.hpp>
31#include <RtypesCore.h>
65 virtual std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>*
87 void digestInfoMsg(
const uint32_t frame, uint16_t criId, uint8_t crobId, uint16_t elinkId);
95 void digestMsFlags(
const uint16_t flags, uint16_t criId, uint8_t crobId);
134 uint8_t
getTsMsb(
const uint32_t frame);
180 bool unpack(
const fles::Timeslice* ts, uint16_t icomp, UInt_t imslice);
182 bool unpackRaw(
const fles::MicrosliceDescriptor msdesc,
const size_t* mscontent);
184 template<u
int8_t sys_ver>
185 bool unpackFex(
const fles::MicrosliceDescriptor msdesc,
const size_t* mscontent);
Baseclass for the TrdR unpacker algorithms.
Base class for storing raw information which comes from the Spadic v2.2 trough flib or from a tsa fil...
CbmTrdUnpackAlgoBaseR(std::string name)
Create the Cbm Trd Unpack AlgoBase object.
std::vector< uint8_t > fNrTsMsbVec
Counter for the ts_msb used to reconstruct the time.
static const uint8_t fBytesPerWord
Bytes per spadic frame stored in the microslices.
size_t fNrCorruptEom
Number of corrupted EOM frames.
CbmTrdUnpackAlgoR(const CbmTrdUnpackAlgoR &)=delete
Copy constructor - not implemented.
static const uint8_t fStreamsPerWord
Number of streams per word For the msg format used from 2021 ongoing we have 2 parallel streams per w...
void makeDigi(CbmTrdRawMessageSpadic raw)
Create an actual digi from the raw message.
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest(std::string geoTag, uint32_t runId)
Get the requested parameter containers. Return the required parameter containers together with the pa...
CbmTrdUnpackAlgoR()
Create the Cbm Trd Unpack AlgoBase object.
int16_t extractSample(size_t *adcbuffer, size_t *nadcbits)
Extract all adc samples from a given adcbuffer container.
Spadic::MsMessageType getMessageType(const uint32_t frame)
Identify the message type of a given 32bit frame inside a Microslice.
void finishDerived()
Additional explicit finish function of this algo implementation.
bool unpackRaw(const fles::MicrosliceDescriptor msdesc, const size_t *mscontent)
Spadic::MsInfoType digestBufInfoFlags(const uint32_t frame, uint16_t criId, uint8_t crobId, uint16_t elinkId)
Digest the aditional flags stored in the 4 "cccc" bits of the EPO messages.
bool setDerivedTsParameters(size_t)
Up to now we do not need this function for this algorithm.
std::float_t extractAvgSample(size_t *adcbuffer, size_t *nadcbits)
Extract the baseline average sample from a given adcbuffer. Depending on the Spadic settings sample-0...
bool unpackFex(const fles::MicrosliceDescriptor msdesc, const size_t *mscontent)
size_t fNrNonMajorTsMsb
Counter for the ts_msb used to reconstruct the time.
uint8_t getTsMsb(const uint32_t frame)
Get the ts_msb information from the TS_MSB(kEPO) frame. We take the first of the 3 The 3 redundant TS...
virtual ~CbmTrdUnpackAlgoR()
Destroy the Cbm Trd Unpack Task object.
bool unpack(const fles::Timeslice *ts, uint16_t icomp, UInt_t imslice)
Unpack a given microslice.
Spadic::MsInfoType getInfoType(const uint32_t frame, uint16_t criId, uint8_t crobId, uint16_t elinkId)
Identify the InfoType of a 64bit InfoMessage word inside a Microslice.
CbmTrdUnpackAlgoR & operator=(const CbmTrdUnpackAlgoR &)=delete
Assignment operator - not implemented.
virtual CbmTrdRawMessageSpadic makeRaw(const uint32_t frame, uint16_t criId, uint8_t crobId, uint16_t elinkId, uint8_t istream)
Create a CbmTrdRawMessageSpadic from the hit message input.
size_t fMsStartTimeRelCC
Start time of the current micro-Slice relative to the Timeslice start time in Spadic CC.
void digestMsFlags(const uint16_t flags, uint16_t criId, uint8_t crobId)
Digest the flags of the currently unpacked micro-Slice.
size_t fNrElinkMis
Number of SOM to RDA/EOM mismatches.
void digestInfoMsg(const uint32_t frame, uint16_t criId, uint8_t crobId, uint16_t elinkId)
Digest a info message run all default information forwarding from the msg.
size_t fMsStartTimeRel
Start time of the current micro-Slice relative to the Timeslice start time in ns.