21#ifndef CbmTrdUnpackAlgoBaseR_H
22#define CbmTrdUnpackAlgoBaseR_H
25#include "CbmRecoUnpackAlgo.tmpl"
32#include "Timeslice.hpp"
37#include <RtypesCore.h>
44class CbmTrdUnpackAlgoBaseR :
public CbmRecoUnpackAlgo<CbmTrdDigi, CbmTrdRawMessageSpadic, std::pair<size_t, size_t>> {
121 virtual std::uint32_t
getAsicAddress(std::uint32_t criid, std::uint32_t crobid, std::uint32_t elinkid);
131 std::uint32_t
getChannelId(std::uint32_t asicaddress, std::uint32_t elinkid, std::uint32_t elinkchannelid);
138 virtual Bool_t
init();
183 std::shared_ptr<CbmTrdUnpackMonitor>
fMonitor =
nullptr;
187 std::shared_ptr<CbmTrdSpadic>
fSpadic =
nullptr;
Base class for extracting of information from raw signals to digi level.
Software representation of the SPADIC v2.2+.
Monitor class to monitor the data from the Trd unpacker algorithms.
Describe TRD module ASIC settings (electronic gain, delays, etc)
Base class for storing raw information which comes from the Spadic v2.2 trough flib or from a tsa fil...
static Double_t GetClockCycle()
Get the Clock Cycle.
std::shared_ptr< CbmTrdRawToDigiBaseR > fRTDMethod
raw to digi extraction method, set in the task
virtual void finishDerived()=0
Function that allows special calls during Finish in the derived algos.
void SetRawToDigiMethod(std::shared_ptr< CbmTrdRawToDigiBaseR > value)
Set the Raw To Digi Method.
std::map< Int_t, std::vector< Int_t > > fAsicChannelMap
Map to retrieve module channelId from asicAddress and asicChannel.
void SetSpadicObject(std::shared_ptr< CbmTrdSpadic > value)
Set the Spadic Object.
void digestOutput(std::unique_ptr< CbmTrdDigi > digi, CbmTrdRawMessageSpadic raw)
Handle the output created by the explicit algorithms. E.g. write to output vectors.
CbmTrdUnpackAlgoBaseR(const CbmTrdUnpackAlgoBaseR &)=delete
Copy constructor - not implemented.
Bool_t initParSet(FairParGenericSet *parset)
Handles the distribution of the hidden derived classes to their explicit functions.
size_t fNrMissingEom
Number of missing EOM frames to finish a SOM frame.
size_t fTsMsbLengthCC
length of one ts_msb in [cc]
std::shared_ptr< CbmTrdUnpackMonitor > fMonitor
Potential (online) monitor for the unpacking process.
std::shared_ptr< CbmTrdSpadic > fSpadic
Spadic software reprensentation object.
virtual Bool_t init()
Additional initialisation function for all BaseR derived algorithms.
std::map< std::uint32_t, std::vector< std::int32_t > > fElinkTimeOffsetMap
Map to store time offsets for each CRI&Elink combination.
size_t fNrWildRda
Number of rda frames outside of a SOM frame range.
size_t fNrUnknownWords
Number of unknown words.
std::int32_t GetElinkTimeOffset(std::uint32_t criid, std::uint8_t elinkid)
Get the time offeset to be substracted from the digis which come from a specific CRI.
virtual std::uint32_t getAsicAddress(std::uint32_t criid, std::uint32_t crobid, std::uint32_t elinkid)
Get the Asic Address (CbmAddress scheme) for the given hardware Ids.
CbmTrdUnpackAlgoBaseR(std::string name)
Create the Cbm Trd Unpack AlgoBase object.
std::uint32_t getChannelId(std::uint32_t asicaddress, std::uint32_t elinkid, std::uint32_t elinkchannelid)
Get the Channel Id (CbmAddress scheme) for the given hardware Ids.
Bool_t fIsFirstChannelsElinkEven
Define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId....
virtual ~CbmTrdUnpackAlgoBaseR()
Destroy the Cbm Trd Unpack Task object.
size_t fNrWildEom
Number of eom frames outside of a SOM frame range.
void SetElinkTimeOffsetMap(std::map< std::uint32_t, std::vector< std::int32_t > > map)
Register a time offeset to be substracted from the digis which come from a specific CRI.
void SetMonitor(std::shared_ptr< CbmTrdUnpackMonitor > monitor)
Set a predefined monitor.
size_t fNrWildNul
Number of wild null words, should only appear at the end of a µSlice.
void finish()
Finish function for this algorithm base clase.
static constexpr std::uint16_t fTsMsbLength
length of one ts_msb in [ns]
std::map< size_t, Int_t > fSpadicAddressMap
Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)
std::map< size_t, std::vector< Int_t > > fTimeshiftsMap
Map containing the timeshift parameters for the correction of the µSlice timeshifts....
CbmTrdUnpackAlgoBaseR & operator=(const CbmTrdUnpackAlgoBaseR &)=delete
Assignment operator - not implemented.