CbmRoot
Loading...
Searching...
No Matches
CbmDeviceMcbmEventBuilderWin.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 CBMDEVICEMCBMEVTBUILDERWIN_H_
13#define CBMDEVICEMCBMEVTBUILDERWIN_H_
14
17#include "CbmMqTMessage.h"
18#include "CbmMuchBeamTimeDigi.h"
19#include "CbmPsdDigi.h"
20#include "CbmRichDigi.h"
21#include "CbmStsDigi.h"
22#include "CbmTofDigi.h"
23#include "CbmTrdDigi.h"
24
26#include "FairMQDevice.h"
27
29#include "Rtypes.h"
30#include "TObjArray.h"
31
33#include <chrono>
34#include <map>
35#include <vector>
36
37class TList;
38class TClonesArray;
39class FairRunOnline;
41
42class CbmDeviceMcbmEventBuilderWin : public FairMQDevice {
43public:
46
47protected:
48 virtual void InitTask();
49 bool HandleData(FairMQParts&, int);
50 bool HandleCommand(FairMQMessagePtr&, int);
51
52private:
54
56 Bool_t fbIgnoreTsOverlap = kFALSE;
57 Bool_t fbFillHistos = kTRUE;
58
61 std::string fsEvtOverMode = "NoOverlap";
62 std::string fsRefDet = "kBmon";
63 std::vector<std::string> fvsAddDet = {};
64 std::vector<std::string> fvsDelDet = {};
65 std::vector<std::string> fvsSetTrigWin = {};
66 std::vector<std::string> fvsSetTrigMinNb = {};
68 std::string fsChannelNameDataInput = "unpts_0";
69 std::string fsChannelNameDataOutput = "events";
70 std::string fsChannelNameCommands = "commands";
71 std::string fsChannelNameHistosInput = "histogram-in";
72 std::string fsChannelNameHistosConfig = "histo-conf";
73 std::string fsChannelNameCanvasConfig = "canvas-conf";
75 uint32_t fuPublishFreqTs = 100;
76 double_t fdMinPublishTime = 0.5;
77 double_t fdMaxPublishTime = 5.0;
78
80 std::vector<std::string> fsAllowedChannels = {fsChannelNameDataInput};
81
83 // TList* fParCList = nullptr;
84 // Bool_t InitParameters( TList* fParCList );
85
87 uint64_t fulNumMessages = 0;
88 uint64_t fulTsCounter = 0;
89 std::chrono::system_clock::time_point fLastPublishTime = std::chrono::system_clock::now();
90
93
95 size_t fuNbCoreMsPerTs = 0;
96 size_t fuNbOverMsPerTs = 0;
97 Double_t fdMsSizeInNs = 1280000;
98 Double_t fdTsCoreSizeInNs = -1.0;
99 Double_t fdTsOverSizeInNs = -1.0;
100 Double_t fdTsFullSizeInNs = -1.0;
101
104 TClonesArray* fTimeSliceMetaDataArray = nullptr;
107 std::vector<CbmTofDigi>* fvDigiBmon = nullptr;
108 std::vector<CbmStsDigi>* fvDigiSts = nullptr;
109 std::vector<CbmMuchBeamTimeDigi>* fvDigiMuch = nullptr;
110 std::vector<CbmTrdDigi>* fvDigiTrd = nullptr;
111 std::vector<CbmTofDigi>* fvDigiTof = nullptr;
112 std::vector<CbmRichDigi>* fvDigiRich = nullptr;
113 std::vector<CbmPsdDigi>* fvDigiPsd = nullptr;
115 TClonesArray* fEvents = nullptr;
116 // std::vector< CbmEvent * > & fEventVector; //! vector with all created events
117
119 FairRunOnline* fpRun = nullptr;
120
122 TObjArray fArrayHisto = {};
124 std::vector<std::pair<std::string, std::string>> fvpsHistosFolder = {};
128 std::vector<std::pair<std::string, std::string>> fvpsCanvasConfig = {};
129
130 bool IsChannelNameAllowed(std::string channelName);
131 // Bool_t InitContainers();
132 void Finish();
133 bool SendEvents(FairMQParts& partsIn);
134 bool SendHistograms();
135};
136
137#endif /* CBMDEVICEMCBMEVTBUILDERWIN_H_ */
CbmMcbm2019TimeWinEventBuilderAlgo * fpAlgo
Processing algos.
Double_t fdTsCoreSizeInNs
Size of a single MS, [nanoseconds].
Double_t fdTsFullSizeInNs
Total size of the overlap MS in a TS, [nanoseconds].
bool IsChannelNameAllowed(std::string channelName)
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
TObjArray fArrayHisto
Array of histograms to send to the histogram server.
Double_t fdTsOverSizeInNs
Total size of the core MS in a TS, [nanoseconds].
std::chrono::system_clock::time_point fLastPublishTime
std::vector< std::string > fvsSetTrigWin
std::vector< std::string > fvsSetTrigMinNb
TClonesArray * fTimeSliceMetaDataArray
Total size of all MS in a TS, [nanoseconds].
std::vector< CbmMuchBeamTimeDigi > * fvDigiMuch
uint64_t fulNumMessages
Parameters management.
std::vector< std::string > fsAllowedChannels
List of MQ channels names.
std::string fsChannelNameDataInput
message queues
std::vector< CbmTofDigi > * fvDigiBmon
Digis storage.
Bool_t fbFillHistos
Ignore data in Overlap part of the TS.
size_t fuNbCoreMsPerTs
TS MetaData stable values storage.
uint32_t fuPublishFreqTs
Histograms management.
bool HandleCommand(FairMQMessagePtr &, int)
std::vector< CbmRichDigi > * fvDigiRich
std::string fsEvtOverMode
Switch ON/OFF filling of histograms.
FairRunOnline * fpRun
output container of CbmEvents
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig