CbmRoot
CbmDeviceMonitorT0.h
Go to the documentation of this file.
1 
8 #ifndef CBMDEVICEMONITORT0_H_
9 #define CBMDEVICEMONITORT0_H_
10 
11 #include "FairMQDevice.h"
12 
13 #include "Timeslice.hpp"
14 
15 #include "Rtypes.h"
16 #include "TMessage.h"
17 #include "TObjArray.h"
18 
19 #include <chrono>
20 #include <map>
21 #include <vector>
22 
23 class TList;
25 
26 class CbmDeviceMonitorT0 : public FairMQDevice {
27 public:
29  virtual ~CbmDeviceMonitorT0();
30 
31 protected:
32  virtual void InitTask();
33  bool HandleData(FairMQMessagePtr&, int);
34 
35 private:
37  static const uint16_t kusSysId = 0x90;
38 
40  Bool_t
42  Bool_t fbComponentsAddedToList = kFALSE;
43 
50  uint32_t fuMinTotPulser;
51  uint32_t fuMaxTotPulser;
53  uint32_t fuPublishFreqTs;
54  double_t fdMinPublishTime;
55  double_t fdMaxPublishTime;
56 
58  std::vector<std::string> fsAllowedChannels;
59 
61  TList* fParCList;
62 
64  uint64_t fulNumMessages;
65  uint64_t fulTsCounter;
66  std::chrono::system_clock::time_point fLastPublishTime;
67 
70 
72  TObjArray fArrayHisto;
74  std::vector<std::pair<std::string, std::string>> fvpsHistosFolder;
78  std::vector<std::pair<std::string, std::string>> fvpsCanvasConfig;
79 
80  bool IsChannelNameAllowed(std::string channelName);
81  Bool_t InitContainers();
82  Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
83  void Finish();
84  bool SendHistograms();
85 };
86 
87 // special class to expose protected TMessage constructor
88 class CbmMQTMessage : public TMessage {
89 public:
90  CbmMQTMessage(void* buf, Int_t len) : TMessage(buf, len) {
91  ResetBit(kIsOwner);
92  }
93 };
94 
95 
96 #endif /* CBMDEVICEMONITORT0_H_ */
CbmDeviceMonitorT0::fvpsHistosFolder
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
Definition: CbmDeviceMonitorT0.h:74
CbmDeviceMonitorT0::SendHistograms
bool SendHistograms()
Definition: CbmDeviceMonitorT0.cxx:297
CbmDeviceMonitorT0::fsChannelNameHistosConfig
std::string fsChannelNameHistosConfig
Definition: CbmDeviceMonitorT0.h:47
CbmDeviceMonitorT0::fbComponentsAddedToList
Bool_t fbComponentsAddedToList
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
Definition: CbmDeviceMonitorT0.h:42
CbmDeviceMonitorT0::IsChannelNameAllowed
bool IsChannelNameAllowed(std::string channelName)
Definition: CbmDeviceMonitorT0.cxx:117
CbmDeviceMonitorT0::fdMaxPublishTime
double_t fdMaxPublishTime
Definition: CbmDeviceMonitorT0.h:55
CbmDeviceMonitorT0::fbIgnoreOverlapMs
Bool_t fbIgnoreOverlapMs
Control flags.
Definition: CbmDeviceMonitorT0.h:41
CbmDeviceMonitorT0::fvpsCanvasConfig
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
Definition: CbmDeviceMonitorT0.h:78
CbmDeviceMonitorT0::fParCList
TList * fParCList
Parameters management.
Definition: CbmDeviceMonitorT0.h:61
CbmDeviceMonitorT0::fsChannelNameCanvasConfig
std::string fsChannelNameCanvasConfig
Definition: CbmDeviceMonitorT0.h:48
CbmDeviceMonitorT0::fsChannelNameDataInput
std::string fsChannelNameDataInput
User settings parameters.
Definition: CbmDeviceMonitorT0.h:45
CbmDeviceMonitorT0::fulTsCounter
uint64_t fulTsCounter
Definition: CbmDeviceMonitorT0.h:65
CbmDeviceMonitorT0::InitContainers
Bool_t InitContainers()
Definition: CbmDeviceMonitorT0.cxx:138
CbmDeviceMonitorT0::fsChannelNameHistosInput
std::string fsChannelNameHistosInput
Definition: CbmDeviceMonitorT0.h:46
CbmDeviceMonitorT0::fuOffSpillCountLimit
uint32_t fuOffSpillCountLimit
Definition: CbmDeviceMonitorT0.h:52
CbmMQTMessage
Definition: CbmDeviceEventBuilderEtofStar2019.h:96
CbmDeviceMonitorT0::~CbmDeviceMonitorT0
virtual ~CbmDeviceMonitorT0()
Definition: CbmDeviceMonitorT0.cxx:333
CbmMQTMessage::CbmMQTMessage
CbmMQTMessage(void *buf, Int_t len)
Definition: CbmDeviceMonitorT0.h:90
CbmDeviceMonitorT0
Definition: CbmDeviceMonitorT0.h:26
CbmDeviceMonitorT0::fMonitorAlgo
CbmMcbm2018MonitorAlgoT0 * fMonitorAlgo
Processing algo.
Definition: CbmDeviceMonitorT0.h:69
CbmDeviceMonitorT0::HandleData
bool HandleData(FairMQMessagePtr &, int)
Definition: CbmDeviceMonitorT0.cxx:261
CbmDeviceMonitorT0::fdMinPublishTime
double_t fdMinPublishTime
Definition: CbmDeviceMonitorT0.h:54
CbmDeviceMonitorT0::fuHistoryHistoSize
uint32_t fuHistoryHistoSize
Definition: CbmDeviceMonitorT0.h:49
CbmMcbm2018MonitorAlgoT0
Definition: CbmMcbm2018MonitorAlgoT0.h:35
CbmDeviceMonitorT0::fuMinTotPulser
uint32_t fuMinTotPulser
Definition: CbmDeviceMonitorT0.h:50
CbmDeviceMonitorT0::InitTask
virtual void InitTask()
Definition: CbmDeviceMonitorT0.cxx:67
CbmDeviceMonitorT0::fArrayHisto
TObjArray fArrayHisto
Array of histograms to send to the histogram server.
Definition: CbmDeviceMonitorT0.h:72
CbmDeviceMonitorT0::fulNumMessages
uint64_t fulNumMessages
Statistics & first TS rejection.
Definition: CbmDeviceMonitorT0.h:64
CbmDeviceMonitorT0::fuMaxTotPulser
uint32_t fuMaxTotPulser
Definition: CbmDeviceMonitorT0.h:51
CbmDeviceMonitorT0::Finish
void Finish()
Definition: CbmDeviceMonitorT0.cxx:370
CbmDeviceMonitorT0::CbmDeviceMonitorT0
CbmDeviceMonitorT0()
Definition: CbmDeviceMonitorT0.cxx:44
CbmDeviceMonitorT0::fLastPublishTime
std::chrono::system_clock::time_point fLastPublishTime
Definition: CbmDeviceMonitorT0.h:66
CbmDeviceMonitorT0::fuPublishFreqTs
uint32_t fuPublishFreqTs
Definition: CbmDeviceMonitorT0.h:53
CbmDeviceMonitorT0::kusSysId
static const uint16_t kusSysId
Constants.
Definition: CbmDeviceMonitorT0.h:37
CbmDeviceMonitorT0::fsAllowedChannels
std::vector< std::string > fsAllowedChannels
List of MQ channels names.
Definition: CbmDeviceMonitorT0.h:58
CbmDeviceMonitorT0::DoUnpack
Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmDeviceMonitorT0.cxx:336