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>>>*
79 std::uint16_t elinkId);
88 void digestInfoMsg(
const std::uint32_t frame, std::uint16_t criId, std::uint8_t crobId, std::uint16_t elinkId);
96 void digestMsFlags(
const std::uint16_t flags, std::uint16_t criId, std::uint8_t crobId);
107 std::int16_t
extractSample(
size_t* adcbuffer,
size_t* nadcbits);
125 std::uint16_t elinkId);
136 std::uint8_t
getTsMsb(
const std::uint32_t frame);
150 std::uint16_t elinkId, std::uint8_t istream);
182 bool unpack(
const fles::Timeslice* ts, std::uint16_t icomp, UInt_t imslice);
184 bool unpackRaw(
const fles::MicrosliceDescriptor msdesc,
const size_t* mscontent);
186 template<std::u
int8_t sys_ver>
187 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...
size_t fNrCorruptEom
Number of corrupted EOM frames.
CbmTrdUnpackAlgoR(const CbmTrdUnpackAlgoR &)=delete
Copy constructor - not implemented.
static const std::uint8_t fStreamsPerWord
Number of streams per word For the msg format used from 2021 ongoing we have 2 parallel streams per w...
virtual CbmTrdRawMessageSpadic makeRaw(const std::uint32_t frame, std::uint16_t criId, std::uint8_t crobId, std::uint16_t elinkId, std::uint8_t istream)
Create a CbmTrdRawMessageSpadic from the hit message input.
void makeDigi(CbmTrdRawMessageSpadic raw)
Create an actual digi from the raw message.
CbmTrdUnpackAlgoR()
Create the Cbm Trd Unpack AlgoBase object.
Spadic::MsMessageType getMessageType(const std::uint32_t frame)
Identify the message type of a given 32bit frame inside a Microslice.
std::int16_t extractSample(size_t *adcbuffer, size_t *nadcbits)
Extract all adc samples from a given adcbuffer container.
std::uint8_t getTsMsb(const std::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...
void finishDerived()
Additional explicit finish function of this algo implementation.
bool unpackRaw(const fles::MicrosliceDescriptor msdesc, const size_t *mscontent)
bool setDerivedTsParameters(size_t)
Up to now we do not need this function for this algorithm.
Spadic::MsInfoType digestBufInfoFlags(const std::uint32_t frame, std::uint16_t criId, std::uint8_t crobId, std::uint16_t elinkId)
Digest the aditional flags stored in the 4 "cccc" bits of the EPO messages.
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...
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest(std::string geoTag, std::uint32_t runId)
Get the requested parameter containers. Return the required parameter containers together with the pa...
bool unpackFex(const fles::MicrosliceDescriptor msdesc, const size_t *mscontent)
std::vector< std::uint8_t > fNrTsMsbVec
Counter for the ts_msb used to reconstruct the time.
size_t fNrNonMajorTsMsb
Counter for the ts_msb used to reconstruct the time.
void digestInfoMsg(const std::uint32_t frame, std::uint16_t criId, std::uint8_t crobId, std::uint16_t elinkId)
Digest a info message run all default information forwarding from the msg.
void digestMsFlags(const std::uint16_t flags, std::uint16_t criId, std::uint8_t crobId)
Digest the flags of the currently unpacked µSlice.
virtual ~CbmTrdUnpackAlgoR()
Destroy the Cbm Trd Unpack Task object.
static const std::uint8_t fBytesPerWord
Bytes per spadic frame stored in the microslices.
Spadic::MsInfoType getInfoType(const std::uint32_t frame, std::uint16_t criId, std::uint8_t crobId, std::uint16_t elinkId)
Identify the InfoType of a 64bit InfoMessage word inside a Microslice.
CbmTrdUnpackAlgoR & operator=(const CbmTrdUnpackAlgoR &)=delete
Assignment operator - not implemented.
size_t fMsStartTimeRelCC
Start time of the current µSlice relative to the Timeslice start time in Spadic CC.
bool unpack(const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice)
Unpack a given microslice.
size_t fNrElinkMis
Number of SOM to RDA/EOM mismatches.
size_t fMsStartTimeRel
Start time of the current µSlice relative to the Timeslice start time in ns.