CbmRoot
CbmMQTsaInfo.h
Go to the documentation of this file.
1 
8 #ifndef CBMMQTSAINFO_H_
9 #define CBMMQTSAINFO_H_
10 
11 
12 #include "MicrosliceDescriptor.hpp"
13 #include "StorableTimeslice.hpp"
14 #include "Timeslice.hpp"
15 #include "TimesliceSource.hpp"
16 //#include "Message.hpp"
17 
18 #include "FairMQDevice.h"
19 
20 #include <ctime>
21 #include <string>
22 #include <vector>
23 
24 class CbmMQTsaInfo : public FairMQDevice {
25 public:
26  CbmMQTsaInfo();
27  virtual ~CbmMQTsaInfo();
28 
29 protected:
30  uint64_t fMaxTimeslices;
31 
32  std::string fFileName;
33  std::vector<std::string> fInputFileList;
34  uint64_t fFileCounter;
35  std::string fHost;
36  uint64_t fPort;
37 
38  uint64_t fTSNumber;
39  uint64_t fTSCounter;
40  uint64_t fMessageCounter;
41 
42  int fMaxMemory = 0;
43 
44  virtual void InitTask();
45  virtual bool ConditionalRun();
46 
47 private:
48  bool CheckTimeslice(const fles::Timeslice& ts);
49  void PrintMicroSliceDescriptor(const fles::MicrosliceDescriptor& mdsc);
50  bool SendData(const fles::StorableTimeslice& component);
51  void CalcRuntime();
52  bool IsChannelNameAllowed(std::string);
53 
54  fles::TimesliceSource* fSource;
55  std::chrono::steady_clock::time_point fTime;
56 
57  std::vector<std::string> fAllowedChannels = {"stscomponent",
58  "trdcomponent",
59  "tofcomponent"};
60 };
61 
62 #endif /* CBMMQTSAINFO_H_ */
CbmMQTsaInfo::ConditionalRun
virtual bool ConditionalRun()
Definition: CbmMQTsaInfo.cxx:112
CbmMQTsaInfo::CbmMQTsaInfo
CbmMQTsaInfo()
Definition: CbmMQTsaInfo.cxx:34
CbmMQTsaInfo::fTSCounter
uint64_t fTSCounter
Definition: CbmMQTsaInfo.h:39
CbmMQTsaInfo::fFileCounter
uint64_t fFileCounter
Definition: CbmMQTsaInfo.h:34
CbmMQTsaInfo::~CbmMQTsaInfo
virtual ~CbmMQTsaInfo()
Definition: CbmMQTsaInfo.cxx:143
CbmMQTsaInfo::PrintMicroSliceDescriptor
void PrintMicroSliceDescriptor(const fles::MicrosliceDescriptor &mdsc)
Definition: CbmMQTsaInfo.cxx:154
CbmMQTsaInfo::CalcRuntime
void CalcRuntime()
Definition: CbmMQTsaInfo.cxx:145
CbmMQTsaInfo::fMaxTimeslices
uint64_t fMaxTimeslices
Definition: CbmMQTsaInfo.h:30
CbmMQTsaInfo
Definition: CbmMQTsaInfo.h:24
CbmMQTsaInfo::fInputFileList
std::vector< std::string > fInputFileList
List of input files.
Definition: CbmMQTsaInfo.h:33
CbmMQTsaInfo::fTime
std::chrono::steady_clock::time_point fTime
Definition: CbmMQTsaInfo.h:55
CbmMQTsaInfo::SendData
bool SendData(const fles::StorableTimeslice &component)
CbmMQTsaInfo::fTSNumber
uint64_t fTSNumber
Definition: CbmMQTsaInfo.h:38
CbmMQTsaInfo::fPort
uint64_t fPort
Definition: CbmMQTsaInfo.h:36
CbmMQTsaInfo::fHost
std::string fHost
Definition: CbmMQTsaInfo.h:35
CbmMQTsaInfo::fMaxMemory
int fMaxMemory
Definition: CbmMQTsaInfo.h:42
CbmMQTsaInfo::CheckTimeslice
bool CheckTimeslice(const fles::Timeslice &ts)
Definition: CbmMQTsaInfo.cxx:172
CbmMQTsaInfo::fFileName
std::string fFileName
Definition: CbmMQTsaInfo.h:32
CbmMQTsaInfo::IsChannelNameAllowed
bool IsChannelNameAllowed(std::string)
Definition: CbmMQTsaInfo.cxx:98
CbmMQTsaInfo::InitTask
virtual void InitTask()
Definition: CbmMQTsaInfo.cxx:47
CbmMQTsaInfo::fSource
fles::TimesliceSource * fSource
Definition: CbmMQTsaInfo.h:54
CbmMQTsaInfo::fMessageCounter
uint64_t fMessageCounter
Definition: CbmMQTsaInfo.h:40
CbmMQTsaInfo::fAllowedChannels
std::vector< std::string > fAllowedChannels
Definition: CbmMQTsaInfo.h:57