CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018RawConverterSdpb.h
Go to the documentation of this file.
1/* Copyright (C) 2019 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5// -----------------------------------------------------------------------------
6// ----- -----
7// ----- CbmMcbm2018RawConverterSdpb -----
8// ----- Created 28.06.2019 by P.-A. Loizeau -----
9// ----- -----
10// -----------------------------------------------------------------------------
11
12#ifndef CbmMcbm2018RawConverterSdpb_H
13#define CbmMcbm2018RawConverterSdpb_H
14
15// Data
16#include "Timeslice.hpp"
17
18#include "StsXyterMessage.h"
19
20// CbmRoot
21#include "CbmMcbmUnpack.h"
22
23// C/C++
24#include <map>
25#include <vector>
26
28
30public:
31 CbmMcbm2018RawConverterSdpb(UInt_t uNbSdpb = 1);
32
35
37
38 virtual Bool_t Init();
39 virtual Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
40 virtual void Reset();
41
42 virtual void Finish();
43
44 void SetParContainers();
45
46 Bool_t InitContainers();
47
48 Bool_t ReInitContainers();
49
51 void AddMsComponentToList(size_t component, UShort_t usDetectorId);
52 void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/) {};
53
54 void SetIgnoreOverlapMs(Bool_t bFlagIn = kTRUE) { fbIgnoreOverlapMs = bFlagIn; }
55
56private:
58 TList* fParCList;
61 UInt_t fuNrOfDpbs;
62 std::map<UInt_t, UInt_t> fDpbIdIndexMap;
63
65 static const Int_t kiMaxNbFlibLinks = 32;
66 static const UInt_t kuBytesPerMessage = 4;
67
69 std::vector<Bool_t> fvbMaskedComponents;
70
72 std::vector<size_t> fvMsComponentsList;
75 size_t fuNbMsLoop;
77 Double_t fdMsSizeInNs;
80
83 ULong64_t fulCurrentTsIdx;
84 ULong64_t fulCurrentMsIdx;
85 Double_t fdTsStartTime;
87 Double_t fdMsTime;
88 UInt_t fuMsIndex;
91 UInt_t fuCurrDpbId;
92 UInt_t fuCurrDpbIdx;
93
95 std::vector<std::vector<stsxyter::Message>*> fvSdpbMessages;
96
98};
99
100#endif
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Temp until we change from CbmMcbmUnpack to something else.
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
ULong64_t fulCurrentTsIdx
Total size of the core MS in a TS, [nanoseconds].
CbmMcbm2018RawConverterSdpb(const CbmMcbm2018RawConverterSdpb &)=delete
Double_t fdMsTime
End Time in ns of current TS Core from the index of the first MS first component.
std::map< UInt_t, UInt_t > fDpbIdIndexMap
Total number of sDPBs to convert.
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
std::vector< size_t > fvMsComponentsList
Parameters related to FLES containers.
Double_t fdMsSizeInNs
/‍** Ignore Overlap Ms: all fuNbOverMsPerTs MS at the end of timeslice **‍/
std::vector< Bool_t > fvbMaskedComponents
Control flags.
static const Int_t kiMaxNbFlibLinks
Map of DPB Identifier to DPB index.
CbmMcbm2018RawConverterSdpb operator=(const CbmMcbm2018RawConverterSdpb &)=delete
TList * fParCList
Settings from parameter file.
std::vector< std::vector< stsxyter::Message > * > fvSdpbMessages
Index of the DPB from which the MS currently unpacked is coming.
Double_t fdTsFullSizeInNs
Total size of the core MS in a TS, [nanoseconds].
Double_t fdTsCoreSizeInNs
Size of a single MS, [nanoseconds].
void SetIgnoreOverlapMs(Bool_t bFlagIn=kTRUE)
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)