5#ifndef CbmStsUnpackAlgoLegacy_H
6#define CbmStsUnpackAlgoLegacy_H
44 virtual void MaskNoisyChannel(
const uint32_t uFeb,
const uint32_t uChan,
const bool bMasked =
true);
58 bool unpack(
const fles::Timeslice* ts, std::uint16_t icomp, UInt_t imslice);
71 std::vector<std::vector<std::vector<int32_t>>>
96 void InitTempVectors(std::vector<int32_t>* viModuleType, std::vector<int32_t>* viModAddress,
97 std::vector<std::vector<std::vector<int32_t>>>* viFebModuleIdx,
98 std::vector<std::vector<bool>>* vbCrobActiveFlag,
99 std::vector<std::vector<std::vector<int32_t>>>* viFebModuleSide);
101 void PrintActiveCrobs(
const std::vector<std::vector<bool>>& vbCrobActiveFlag);
102 void PrintAddressMaps(
const std::vector<std::vector<std::vector<int32_t>>>& viFebModuleIdx,
103 const std::vector<std::vector<std::vector<int32_t>>>& viFebModuleSide);
106 void AddHitsToDigiVect(std::vector<stsxyter::FinalHit>* vmHitsIn, std::vector<CbmStsDigi>* vDigiVectOut);
114 std::vector<std::vector<bool>>
129 std::chrono::steady_clock::time_point
133 std::vector<stsxyter::FinalHit>
139 std::vector<std::vector<uint16_t>>
141 std::vector<std::vector<uint32_t>>
143 std::vector<std::vector<uint16_t>>
153 void LoopMsMessages(
const uint8_t* msContent,
const uint32_t uSize,
const size_t uMsIdx);
Baseclass for the Sts unpacker algorithms.
uint64_t GetFullTimeStamp(const uint16_t usRawTs)
Get full time stamp from raw time stamp.
std::vector< double > fvdFebAdcGain
Module side for each FEB, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
void PrintAddressMaps(const std::vector< std::vector< std::vector< int32_t > > > &viFebModuleIdx, const std::vector< std::vector< std::vector< int32_t > > > &viFebModuleSide)
~CbmStsUnpackAlgoLegacy()
void ProcessEpochInfo(const stsxyter::Message &mess)
void ProcessErrorInfo(const stsxyter::Message &mess)
void InitTempVectors(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)
std::vector< uint64_t > fvulCurrentTsMsb
std::map< uint32_t, uint32_t > fDpbIdIndexMap
Number of FEBs with StsXyter ASICs.
std::vector< stsxyter::FinalHit > fvmHitsInMs
Hits time-sorting.
CbmMcbm2018StsPar * fUnpackPar
Settings from parameter file.
bool initParSet(FairParGenericSet *parset)
ADC offset in e-, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
void InitDpbIdIndexMap()
Map of DPB Identifier to DPB index.
CbmStsUnpackAlgoLegacy(const CbmStsUnpackAlgoLegacy &)=delete
Copy constructor - not implemented.
std::vector< bool > fvbMaskedComponents
Control flags.
std::vector< std::vector< uint16_t > > fvvusLastTsChan
std::vector< std::vector< bool > > fvvbMaskedChannels
uint32_t fuCurrDpbIdx
Current data properties.
CbmStsUnpackAlgoLegacy & operator=(const CbmStsUnpackAlgoLegacy &)=delete
Assignment operator - not implemented.
void RefreshTsMsbFields(const size_t uMsIdx)
std::vector< int32_t > fviFebSide
STS address for each FEB, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
virtual void MaskNoisyChannel(const uint32_t uFeb, const uint32_t uChan, const bool bMasked=true)
Mask a Noisy Channel.
void InitInternalStatus()
void SetTimeOffsetNs(double dOffsetIn=0.0)
void PrintActiveCrobs(const std::vector< std::vector< bool > > &vbCrobActiveFlag)
void ProcessStatusInfo(const stsxyter::Message &mess, uint32_t uIdx)
std::chrono::steady_clock::time_point ftStartTimeUnix
void ProcessHitInfo(const stsxyter::Message &mess)
TS MSB cycle of last hit message for each channel, [ AsicIdx ][ Chan ].
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.
std::vector< std::vector< std::vector< int32_t > > > fviFebType
std::vector< std::vector< uint32_t > > fvvuLastTsMsbChan
ADC of last hit message for each channel, [ AsicIdx ][ Chan ].
void ProcessTsMsbInfo(const stsxyter::Message &mess, uint32_t uMessIdx=0, uint32_t uMsIdx=0)
void AddHitsToDigiVect(std::vector< stsxyter::FinalHit > *vmHitsIn, std::vector< CbmStsDigi > *vDigiVectOut)
Add the hits to the output buffer as Digis.
void LoopMsMessages(const uint8_t *msContent, const uint32_t uSize, const size_t uMsIdx)
uint64_t fulCurrentMsIdx
Vector of channel masks, [ NbFeb ][ NbCHanInFeb ], used only if fbUseChannelMask is true.
std::vector< double > fvdFebAdcOffs
ADC gain in e-/b, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
double fdTimeOffsetNs
User settings: Data correction parameters.
std::vector< uint32_t > fvuCurrentTsMsbCycle
Current TS MSB for each DPB.
std::vector< std::vector< uint16_t > > fvvusLastTsMsbCycleChan
TS MSB of last hit message for each channel, [ AsicIdx ][ Chan ].
std::vector< int32_t > fviFebAddress
Pulser flag for each FEB, [ NbDpb * NbCrobPerDpb * NbFebsPerCrob ].
std::vector< std::vector< uint16_t > > fvvusLastAdcChan
TS of last hit message for each channel, [ AsicIdx ][ Chan ].
std::vector< bool > fvbFebPulser
FEB type, [ NbDpb ][ NbCrobPerDpb ][ NbFebsPerCrob ], 0 = A, 1 = B, -1 if inactive.
static const uint32_t kuMaxTsMsbDiffDuplicates
All hits (time in bins, ADC in bins, asic, channel) in last MS, sorted with "<" operator.