CbmRoot
Loading...
Searching...
No Matches
CbmDeviceMonitorReqBmon.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 CBMDEVICEMONITORREQBmon_H_
6#define CBMDEVICEMONITORREQBmon_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;
23
24class CbmDeviceMonitorReqBmon : public FairMQDevice {
25public:
28
29protected:
30 virtual void InitTask();
31 virtual bool ConditionalRun();
32
33private:
35 static const uint16_t kusSysId = 0x90;
36
38 Bool_t fbIgnoreOverlapMs = kFALSE;
39 Bool_t fbComponentsAddedToList = kFALSE;
40
42 std::string fsChannelNameDataInput = "ts-request";
43 std::string fsTsBlockName = "t0block";
44 std::string fsChannelNameHistosInput = "histogram-in";
45 uint32_t fuHistoryHistoSize = 3600;
46 uint32_t fuMinTotPulser = 185;
47 uint32_t fuMaxTotPulser = 195;
48 uint32_t fuOffSpillCountLimit = 25;
50 double fdSpillCheckInterval = 0.0128;
51 std::vector<uint32_t> fvuChanMap = {0, 1, 2, 3, 4, 5, 6, 7};
52 uint32_t fuPublishFreqTs = 100;
53 double_t fdMinPublishTime = 0.5;
54 double_t fdMaxPublishTime = 5.0;
55
57 TList* fParCList = nullptr;
58
60 uint64_t fulNumMessages = 0;
61 uint64_t fulTsCounter = 0;
62 std::chrono::system_clock::time_point fLastPublishTime = std::chrono::system_clock::now();
63
66
68 TObjArray fArrayHisto = {};
70 std::vector<std::pair<std::string, std::string>> fvpsHistosFolder = {};
74 std::vector<std::pair<std::string, std::string>> fvpsCanvasConfig = {};
76 bool fbConfigSent = false;
77
78 bool InitContainers();
79 bool InitHistograms();
80 bool DoUnpack(const fles::Timeslice& ts, size_t component);
81 void Finish();
83 bool SendHistograms();
84};
85
86#endif /* CBMDEVICEMONITORREQBmon_H_ */
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
Bool_t fbComponentsAddedToList
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
bool fbConfigSent
Flag indicating whether the histograms and canvases configurations were already published.
TObjArray fArrayHisto
Array of histograms to send to the histogram server.
TList * fParCList
Parameters management.
std::chrono::system_clock::time_point fLastPublishTime
uint64_t fulNumMessages
Statistics & first TS rejection.
static const uint16_t kusSysId
Constants.
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
CbmMcbm2018MonitorAlgoBmon * fMonitorAlgo
Processing algo.
std::string fsChannelNameDataInput
User settings parameters.
Bool_t fbIgnoreOverlapMs
Control flags.
std::vector< uint32_t > fvuChanMap
bool DoUnpack(const fles::Timeslice &ts, size_t component)