CbmRoot
Loading...
Searching...
No Matches
CbmDeviceMcbmUnpack.h
Go to the documentation of this file.
1/* Copyright (C) 2020 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
12#ifndef CBMDEVICEMCBMUNPACK_H_
13#define CBMDEVICEMCBMUNPACK_H_
14
15#include "CbmMqTMessage.h"
16
17#include "Timeslice.hpp"
18
19#include "FairMQDevice.h"
20
21#include "Rtypes.h"
22#include "TObjArray.h"
23
24#include <map>
25#include <vector>
26
27class TList;
35
36class CbmDeviceMcbmUnpack : public FairMQDevice {
37public:
39 virtual ~CbmDeviceMcbmUnpack();
40
41protected:
42 virtual void InitTask();
43 bool HandleData(FairMQMessagePtr&, int);
44 bool HandleCommand(FairMQMessagePtr&, int);
45
46private:
48 static const uint16_t kusSysIdSts = 0x10;
49 static const uint16_t kusSysIdMuch = 0x50;
50 static const uint16_t kusSysIdTrd = 0x40;
51 static const uint16_t kusSysIdTof = 0x60;
52 static const uint16_t kusSysIdBmon = 0x90;
53 static const uint16_t kusSysIdRich = 0x30;
54 static const uint16_t kusSysIdPsd = 0x80;
55
57 Bool_t fbIgnoreOverlapMs = false;
58 Bool_t fbComponentsAddedToList = kFALSE;
59
61 std::string fsChannelNameDataInput = "fullts";
62 std::string fsChannelNameDataOutput = "unpts_0";
63 std::string fsChannelNameCommands = "commands";
64 UInt_t fuDigiMaskedIdBmon = 0x00005006;
65 UInt_t fuDigiMaskId = 0x0001FFFF;
66
68 std::vector<std::string> fsAllowedChannels = {fsChannelNameDataInput};
69
71 // TList* fParCList = nullptr;
72 Bool_t InitParameters(TList* fParCList);
73
75 uint64_t fulNumMessages = 0;
76 uint64_t fulTsCounter = 0;
77
85
87 std::vector<std::string> fvsSetTimeOffs = {};
88
90 size_t fuNbCoreMsPerTs = 0;
91 size_t fuNbOverMsPerTs = 0;
92 Double_t fdMsSizeInNs = 1280000;
93 Double_t fdTsCoreSizeInNs = -1.0;
94 Double_t fdTsOverSizeInNs = -1.0;
95 Double_t fdTsFullSizeInNs = -1.0;
97
98 bool IsChannelNameAllowed(std::string channelName);
99 Bool_t InitContainers();
100 Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
101 void Finish();
102 bool SendUnpData();
103};
104
105#endif /* CBMDEVICEMCBMUNPACK_H_ */
Double_t fdTsOverSizeInNs
Total size of the core MS in a TS, [nanoseconds].
std::vector< std::string > fsAllowedChannels
List of MQ channels names.
TimesliceMetaData * fTsMetaData
Total size of all MS in a TS, [nanoseconds].
CbmMcbm2018UnpackerAlgoSts * fUnpAlgoSts
Processing algos.
Bool_t fbIgnoreOverlapMs
Control flags.
Double_t fdTsFullSizeInNs
Total size of the overlap MS in a TS, [nanoseconds].
std::string fsChannelNameDataInput
User settings parameters.
static const uint16_t kusSysIdSts
Constants.
size_t fuNbCoreMsPerTs
TS MetaData storage.
CbmMcbm2018UnpackerAlgoTof * fUnpAlgoTof
std::string fsChannelNameCommands
uint64_t fulNumMessages
Statistics & first TS rejection.
CbmMcbm2018UnpackerAlgoTrdR * fUnpAlgoTrd
static const uint16_t kusSysIdPsd
CbmMcbm2018UnpackerAlgoMuch * fUnpAlgoMuch
Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
static const uint16_t kusSysIdTrd
bool HandleData(FairMQMessagePtr &, int)
std::vector< std::string > fvsSetTimeOffs
Time offsets.
CbmMcbm2018UnpackerAlgoPsd * fUnpAlgoPsd
std::string fsChannelNameDataOutput
bool IsChannelNameAllowed(std::string channelName)
static const uint16_t kusSysIdBmon
CbmMcbm2018UnpackerAlgoRich * fUnpAlgoRich
static const uint16_t kusSysIdMuch
Double_t fdTsCoreSizeInNs
Size of a single MS, [nanoseconds].
Bool_t fbComponentsAddedToList
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
static const uint16_t kusSysIdTof
Bool_t InitParameters(TList *fParCList)
Parameters management.
static const uint16_t kusSysIdRich
bool HandleCommand(FairMQMessagePtr &, int)
Timeslice unpacker algorithm for Spadic v.2.2 .