11#ifndef CbmMcbm2018UnpackerAlgoTrdR_H
12#define CbmMcbm2018UnpackerAlgoTrdR_H
46 virtual Bool_t
Init();
56 Bool_t
ProcessTs(
const fles::Timeslice& ts);
66 Bool_t
ProcessMs(
const fles::Timeslice& ts,
size_t uMsCompIdx,
size_t uMsIdx);
69 void SetNbMsInTs(
size_t uCoreMsNb,
size_t uOverlapMsNb);
144 std::vector<std::pair<size_t, size_t>>*
const qVector =
nullptr);
171 int16_t
ExtractSample(
const uint64_t word, uint8_t sample, Bool_t multihit = kFALSE);
Timeslice unpacker algorithm for Spadic v.2.2 .
ULong64_t fNbSpadicErrorMsg
Number of Spadic error Messages.
ULong64_t fNbUnkownWord
Number of unknown data words in the Microslice stream.
void SetActiveHistograms(std::vector< bool > isActiveHistoVec)
std::map< Int_t, std::vector< Int_t > > fAsicChannelMap
Map to retrieve module channelId from asicAddress and asicChannel.
CbmTrdParSetDigi * fDigiPar
CbmTrdParameter container.
Bool_t ProcessTs(const fles::Timeslice &ts)
std::vector< size_t > fLastDigiTimeVec
void SetDebugSortOutput(Bool_t bFlagIn=kTRUE)
void SetTimeOffsetNs(Double_t dOffsetIn=0.0)
std::vector< bool > fIsActiveHistoVec
Stores all Histograms.
Double_t fTsStartTime
Time in ns of current TS from the index of the first MS first componen.
bool fIsFirstChannelsElinkEven
define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId,...
Int_t GetNumRda(Int_t nsamples)
std::map< size_t, Int_t > fSpadicMap
Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)
Spadic::MsMessageType GetMessageType(const uint64_t msg)
Bool_t CreateHistograms()
Goes through fIsActiveHistoVec and creates the activated histograms.
ECbmTrdUnpackerHistograms
@ kRawMessage_Signalshape_filtered
@ kRawMessage_Signalshape_Nt
@ kRawMessage_Signalshape_all
@ kRawMessage_Signalshape_St
@ kRawDistributionMapModule5
@ kDigiRelativeTimeMicroslice
CbmMcbm2018UnpackerAlgoTrdR & operator=(const CbmMcbm2018UnpackerAlgoTrdR &)=delete
Copy assignment operator - not implemented.
Bool_t fbBaselineAvg
Set to true if Baseline Averaging is activated in Spadic.
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
Unpacks one Microslice.
void SetFirstChannelsElinkEven(bool isEven)
Bool_t fbMonitorMode
Switch ON the filling of a minimal set of histograms.
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
CbmTrdParSetGain * fGainPar
CbmTrdParameter container.
Bool_t ProcessTs(const fles::Timeslice &ts, size_t)
ULong64_t fNbSpadicRawMsg
Counters.
int16_t ExtractSample(const uint64_t word, uint8_t sample, Bool_t multihit=kFALSE)
Extract a Sample from a given SOM or RDA word.
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
void SetMsSizeInNs(Double_t msSizeInNs)
ULong64_t fNbWildRda
Number of RDA Words outside of a Message.
void SetTimeshiftsMap(std::map< size_t, std::vector< Int_t > > *setvalue)
In the mCbm 2020 beamtime timeshifts changing during the run of the correlation time to the Bmon have...
CbmTrdRawMessageSpadic CreateRawMessage(const uint64_t word, fles::MicrosliceDescriptor msDesc)
Bool_t SetDigiOutputPointer(std::vector< CbmTrdDigi > *const pVector)
Set fTrdDigiVector to the address of pVector.
std::vector< CbmTrdRawMessageSpadic > * fTrdRawMessageVector
Output Spadic raw messages for debugging.
Bool_t fbDebugWriteOutput
If ON the raw messages output vector is filled and written to disk.
Bool_t ReInitContainers()
ULong64_t fNbTimeslices
Instance of RawToDigi class.
Double_t fTsStopTimeCore
End Time in ns of current TS Core from the index of the first MS first componen.
CbmMcbm2018UnpackerAlgoTrdR()
std::vector< CbmTrdRawMessageSpadic > GetRawMessageVector()
ULong64_t fNbSpadicEpochMsg
Number of Spadic Epoch Messages.
Spadic::MsInfoType GetInfoType(const uint64_t msg)
Bool_t fbDebugSortOutput
If ON the raw messages output vector is sorted within time.
void SetBaselineAvg(Bool_t bFlagIn=kTRUE)
Call this when Spadic Average-Baseline feature is enabled.
std::map< size_t, std::vector< Int_t > > fmapTimeshifts
Map containing the timeshift parameters for the correction of the µSlice timeshifts....
void SetRefGeoTag(TString geoTag)
Double_t fdTimeOffsetNs
User settings: Data correction parameters.
ULong64_t fCurrTsIdx
Index of current Timeslice.
CbmMcbm2018UnpackerAlgoTrdR(const CbmMcbm2018UnpackerAlgoTrdR &)=delete
Copy constructor - not implemented.
CbmTrdParSetAsic * fAsicPar
CbmTrdParameter container.
std::vector< std::pair< size_t, size_t > > * fSpadicInfoMsgVector
vector< pair< fulltime, word > >
std::shared_ptr< CbmTrdDigi > MakeDigi(CbmTrdRawMessageSpadic raw)
std::vector< CbmTrdDigi > * fTrdDigiVector
Output Digi vector.
void SetWriteOutput(Bool_t bFlagIn=kTRUE)
void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
CbmTrdParSetGas * fGasPar
CbmTrdParameter container.
Bool_t SetRawOutputPointer(std::vector< CbmTrdRawMessageSpadic > *const pVector, std::vector< std::pair< size_t, size_t > > *const qVector=nullptr)
Set fTrdRawMessageVector to the address of pVector.
ULong64_t fSpadicEpoch
Epoch counter (30 bits). Counts overflow of Spadic timestamp (11 bits).
TString fRefGeoTag
Naming tag for the reference geometry, parameters are loaded according to this tag.
Bool_t fbDebugMonitorMode
Switch ON the filling of a additional set of histograms.
std::vector< Int_t > * fvecTimeshiftsPar
Vector containing the timeshift parameters for the correction of the µSlice timeshifts for a given ts...
static const UInt_t kBytesPerWord
Constants.
Bool_t CreateHistogram(ECbmTrdUnpackerHistograms iHisto)
create the histogram correlated to iHisto
Bool_t fbWriteOutput
If ON the output Vector of digis is written to disk.
~CbmMcbm2018UnpackerAlgoTrdR()
UInt_t fMsIndex
Index of current MS within the TS.
TList * fParContList
Parameters and Address mapping.
Double_t fMsTime
Start Time in ns of current MS from its index field in header.
void SetDebugMonitorMode(Bool_t bFlagIn=kTRUE)
void SetDebugWriteOutput(Bool_t bFlagIn=kTRUE)
Describe TRD module ASIC settings (electronic gain, delays, etc)
Describe TRD module working settings (HV, etc)
Base class for storing raw information which comes from the Spadic v2.2 trough flib or from a tsa fil...