CbmRoot
|
#include <CbmTrdUnpackAlgoLegacy2020R.h>
Public Member Functions | |
CbmTrdUnpackAlgoLegacy2020R () | |
Create the Cbm Trd Unpack AlgoBase object. | |
virtual | ~CbmTrdUnpackAlgoLegacy2020R () |
Destroy the Cbm Trd Unpack Task object. | |
CbmTrdUnpackAlgoLegacy2020R (const CbmTrdUnpackAlgoLegacy2020R &)=delete | |
Copy constructor - not implemented. | |
CbmTrdUnpackAlgoLegacy2020R & | operator= (const CbmTrdUnpackAlgoLegacy2020R &)=delete |
Assignment operator - not implemented. | |
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 paths to the ascii files to. | |
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 | |
size_t | extractEpoch (const size_t word) |
Extract the epoch time reference information from the epoch word. | |
std::int16_t | extractSample (const size_t word, const Spadic::MsMessageType msgType, std::uint32_t isample, bool multihit=false) |
Extract the given sample from the given rda word. | |
void | finishDerived () |
Additional explicit finish function of this algo implementation. | |
Spadic::MsInfoType | getInfoType (const size_t msg) |
Identify the InfoType of a 64bit InfoMessage word inside a Microslice. | |
Spadic::MsMessageType | getMessageType (const size_t msg) |
Identify the message type of a 64bit word inside a Microslice. | |
std::uint8_t | getNrOfRdaWords (std::uint8_t nsamples) |
Get the Nr Of Rda Words required for the amount of ADC samples. | |
virtual CbmTrdRawMessageSpadic | makeRaw (const size_t word, fles::MicrosliceDescriptor msDesc) |
Create a CbmTrdRawMessageSpadic from the hit message input. | |
void | makeDigi (CbmTrdRawMessageSpadic raw) |
Create an actual digi from the raw message. | |
virtual bool | setDerivedTsParameters (size_t itimeslice) |
Set the Derived Ts Parameters. | |
virtual bool | unpack (const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice) |
Unpack a given microslice. | |
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 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 | |
const std::vector< std::uint8_t > | fExtractSampleIndicesVec |
std::vector< std::int32_t > * | fTimeshiftsParVec = nullptr |
Vector containing the timeshift parameters for the correction of the µSlice timeshifts for a given tsIdx. | |
size_t | fEpoch = 0 |
Time of the current epoch marker. | |
size_t | fMsLengthCC = 1.28e6 / CbmTrdSpadic::GetClockCycle() |
Microslice length [CC]. To be overwritten in the version specific unpackers. | |
std::shared_ptr< CbmTrdUnpackMonitor > | fMonitor = nullptr |
Potential (online) monitor for the unpacking process. | |
std::shared_ptr< CbmTrdSpadic > | fSpadic = nullptr |
Spadic software reprensentation object. | |
std::shared_ptr< CbmTrdRawToDigiBaseR > | fRTDMethod = 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 const std::uint8_t | fBytesPerWord = 8 |
Bytes per word stored in the microslices. | |
static constexpr std::uint16_t | fTsMsbLength = 16000 |
length of one ts_msb in [ns] | |
Definition at line 36 of file CbmTrdUnpackAlgoLegacy2020R.h.
CbmTrdUnpackAlgoLegacy2020R::CbmTrdUnpackAlgoLegacy2020R | ( | ) |
Create the Cbm Trd Unpack AlgoBase object.
Definition at line 23 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
|
virtual |
Destroy the Cbm Trd Unpack Task object.
Definition at line 28 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
|
delete |
Copy constructor - not implemented.
|
protectedinherited |
Handle the output created by the explicit algorithms. E.g. write to output vectors.
digi | |
raw |
Definition at line 25 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::fMonitor.
Referenced by makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().
|
protected |
Extract the epoch time reference information from the epoch word.
word |
Definition at line 119 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
Referenced by unpack().
|
protected |
Extract the given sample from the given rda word.
word | the 64bit Message Word |
sample | Which sample to extract [0,31] |
multihit | Set to true if current word belongs to a multihit message. |
When the average baseline feature of the spadic22 is activated, the value of samples[0] is always lower than -128, so we know it is 10----— Because of this it is possible to increase the precision by two bits, by cutting the two MSBs off and shifting everything two bits to the left. Here we need to undo this operation by shifting two bits righ and setting the MSB to 1 (negative sign) and the second msb to 0 (value < -128 ).
Definition at line 68 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References fExtractSampleIndicesVec, CbmTrdUnpackAlgoBaseR::fSpadic, Spadic::kRDA, Spadic::kSOM, and x.
|
inlineprotectedinherited |
Finish function for this algorithm base clase.
Definition at line 103 of file CbmTrdUnpackAlgoBaseR.h.
References CbmTrdUnpackAlgoBaseR::finishDerived(), and CbmTrdUnpackAlgoBaseR::fMonitor.
|
protectedvirtual |
Additional explicit finish function of this algo implementation.
Implements CbmTrdUnpackAlgoBaseR.
Definition at line 127 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References CbmTrdUnpackAlgoBaseR::fNrUnknownWords, and CbmTrdUnpackAlgoBaseR::fNrWildRda.
|
protectedvirtualinherited |
Get the Asic Address (CbmAddress scheme) for the given hardware Ids.
criid | |
crobid | |
elinkid |
Definition at line 43 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::fSpadicAddressMap, CbmTrdParAsic::kCriIdPosition, and CbmTrdParAsic::kCrobIdPosition.
Referenced by CbmTrdUnpackAlgoR::digestBufInfoFlags(), CbmTrdUnpackAlgoR::digestInfoMsg(), CbmTrdUnpackAlgoR::digestMsFlags(), CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().
|
protectedinherited |
Get the Channel Id (CbmAddress scheme) for the given hardware Ids.
asicaddress | |
elinkid | |
elinkchannelid |
Definition at line 60 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::fAsicChannelMap, CbmTrdUnpackAlgoBaseR::fIsFirstChannelsElinkEven, and CbmTrdSpadic::GetNrChannels().
Referenced by CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().
|
inlineinherited |
Get the time offeset to be substracted from the digis which come from a specific CRI.
criid |
Definition at line 88 of file CbmTrdUnpackAlgoBaseR.h.
References CbmTrdUnpackAlgoBaseR::fElinkTimeOffsetMap.
Referenced by CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoR::makeDigi().
|
protected |
Identify the InfoType of a 64bit InfoMessage word inside a Microslice.
Definition at line 134 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References Spadic::kBOM, Spadic::kBUF, Spadic::kMIS, Spadic::kMSB, and Spadic::kUNU.
|
protected |
Identify the message type of a 64bit word inside a Microslice.
Definition at line 166 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References Spadic::kEPO, Spadic::kINF, Spadic::kNUL, Spadic::kRDA, Spadic::kSOM, and Spadic::kUNK.
Referenced by unpack().
|
protected |
Get the Nr Of Rda Words required for the amount of ADC samples.
nsamples |
Definition at line 195 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
Referenced by unpack().
|
virtual |
Get the requested parameter containers. Return the required parameter containers together with the paths to the ascii files to.
[in] | std::string | geoTag as used in CbmSetup |
[in] | std::uint32_t | runId for runwise defined parameters |
Definition at line 32 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References CbmTrdUnpackAlgoBaseR::fMonitor.
|
protectedvirtualinherited |
Additional initialisation function for all BaseR derived algorithms.
Definition at line 145 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::fMonitor, CbmTrdUnpackAlgoBaseR::fRTDMethod, and CbmTrdUnpackAlgoBaseR::fSpadic.
|
protectedinherited |
Transfer parameters from CbmMcbm2020TrdTshiftPar container to members.
These are mCBM 2020 specific parameters needed to correct in run timeshifts.
parset |
Definition at line 134 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::fTimeshiftsMap, and CbmMcbm2020TrdTshiftPar::GetTimeshiftsMap().
|
protectedinherited |
Transfer parameters from ParSetAsic container to members.
Currently we mainly transfer here the addressing, other parameters are yet to come.
parset |
Definition at line 91 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdHardwareSetupR::CreateAsicChannelMap(), CbmTrdHardwareSetupR::CreateHwToSwAsicAddressTranslatorMap(), CbmTrdUnpackAlgoBaseR::fAsicChannelMap, and CbmTrdUnpackAlgoBaseR::fSpadicAddressMap.
|
protectedinherited |
Transfer parameters from ParSetDigi container to members.
The monitor needs this to extract module informations, e.g. ncols and nrows.
parset |
Definition at line 115 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::fMonitor.
|
protectedinherited |
Handles the distribution of the hidden derived classes to their explicit functions.
parset |
Definition at line 73 of file CbmTrdUnpackAlgoBaseR.cxx.
References CbmTrdUnpackAlgoBaseR::initParSet().
Referenced by CbmTrdUnpackAlgoBaseR::initParSet().
|
protected |
Create an actual digi from the raw message.
raw |
Definition at line 253 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References CbmTrdUnpackAlgoBaseR::digestOutput(), CbmTrdUnpackAlgoBaseR::fAsicChannelMap, CbmTrdUnpackAlgoBaseR::fIsFirstChannelsElinkEven, CbmTrdUnpackAlgoBaseR::fRTDMethod, CbmTrdUnpackAlgoBaseR::fSpadicAddressMap, fTimeshiftsParVec, CbmTrdRawMessageSpadic::GetChannelId(), CbmTrdRawMessageSpadic::GetCriId(), CbmTrdRawMessageSpadic::GetCrobId(), CbmTrdRawToDigiBaseR::GetDigiTriggerType(), CbmTrdRawMessageSpadic::GetElinkId(), CbmTrdRawMessageSpadic::GetFullTime(), CbmTrdRawMessageSpadic::GetHitType(), CbmTrdSpadic::GetNrChannels(), CbmTrdRawMessageSpadic::GetSamples(), CbmTrdRawMessageSpadic::GetTime(), CbmTrdParAsic::kCriIdPosition, CbmTrdParAsic::kCrobIdPosition, and CbmTrdRawMessageSpadic::SetTime().
Referenced by unpack().
|
protectedvirtual |
Create a CbmTrdRawMessageSpadic from the hit message input.
word | |
msDesc |
Extract Metadata
Definition at line 202 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References extractSample(), fEpoch, fMsLengthCC, and Spadic::kSOM.
Referenced by unpack().
|
delete |
Assignment operator - not implemented.
|
protectedvirtual |
Set the Derived Ts Parameters.
In this function parameters required by the explicit algo connected to the timeslice are set.
itimeslice |
Definition at line 310 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References CbmTrdUnpackAlgoBaseR::fTimeshiftsMap, and fTimeshiftsParVec.
|
inlineinherited |
Register a time offeset to be substracted from the digis which come from a specific CRI.
map |
Definition at line 81 of file CbmTrdUnpackAlgoBaseR.h.
References CbmTrdUnpackAlgoBaseR::fElinkTimeOffsetMap.
|
inlineinherited |
Set a predefined monitor.
monitor | predefined unpacking monitor |
Definition at line 60 of file CbmTrdUnpackAlgoBaseR.h.
References CbmTrdUnpackAlgoBaseR::fMonitor.
|
inlineinherited |
Set the Raw To Digi Method.
value |
Definition at line 67 of file CbmTrdUnpackAlgoBaseR.h.
References CbmTrdUnpackAlgoBaseR::fRTDMethod.
|
inlineinherited |
Set the Spadic Object.
value |
Definition at line 74 of file CbmTrdUnpackAlgoBaseR.h.
References CbmTrdUnpackAlgoBaseR::fSpadic.
|
protectedvirtual |
Unpack a given microslice.
ts | timeslice pointer |
icomp | index to the component to be unpacked |
imslice | index of the microslice to be unpacked |
If the new Message has more than 3 Samples, we need to read in the next words that contain the remaining samples.
Loop over the rda words
Loop over Samples. There are max 7 samples per word.
Save info message if needed.
Definition at line 322 of file CbmTrdUnpackAlgoLegacy2020R.cxx.
References extractEpoch(), extractSample(), fBytesPerWord, fEpoch, CbmTrdUnpackAlgoBaseR::fNrUnknownWords, CbmTrdUnpackAlgoBaseR::fNrWildRda, getMessageType(), getNrOfRdaWords(), CbmTrdRawMessageSpadic::GetNrSamples(), Spadic::kEPO, Spadic::kINF, Spadic::kNUL, Spadic::kRDA, Spadic::kSOM, Spadic::kUNK, makeDigi(), makeRaw(), and CbmTrdRawMessageSpadic::SetSample().
|
protectedinherited |
Map to retrieve module channelId from asicAddress and asicChannel.
Definition at line 196 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by CbmTrdUnpackAlgoBaseR::getChannelId(), CbmTrdUnpackAlgoBaseR::initParSet(), and makeDigi().
|
staticprotected |
Bytes per word stored in the microslices.
Definition at line 163 of file CbmTrdUnpackAlgoLegacy2020R.h.
Referenced by unpack().
|
protectedinherited |
Map to store time offsets for each CRI&Elink combination.
Definition at line 227 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by CbmTrdUnpackAlgoBaseR::GetElinkTimeOffset(), and CbmTrdUnpackAlgoBaseR::SetElinkTimeOffsetMap().
|
protected |
Time of the current epoch marker.
Definition at line 156 of file CbmTrdUnpackAlgoLegacy2020R.h.
|
protected |
Definition at line 87 of file CbmTrdUnpackAlgoLegacy2020R.h.
Referenced by extractSample().
|
protectedinherited |
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 CbmTrdUnpackAlgoBaseR::getChannelId(), and makeDigi().
|
protectedinherited |
Potential (online) monitor for the unpacking process.
Definition at line 183 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by CbmTrdUnpackAlgoR::digestBufInfoFlags(), CbmTrdUnpackAlgoR::digestInfoMsg(), CbmTrdUnpackAlgoR::digestMsFlags(), CbmTrdUnpackAlgoBaseR::digestOutput(), CbmTrdUnpackAlgoBaseR::finish(), GetParContainerRequest(), CbmTrdUnpackAlgoR::GetParContainerRequest(), CbmTrdUnpackAlgoBaseR::init(), CbmTrdUnpackAlgoBaseR::initParSet(), CbmTrdUnpackAlgoR::makeDigi(), CbmTrdUnpackAlgoBaseR::SetMonitor(), and CbmTrdUnpackAlgoR::unpack().
|
protected |
Microslice length [CC]. To be overwritten in the version specific unpackers.
Definition at line 159 of file CbmTrdUnpackAlgoLegacy2020R.h.
Referenced by makeRaw().
|
protectedinherited |
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().
|
protectedinherited |
Number of unknown words.
Definition at line 218 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by finishDerived(), CbmTrdUnpackAlgoR::finishDerived(), unpack(), and CbmTrdUnpackAlgoR::unpackRaw().
|
protectedinherited |
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().
|
protectedinherited |
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().
|
protectedinherited |
Number of rda frames outside of a SOM frame range.
Definition at line 206 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by finishDerived(), CbmTrdUnpackAlgoR::finishDerived(), unpack(), and CbmTrdUnpackAlgoR::unpackRaw().
|
protectedinherited |
raw to digi extraction method, set in the task
Definition at line 190 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by CbmTrdUnpackAlgoBaseR::init(), makeDigi(), CbmTrdUnpackAlgoR::makeDigi(), and CbmTrdUnpackAlgoBaseR::SetRawToDigiMethod().
|
protectedinherited |
Spadic software reprensentation object.
Definition at line 187 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by extractSample(), CbmTrdUnpackAlgoBaseR::init(), CbmTrdUnpackAlgoR::makeDigi(), CbmTrdUnpackAlgoBaseR::SetSpadicObject(), CbmTrdUnpackAlgoR::unpack(), and CbmTrdUnpackAlgoR::unpackRaw().
|
protectedinherited |
Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)
Definition at line 193 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by CbmTrdUnpackAlgoBaseR::getAsicAddress(), CbmTrdUnpackAlgoBaseR::initParSet(), and makeDigi().
|
protectedinherited |
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 CbmTrdUnpackAlgoBaseR::initParSet(), and setDerivedTsParameters().
|
protected |
Vector containing the timeshift parameters for the correction of the µSlice timeshifts for a given tsIdx.
Definition at line 153 of file CbmTrdUnpackAlgoLegacy2020R.h.
Referenced by makeDigi(), and setDerivedTsParameters().
|
staticconstexprprotectedinherited |
length of one ts_msb in [ns]
Definition at line 221 of file CbmTrdUnpackAlgoBaseR.h.
|
protectedinherited |
length of one ts_msb in [cc]
Definition at line 224 of file CbmTrdUnpackAlgoBaseR.h.
Referenced by CbmTrdUnpackAlgoR::makeRaw().