CbmRoot
Loading...
Searching...
No Matches
CbmTrdUnpackAlgoBaseR Class Referenceabstract

#include <CbmTrdUnpackAlgoBaseR.h>

Inheritance diagram for CbmTrdUnpackAlgoBaseR:
[legend]
Collaboration diagram for CbmTrdUnpackAlgoBaseR:
[legend]

Public Member Functions

 CbmTrdUnpackAlgoBaseR (std::string name)
 Create the Cbm Trd Unpack AlgoBase object.
 
virtual ~CbmTrdUnpackAlgoBaseR ()
 Destroy the Cbm Trd Unpack Task object.
 
 CbmTrdUnpackAlgoBaseR (const CbmTrdUnpackAlgoBaseR &)=delete
 Copy constructor - not implemented.
 
CbmTrdUnpackAlgoBaseRoperator= (const CbmTrdUnpackAlgoBaseR &)=delete
 Assignment operator - not implemented.
 
void SetMonitor (std::shared_ptr< CbmTrdUnpackMonitor > monitor)
 Set a predefined monitor.
 
void SetRawToDigiMethod (std::shared_ptr< CbmTrdRawToDigiBaseR > value)
 Set the Raw To Digi Method.
 
void SetSpadicObject (std::shared_ptr< CbmTrdSpadic > value)
 Set the Spadic Object.
 
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.
 
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.
 

Protected Member Functions

void digestOutput (std::unique_ptr< CbmTrdDigi > digi, CbmTrdRawMessageSpadic raw)
 Handle the output created by the explicit algorithms. E.g. write to output vectors.
 
void finish ()
 Finish function for this algorithm base clase.
 
virtual void finishDerived ()=0
 Function that allows special calls during Finish in the derived algos.
 
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.
 
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.
 
virtual Bool_t init ()
 Additional initialisation function for all BaseR derived algorithms.
 
Bool_t initParSet (FairParGenericSet *parset)
 Handles the distribution of the hidden derived classes to their explicit functions.
 
Bool_t initParSet (CbmTrdParSetAsic *parset)
 Transfer parameters from ParSetAsic container to members.
 
Bool_t initParSet (CbmTrdParSetDigi *parset)
 Transfer parameters from ParSetDigi container to members.
 
Bool_t initParSet (CbmMcbm2020TrdTshiftPar *parset)
 Transfer parameters from CbmMcbm2020TrdTshiftPar container to members.
 

Protected Attributes

std::shared_ptr< CbmTrdUnpackMonitorfMonitor = nullptr
 Potential (online) monitor for the unpacking process.
 
std::shared_ptr< CbmTrdSpadicfSpadic = nullptr
 Spadic software reprensentation object.
 
std::shared_ptr< CbmTrdRawToDigiBaseRfRTDMethod = nullptr
 raw to digi extraction method, set in the task
 
std::map< size_t, Int_t > fSpadicAddressMap = {}
 Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)
 
std::map< Int_t, std::vector< Int_t > > fAsicChannelMap = {}
 Map to retrieve module channelId from asicAddress and asicChannel.
 
std::map< size_t, std::vector< Int_t > > fTimeshiftsMap = {}
 Map containing the timeshift parameters for the correction of the µSlice timeshifts. The keys are the tsIdx, if no key is found, the shifts of the previous tsIdx are used again.
 
Bool_t fIsFirstChannelsElinkEven = kFALSE
 Define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId. Default for mCbm2020 is false thus, initialized as false.
 
size_t fNrWildRda = 0
 Number of rda frames outside of a SOM frame range.
 
size_t fNrWildEom = 0
 Number of eom frames outside of a SOM frame range.
 
size_t fNrMissingEom = 0
 Number of missing EOM frames to finish a SOM frame.
 
size_t fNrWildNul = 0
 Number of wild null words, should only appear at the end of a µSlice.
 
size_t fNrUnknownWords = 0
 Number of unknown words.
 
size_t fTsMsbLengthCC = fTsMsbLength / CbmTrdSpadic::GetClockCycle()
 length of one ts_msb in [cc]
 
std::map< std::uint32_t, std::vector< std::int32_t > > fElinkTimeOffsetMap
 Map to store time offsets for each CRI&Elink combination.
 

