CbmRoot
Loading...
Searching...
No Matches
CbmDeviceMonitorTof.h
Go to the documentation of this file.
1/* Copyright (C) 2020-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
12#ifndef CBMDEVICEMONITORTOF_H_
13#define CBMDEVICEMONITORTOF_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 <chrono>
25#include <map>
26#include <vector>
27
28class TList;
30
31class CbmDeviceMonitorTof : public FairMQDevice {
32public:
34 virtual ~CbmDeviceMonitorTof();
35
36protected:
37 virtual void InitTask();
38 bool HandleData(FairMQMessagePtr&, int);
39
40private:
42 static const uint16_t kusSysIdTof = 0x60;
43 static const uint16_t kusSysIdBmon = 0x90;
44
46 Bool_t fbIgnoreOverlapMs = kFALSE;
47 Bool_t fbDebugMonitorMode = kFALSE;
48 Bool_t fbIgnoreCriticalErrors = kTRUE;
49 Bool_t fbComponentsAddedToList = kFALSE;
50
52 std::string fsChannelNameDataInput = "tofcomponent";
53 std::string fsChannelNameHistosInput = "histogram-in";
54 uint32_t fuHistoryHistoSize = 3600;
55 uint32_t fuMinTotPulser = 185;
56 uint32_t fuMaxTotPulser = 195;
57 int32_t fiGdpbIndex = -1;
58 uint32_t fuPublishFreqTs = 100;
59 double_t fdMinPublishTime = 0.5;
60 double_t fdMaxPublishTime = 5.0;
61
63 std::vector<std::string> fsAllowedChannels = {fsChannelNameDataInput};
64
66 TList* fParCList = nullptr;
67
69 uint64_t fulNumMessages = 0;
70 uint64_t fulTsCounter = 0;
71 std::chrono::system_clock::time_point fLastPublishTime = std::chrono::system_clock::now();
72
75
77 TObjArray fArrayHisto = {};
79 std::vector<std::pair<std::string, std::string>> fvpsHistosFolder = {};
83 std::vector<std::pair<std::string, std::string>> fvpsCanvasConfig = {};
85 bool fbConfigSent = false;
86
87 bool IsChannelNameAllowed(std::string channelName);
88 bool InitContainers();
89 bool InitHistograms();
90 Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
91 void Finish();
93 bool SendHistograms();
94};
95
96#endif /* CBMDEVICEMONITORTOF_H_ */
uint64_t fulNumMessages
Statistics & first TS rejection.
bool IsChannelNameAllowed(std::string channelName)
Bool_t fbComponentsAddedToList
If ON not printout at all for critical errors.
std::chrono::system_clock::time_point fLastPublishTime
std::string fsChannelNameHistosInput
Bool_t fbDebugMonitorMode
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
CbmMcbm2018MonitorAlgoTof * fMonitorAlgo
Processing algo.
std::string fsChannelNameDataInput
User settings parameters.
TList * fParCList
Parameters management.
static const uint16_t kusSysIdTof
Constants.
Bool_t fbIgnoreCriticalErrors
Switch ON the filling of a additional set of histograms.
std::vector< std::string > fsAllowedChannels
List of MQ channels names.
bool fbConfigSent
Flag indicating whether the histograms and canvases configurations were already published.
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.
Bool_t fbIgnoreOverlapMs
Control flags.
bool HandleData(FairMQMessagePtr &, int)
Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
static const uint16_t kusSysIdBmon