21#ifndef CbmStsUnpackAlgo_H
22#define CbmStsUnpackAlgo_H
49 virtual void MaskNoisyChannel(
const uint32_t uFeb,
const uint32_t uChan,
const bool bMasked =
true);
62 uint32_t
getAsicIndex(uint32_t dpbidx, uint32_t crobidx, uint16_t elinkidx);
103 std::vector<int32_t>* viModAddress,
104 std::vector<std::vector<std::vector<int32_t>>>* viFebModuleIdx,
105 std::vector<std::vector<bool>>* vbCrobActiveFlag,
106 std::vector<std::vector<std::vector<int32_t>>>* viFebModuleSide);
117 void loopMsMessages(
const uint8_t* msContent,
const uint32_t uSize,
const size_t uMsIdx);
124 const std::vector<std::vector<std::vector<int32_t>>>& viFebModuleSide);
166 bool unpack(
const fles::Timeslice* ts, std::uint16_t icomp, UInt_t imslice);
222 std::vector<std::vector<std::vector<int32_t>>>
fviFebType = {};
Baseclass for the Sts unpacker algorithms.
std::shared_ptr< CbmStsUnpackMonitor > fMonitor
Potential (online) monitor for the unpacking process.
uint32_t fuCurrDpbIdx
Current dpb id.
std::vector< std::vector< bool > > fvvbMaskedChannels
Vector of channel masks, [ NbFeb ][ NbCHanInFeb ], used only if fbUseChannelMask is true.
static const uint32_t kuMaxTsMsbDiffDuplicates
Duplicate hits suppression.
bool setDerivedTsParameters(size_t)
Set the Derived Ts Parameters.
std::vector< double > fvdFebAdcOffs
ADC offset in e-, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
void initInternalStatus(CbmMcbm2018StsPar *parset)
experts please add description here
std::vector< int32_t > fviFebSide
Module side for each FEB, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
std::vector< uint32_t > fvuCurrentTsMsbCycle
Current TS MSB cycle for DPB.
void initDpbIdIndexMap(CbmMcbm2018StsPar *parset)
Initialize the DpbIdIndexMap with the information from the parset.
uint32_t fNrAsicsPerFeb
Number of ASICs per FEB.
uint32_t fNrCrobPerDpb
Number of CROBs per DPB.
std::vector< uint64_t > fvulCurrentTsMsb
Current TS MSB for each DPB.
void SetMonitor(std::shared_ptr< CbmStsUnpackMonitor > monitor)
Set a predefined monitor.
Bool_t initParSet(FairParGenericSet *parset)
Handles the distribution of the hidden derived classes to their explicit functions.
void processEpochInfo(const stsxyter::Message &)
experts please add description marked as not used currently
std::vector< std::vector< uint64_t > > fvvulLastTsMsbChan
TS MSB in TS of last hit message for each channel, [ AsicIdx ][ Chan ].
std::vector< bool > fvbMaskedComponents
Masked components to print out missing component only once.
void processErrorInfo(const stsxyter::Message &mess)
experts please add description
std::vector< int > fElinkIdxToFebIdxVec
Vector used for the translation between eLink index and FEB index.
virtual ~CbmStsUnpackAlgo()
Destroy the Cbm Sts Unpack Task object.
void loopMsMessages(const uint8_t *msContent, const uint32_t uSize, const size_t uMsIdx)
Main loop over the sts xyter messages in the µSlices.
uint32_t fNrFebsPerCrob
Number of FEBs per CROB.
CbmStsUnpackAlgo()
Create the Cbm Sts Unpack AlgoBase object.
std::map< uint32_t, uint32_t > fDpbIdIndexMap
Map of DPB Identifier to DPB index.
uint32_t fNrElinksPerCrob
Number of eLinks per CROB.
std::vector< std::pair< uint32_t, uint32_t > > fElinkIdxToAsicIdxVec
Vector used for the translation between eLink index and Asic index first is feb type A second is feb ...
virtual void MaskNoisyChannel(const uint32_t uFeb, const uint32_t uChan, const bool bMasked=true)
Mask a Noisy Channel.
Bool_t init()
Intialisation at begin of run. Special inits of the derived algos.
uint32_t getAsicIndex(uint32_t dpbidx, uint32_t crobidx, uint16_t elinkidx)
Get the Asic Index.
uint64_t fulTsStartInTsMsb
Start time of the TS expressed in TS_MSB instead of ns.
uint64_t getFullTimeStamp(const uint16_t usRawTs)
Get the Full Time Stamp from raw time stamp.
bool fbUseChannelMask
flag if channel mask is to be used or not. Set automatically via MaskNoisyChannels
bool unpack(const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice)
Unpack a given microslice. To be implemented in the derived unpacker algos.
void processStatusInfo(const stsxyter::Message &mess, uint32_t uIdx)
experts please add description
std::vector< bool > fvbFebPulser
Pulser flag for each FEB, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
uint32_t fNrChsPerAsic
Number of Channels per Asic.
std::vector< std::vector< std::vector< int32_t > > > fviFebType
FEB type, [ NbDpb ][ NbCrobPerDpb ][ NbFebsPerCrob ], 0 = A, 1 = B, -1 if inactive.
std::vector< std::vector< uint16_t > > fvvusLastAdcChan
ADC of last hit message for each channel, [ AsicIdx ][ Chan ].
uint32_t fuNbFebs
Number of FEBs with StsXyter ASICs.
CbmStsUnpackAlgo(const CbmStsUnpackAlgo &)=delete
Copy constructor - not implemented.
std::vector< std::vector< uint16_t > > fvvusLastTsChan
TS of last hit message for each channel, [ AsicIdx ][ Chan ].
void processTsMsbInfo(const stsxyter::Message &mess, uint32_t uMessIdx, uint32_t uMsIdx)
experts please add description
std::vector< uint64_t > fulTsMsbIndexInTs
Current TS MSB cycle for DPB relative to TS start.
void printActiveCrobs(CbmMcbm2018StsPar *parset, const std::vector< std::vector< bool > > &vbCrobActiveFlag)
experts please add description
uint64_t fMsStartTime
Current µSlice time.
uint32_t fNrAsicsPerCrob
Number of ASICs per CROB.
CbmStsUnpackAlgo & operator=(const CbmStsUnpackAlgo &)=delete
Assignment operator - not implemented.
std::vector< int32_t > fviFebAddress
STS address for each FEB, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
uint32_t fNrChsPerFeb
Number of Channels per FEB.
void initTempVectors(CbmMcbm2018StsPar *parset, std::vector< int32_t > *viModuleType, std::vector< int32_t > *viModAddress, std::vector< std::vector< std::vector< int32_t > > > *viFebModuleIdx, std::vector< std::vector< bool > > *vbCrobActiveFlag, std::vector< std::vector< std::vector< int32_t > > > *viFebModuleSide)
Initialize and transfer the informations to the parameters storage vectors.
void printAddressMaps(CbmMcbm2018StsPar *parset, const std::vector< std::vector< std::vector< int32_t > > > &viFebModuleIdx, const std::vector< std::vector< std::vector< int32_t > > > &viFebModuleSide)
experts please add description
void refreshTsMsbFields(const uint32_t imslice, const size_t mstime)
experts please add description here
void processHitInfo(const stsxyter::Message &mess)
Process the information of the hit message and create a StsDigi from it.
std::vector< uint32_t > fvbFebAdcCut
ADC cuts for FEBs.
std::vector< double > fvdFebAdcGain
ADC gain in e-/b, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].