Static Protected Attributes

static constexpr std::uint16_t fTsMsbLength = 16000
 length of one ts_msb in [ns]
 

Detailed Description

Definition at line 44 of file CbmTrdUnpackAlgoBaseR.h.

Constructor & Destructor Documentation

◆ CbmTrdUnpackAlgoBaseR() [1/2]

CbmTrdUnpackAlgoBaseR::CbmTrdUnpackAlgoBaseR ( std::string name)

Create the Cbm Trd Unpack AlgoBase object.

Definition at line 20 of file CbmTrdUnpackAlgoBaseR.cxx.

◆ ~CbmTrdUnpackAlgoBaseR()

CbmTrdUnpackAlgoBaseR::~CbmTrdUnpackAlgoBaseR ( )
virtual

Destroy the Cbm Trd Unpack Task object.

Definition at line 22 of file CbmTrdUnpackAlgoBaseR.cxx.

◆ CbmTrdUnpackAlgoBaseR() [2/2]

CbmTrdUnpackAlgoBaseR::CbmTrdUnpackAlgoBaseR ( const CbmTrdUnpackAlgoBaseR & )
delete

Copy constructor - not implemented.

Member Function Documentation

◆ digestOutput()

void CbmTrdUnpackAlgoBaseR::digestOutput ( std::unique_ptr< CbmTrdDigi > digi,
CbmTrdRawMessageSpadic raw )
protected

Handle the output created by the explicit algorithms. E.g. write to output vectors.

Parameters
digi
raw

Definition at line 25 of file CbmTrdUnpackAlgoBaseR.cxx.

References fMonitor.

Referenced by CbmTrdUnpackAlgoLegacy2020R::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().

◆ finish()

void CbmTrdUnpackAlgoBaseR::finish ( )
inlineprotected

Finish function for this algorithm base clase.

Definition at line 103 of file CbmTrdUnpackAlgoBaseR.h.

References finishDerived(), and fMonitor.

◆ finishDerived()

virtual void CbmTrdUnpackAlgoBaseR::finishDerived ( )
protectedpure virtual

Function that allows special calls during Finish in the derived algos.

Implemented in CbmTrdUnpackAlgoLegacy2020R, and CbmTrdUnpackAlgoR.

Referenced by finish().

◆ getAsicAddress()

std::uint32_t CbmTrdUnpackAlgoBaseR::getAsicAddress ( std::uint32_t criid,
std::uint32_t crobid,
std::uint32_t elinkid )
protectedvirtual

Get the Asic Address (CbmAddress scheme) for the given hardware Ids.

Parameters
criid
crobid
elinkid
Returns
std::uint32_t

Definition at line 43 of file CbmTrdUnpackAlgoBaseR.cxx.

References fSpadicAddressMap, CbmTrdParAsic::kCriIdPosition, and CbmTrdParAsic::kCrobIdPosition.

Referenced by CbmTrdUnpackAlgoR::digestBufInfoFlags(), CbmTrdUnpackAlgoR::digestInfoMsg(), CbmTrdUnpackAlgoR::digestMsFlags(), CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().

◆ getChannelId()

std::uint32_t CbmTrdUnpackAlgoBaseR::getChannelId ( std::uint32_t asicaddress,
std::uint32_t elinkid,
std::uint32_t elinkchannelid )
protected

Get the Channel Id (CbmAddress scheme) for the given hardware Ids.

Parameters
asicaddress
elinkid
elinkchannelid
Returns
std::uint32_t

Definition at line 60 of file CbmTrdUnpackAlgoBaseR.cxx.

References fAsicChannelMap, fIsFirstChannelsElinkEven, and CbmTrdSpadic::GetNrChannels().

Referenced by CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().

◆ GetElinkTimeOffset()

std::int32_t CbmTrdUnpackAlgoBaseR::GetElinkTimeOffset ( std::uint32_t criid,
std::uint8_t elinkid )
inline

Get the time offeset to be substracted from the digis which come from a specific CRI.

Parameters
criid

Definition at line 88 of file CbmTrdUnpackAlgoBaseR.h.

References fElinkTimeOffsetMap.

Referenced by CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().

◆ init()

Bool_t CbmTrdUnpackAlgoBaseR::init ( )
protectedvirtual

Additional initialisation function for all BaseR derived algorithms.

Returns
Bool_t initOk

Definition at line 145 of file CbmTrdUnpackAlgoBaseR.cxx.

References fMonitor, fRTDMethod, and fSpadic.

◆ initParSet() [1/4]

Bool_t CbmTrdUnpackAlgoBaseR::initParSet ( CbmMcbm2020TrdTshiftPar * parset)
protected

Transfer parameters from CbmMcbm2020TrdTshiftPar container to members.

These are mCBM 2020 specific parameters needed to correct in run timeshifts.

Parameters
parset
Returns
Bool_t initOk

Definition at line 134 of file CbmTrdUnpackAlgoBaseR.cxx.

References fTimeshiftsMap, and CbmMcbm2020TrdTshiftPar::GetTimeshiftsMap().

◆ initParSet() [2/4]

Bool_t CbmTrdUnpackAlgoBaseR::initParSet ( CbmTrdParSetAsic * parset)
protected

Transfer parameters from ParSetAsic container to members.

Currently we mainly transfer here the addressing, other parameters are yet to come.

Parameters
parset
Returns
Bool_t initOk

Definition at line 91 of file CbmTrdUnpackAlgoBaseR.cxx.

References CbmTrdHardwareSetupR::CreateAsicChannelMap(), CbmTrdHardwareSetupR::CreateHwToSwAsicAddressTranslatorMap(), fAsicChannelMap, and fSpadicAddressMap.

◆ initParSet() [3/4]

Bool_t CbmTrdUnpackAlgoBaseR::initParSet ( CbmTrdParSetDigi * parset)
protected

Transfer parameters from ParSetDigi container to members.

The monitor needs this to extract module informations, e.g. ncols and nrows.

Parameters
parset
Returns
Bool_t initOk

Definition at line 115 of file CbmTrdUnpackAlgoBaseR.cxx.

References fMonitor.

◆ initParSet() [4/4]

Bool_t CbmTrdUnpackAlgoBaseR::initParSet ( FairParGenericSet * parset)
protected

Handles the distribution of the hidden derived classes to their explicit functions.

Parameters
parset
Returns
Bool_t initOk

Definition at line 73 of file CbmTrdUnpackAlgoBaseR.cxx.

References initParSet().

Referenced by initParSet().

◆ operator=()

CbmTrdUnpackAlgoBaseR & CbmTrdUnpackAlgoBaseR::operator= ( const CbmTrdUnpackAlgoBaseR & )
delete

Assignment operator - not implemented.

◆ SetElinkTimeOffsetMap()

void CbmTrdUnpackAlgoBaseR::SetElinkTimeOffsetMap ( std::map< std::uint32_t, std::vector< std::int32_t > > map)
inline

Register a time offeset to be substracted from the digis which come from a specific CRI.

Parameters
map

Definition at line 81 of file CbmTrdUnpackAlgoBaseR.h.

References fElinkTimeOffsetMap.

◆ SetMonitor()

void CbmTrdUnpackAlgoBaseR::SetMonitor ( std::shared_ptr< CbmTrdUnpackMonitor > monitor)
inline

Set a predefined monitor.

Parameters
monitorpredefined unpacking monitor

Definition at line 60 of file CbmTrdUnpackAlgoBaseR.h.

References fMonitor.

◆ SetRawToDigiMethod()

void CbmTrdUnpackAlgoBaseR::SetRawToDigiMethod ( std::shared_ptr< CbmTrdRawToDigiBaseR > value)
inline

Set the Raw To Digi Method.

Parameters
value

Definition at line 67 of file CbmTrdUnpackAlgoBaseR.h.

References fRTDMethod.

◆ SetSpadicObject()

void CbmTrdUnpackAlgoBaseR::SetSpadicObject ( std::shared_ptr< CbmTrdSpadic > value)
inline

Set the Spadic Object.

Parameters
value

Definition at line 74 of file CbmTrdUnpackAlgoBaseR.h.

References fSpadic.

Member Data Documentation

◆ fAsicChannelMap

std::map<Int_t, std::vector<Int_t> > CbmTrdUnpackAlgoBaseR::fAsicChannelMap = {}
protected

