CbmRoot
Loading...
Searching...
No Matches
CbmTsConsumerReqDevExample.h
Go to the documentation of this file.
1/* Copyright (C) 2021 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#ifndef CBMTSCONSUMERREQDEVEXPL_H_
6#define CBMTSCONSUMERREQDEVEXPL_H_
7
8#include "CbmMqTMessage.h"
9
10#include "Timeslice.hpp"
11
12#include "FairMQDevice.h"
13
14#include "Rtypes.h"
15#include "TObjArray.h"
16
17#include <chrono>
18#include <map>
19#include <vector>
20
21class TList;
22
23class CbmTsConsumerReqDevExample : public FairMQDevice {
24public:
27
28protected:
29 virtual void InitTask();
30 virtual bool ConditionalRun();
31
32private:
34 static const uint16_t kusSysId = 0xFF;
35
37 Bool_t fbIgnoreOverlapMs = kFALSE;
38 Bool_t fbComponentsAddedToList = kFALSE;
39
41 std::string fsChannelNameDataInput = "ts-request";
42 std::string fsTsBlockName = "exampleblock";
43 std::string fsChannelNameHistosInput = "histogram-in";
44 uint32_t fuPublishFreqTs = 100;
45 double_t fdMinPublishTime = 0.5;
46 double_t fdMaxPublishTime = 5.0;
47
49 TList* fParCList = nullptr;
50
52 uint64_t fulNumMessages = 0;
53 uint64_t fulTsCounter = 0;
54 std::chrono::system_clock::time_point fLastPublishTime = std::chrono::system_clock::now();
55
57 // ALGO: CbmMcbm2018MonitorAlgoBmon* fMonitorAlgo;
58
60 TObjArray fArrayHisto = {};
62 std::vector<std::pair<std::string, std::string>> fvpsHistosFolder = {};
66 std::vector<std::pair<std::string, std::string>> fvpsCanvasConfig = {};
68 bool fbConfigSent = false;
69
70 bool InitContainers();
71 bool InitHistograms();
72 bool DoUnpack(const fles::Timeslice& ts, size_t component);
73 void Finish();
75 bool SendHistograms();
76};
77
78#endif /* CBMTSCONSUMERREQDEVEXPL_H_ */
bool fbConfigSent
Flag indicating whether the histograms and canvases configurations were already published.
TObjArray fArrayHisto
Processing algo.
Bool_t fbComponentsAddedToList
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
std::string fsChannelNameDataInput
User settings parameters.
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
TList * fParCList
Parameters management.
bool DoUnpack(const fles::Timeslice &ts, size_t component)
std::chrono::system_clock::time_point fLastPublishTime
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
uint64_t fulNumMessages
Statistics & first TS rejection.
static const uint16_t kusSysId
Constants.