CbmRoot
Loading...
Searching...
No Matches
CbmDeviceMonitorBmon.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau, Florian Uhlig [committer] */
4
12#ifndef CBMDEVICEMONITORBmon_H_
13#define CBMDEVICEMONITORBmon_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 CbmDeviceMonitorBmon : public FairMQDevice {
32public:
34 virtual ~CbmDeviceMonitorBmon();
35
36protected:
37 virtual void InitTask();
38 bool HandleData(FairMQMessagePtr&, int);
39
40private:
42 static const uint16_t kusSysId = 0x90;
43
46 Bool_t fbComponentsAddedToList = kFALSE;
47
57 std::vector<uint32_t> fvuChanMap;
61
63 std::vector<std::string> fsAllowedChannels;
64
66 TList* fParCList;
67
70 uint64_t fulTsCounter;
71 std::chrono::system_clock::time_point fLastPublishTime;
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 DoUnpack(const fles::Timeslice& ts, size_t component);
91 void Finish();
93 bool SendHistograms();
94};
95
96#endif /* CBMDEVICEMONITORBmon_H_ */
TList * fParCList
Parameters management.
std::string fsChannelNameDataInput
User settings parameters.
bool HandleData(FairMQMessagePtr &, int)
bool fbConfigSent
Flag indicating whether the histograms and canvases configurations were already published.
std::chrono::system_clock::time_point fLastPublishTime
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
bool DoUnpack(const fles::Timeslice &ts, size_t component)
static const uint16_t kusSysId
Constants.
Bool_t fbComponentsAddedToList
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
std::vector< uint32_t > fvuChanMap
bool IsChannelNameAllowed(std::string channelName)
TObjArray fArrayHisto
Array of histograms to send to the histogram server.
CbmMcbm2018MonitorAlgoBmon * fMonitorAlgo
Processing algo.
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
std::vector< std::string > fsAllowedChannels
List of MQ channels names.
uint64_t fulNumMessages
Statistics & first TS rejection.
Bool_t fbIgnoreOverlapMs
Control flags.