Map to retrieve module channelId from asicAddress and asicChannel.

Definition at line 196 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by getChannelId(), initParSet(), and CbmTrdUnpackAlgoLegacy2020R::makeDigi().

◆ fElinkTimeOffsetMap

std::map<std::uint32_t, std::vector<std::int32_t> > CbmTrdUnpackAlgoBaseR::fElinkTimeOffsetMap
protected

Map to store time offsets for each CRI&Elink combination.

Definition at line 227 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by GetElinkTimeOffset(), and SetElinkTimeOffsetMap().

◆ fIsFirstChannelsElinkEven

Bool_t CbmTrdUnpackAlgoBaseR::fIsFirstChannelsElinkEven = kFALSE
protected

Define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId. Default for mCbm2020 is false thus, initialized as false.

Definition at line 203 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by getChannelId(), and CbmTrdUnpackAlgoLegacy2020R::makeDigi().

◆ fMonitor

◆ fNrMissingEom

size_t CbmTrdUnpackAlgoBaseR::fNrMissingEom = 0
protected

Number of missing EOM frames to finish a SOM frame.

Definition at line 212 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by CbmTrdUnpackAlgoR::finishDerived(), and CbmTrdUnpackAlgoR::unpackRaw().

◆ fNrUnknownWords

size_t CbmTrdUnpackAlgoBaseR::fNrUnknownWords = 0
protected

◆ fNrWildEom

size_t CbmTrdUnpackAlgoBaseR::fNrWildEom = 0
protected

Number of eom frames outside of a SOM frame range.

Definition at line 209 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by CbmTrdUnpackAlgoR::finishDerived(), and CbmTrdUnpackAlgoR::unpackRaw().

◆ fNrWildNul

size_t CbmTrdUnpackAlgoBaseR::fNrWildNul = 0
protected

Number of wild null words, should only appear at the end of a µSlice.

Definition at line 215 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by CbmTrdUnpackAlgoR::finishDerived(), and CbmTrdUnpackAlgoR::unpackRaw().

◆ fNrWildRda

size_t CbmTrdUnpackAlgoBaseR::fNrWildRda = 0
protected

◆ fRTDMethod

std::shared_ptr<CbmTrdRawToDigiBaseR> CbmTrdUnpackAlgoBaseR::fRTDMethod = nullptr
protected

raw to digi extraction method, set in the task

Definition at line 190 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by init(), CbmTrdUnpackAlgoLegacy2020R::makeDigi(), CbmTrdUnpackAlgoR::makeDigi(), and SetRawToDigiMethod().

◆ fSpadic

std::shared_ptr<CbmTrdSpadic> CbmTrdUnpackAlgoBaseR::fSpadic = nullptr
protected

◆ fSpadicAddressMap

std::map<size_t, Int_t> CbmTrdUnpackAlgoBaseR::fSpadicAddressMap = {}
protected

Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)

Definition at line 193 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by getAsicAddress(), initParSet(), and CbmTrdUnpackAlgoLegacy2020R::makeDigi().

◆ fTimeshiftsMap

std::map<size_t, std::vector<Int_t> > CbmTrdUnpackAlgoBaseR::fTimeshiftsMap = {}
protected

Map containing the timeshift parameters for the correction of the µSlice timeshifts. The keys are the tsIdx, if no key is found, the shifts of the previous tsIdx are used again.

Definition at line 199 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by initParSet(), and CbmTrdUnpackAlgoLegacy2020R::setDerivedTsParameters().

◆ fTsMsbLength

std::uint16_t CbmTrdUnpackAlgoBaseR::fTsMsbLength = 16000
staticconstexprprotected

length of one ts_msb in [ns]

Definition at line 221 of file CbmTrdUnpackAlgoBaseR.h.

◆ fTsMsbLengthCC

size_t CbmTrdUnpackAlgoBaseR::fTsMsbLengthCC = fTsMsbLength / CbmTrdSpadic::GetClockCycle()
protected

length of one ts_msb in [cc]

Definition at line 224 of file CbmTrdUnpackAlgoBaseR.h.

Referenced by CbmTrdUnpackAlgoR::makeRaw().


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