CbmRoot
Loading...
Searching...
No Matches
CbmDeviceMonitorReqTof.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 CBMDEVICEMONITORREQTOF_H_
6#define CBMDEVICEMONITORREQTOF_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 CbmDeviceMonitorReqTof : public FairMQDevice {
25public:
28
29protected:
30 virtual void InitTask();
31 virtual bool ConditionalRun();
32
33private:
35 static const uint16_t kusSysIdTof = 0x60;
36 static const uint16_t kusSysIdBmon = 0x90;
37
39 Bool_t fbIgnoreOverlapMs = kFALSE;
40 Bool_t fbDebugMonitorMode = kFALSE;
41 Bool_t fbIgnoreCriticalErrors = kTRUE;
42 Bool_t fbComponentsAddedToList = kFALSE;
43
45 std::string fsChannelNameDataInput = "ts-request";
46 std::string fsTsBlockName = "t0tofblock";
47 std::string fsChannelNameHistosInput = "histogram-in";
48 uint32_t fuHistoryHistoSize = 3600;
49 uint32_t fuMinTotPulser = 185;
50 uint32_t fuMaxTotPulser = 195;
51 int32_t fiGdpbIndex = -1;
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_t DoUnpack(const fles::Timeslice& ts, size_t component);
81 void Finish();
83 bool SendHistograms();
84};
85
86#endif /* CBMDEVICEMONITORREQTOF_H_ */
CbmMcbm2018MonitorAlgoTof * fMonitorAlgo
Processing algo.
Bool_t fbIgnoreCriticalErrors
Switch ON the filling of a additional set of histograms.
std::string fsChannelNameDataInput
User settings parameters.
Bool_t fbComponentsAddedToList
If ON not printout at all for critical errors.
Bool_t fbIgnoreOverlapMs
Control flags.
bool fbConfigSent
Flag indicating whether the histograms and canvases configurations were already published.
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
TList * fParCList
Parameters management.
TObjArray fArrayHisto
Array of histograms to send to the histogram server.
Bool_t fbDebugMonitorMode
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
static const uint16_t kusSysIdBmon
static const uint16_t kusSysIdTof
Constants.
uint64_t fulNumMessages
Statistics & first TS rejection.
std::chrono::system_clock::time_point fLastPublishTime