8#include "MicrosliceDescriptor.hpp"
17#define NFASPCROB NFASPMOD / NCROBMOD
20#define FASP_EPOCH_LENGTH 128
33 FaspMessage(uint8_t c, uint8_t typ, uint8_t t, uint16_t d, uint8_t rob, uint8_t asic);
90 return (numErrors > 0 ?
true :
false);
132 Result_t operator()(
const uint8_t* msContent,
const fles::MicrosliceDescriptor& msDescr,
133 const uint64_t tTimeslice)
const override;
151 bool pushDigis(std::vector<FaspMessage> messages,
const uint64_t time, MsContext& ctx)
const;
std::tuple< std::vector< Digi_t >, Monitor_t, Aux_t > Result_t
Unpack algorithm for TRD.
static const std::uint8_t fBytesPerWord
Bytes per FASP frame stored in the microslices (32 bits words)
Result_t operator()(const uint8_t *msContent, const fles::MicrosliceDescriptor &msDescr, const uint64_t tTimeslice) const override
Algorithm execution.
UnpackMS(const UnpackPar &pars)
Construct from parameters.
std::vector< CbmTrdDigi > FinalizeComponent(MsContext &ctx) const
Finalize component (e.g. copy from temp buffers)
void SetParams(std::unique_ptr< UnpackPar > params)
Set the parameter container.
bool pushDigis(std::vector< FaspMessage > messages, const uint64_t time, MsContext &ctx) const
~UnpackMS() override
Destructor.
UnpackPar fParams
Parameter container.
Data structure for unpacking the FASP word.
uint8_t tlab
time of the digi inside the epoch
uint8_t type
message type 0 = epoch, 1 = data (not used for the moment)
FaspMessage(uint8_t c, uint8_t typ, uint8_t t, uint16_t d, uint8_t rob, uint8_t asic)
uint32_t epoch
epoch id (not used for the moment)
uint8_t ch
ch id in the FASP
uint32_t mod
full module address according to CbmTrdAddress
uint8_t fasp
FASP id in the module.
uint8_t crob
CROB id in the module.
TRD Unpacking parameters for one Asic.
std::vector< UnpackChannelPar > fChanParams
Parameters for different channels.
TRD Unpacking parameters for one Asic channel.
int32_t fPadAddress
Pad address for channel.
bool fMask
Flag for channel masking.
uint64_t fDaqOffset
Time calibration parameter.
UnpackMonitorData fMonitor
Container for monitoring data.
std::array< std::vector< CbmTrdDigi >, NFASPMOD *NFASPCH > fDigiBuffer
uint32_t fNumSelfTriggeredData
word fulfills data & 0x2000
uint32_t fNumIncompleteDigis
incomplete digis left in pads after finalization
uint32_t fNumErrEndBitSet
Corrupted data with end bit set.
Parameters required for the TRD unpacking (specific to one component)
uint16_t fModId
Module ID of component.
int32_t fSystemTimeOffset
Time calibration parameter.
uint8_t fCrobId
CROB ID of component.
std::vector< UnpackAsicPar > fAsicParams
Parameters for each ASIC.