CbmRoot
CbmDeviceTriggerHandlerEtof.h
Go to the documentation of this file.
1 
8 #ifndef CBMDEVICETRIGGERHANDLERETOF_H_
9 #define CBMDEVICETRIGGERHANDLERETOF_H_
10 
11 #include "FairMQDevice.h"
12 
13 #include "MicrosliceDescriptor.hpp"
14 #include "Timeslice.hpp"
15 
16 #include "CbmTofStarData2019.h"
17 
18 #include "Rtypes.h"
19 #include "TMessage.h"
20 
21 #include <map>
22 #include <vector>
23 
24 class CbmMQTMessage;
25 // Relevant TOF classes
26 
27 extern "C" int star_rhicf_write(unsigned int trg_word, void* dta, int bytes);
28 
29 // ROOT Classes and includes
30 class TString;
31 
32 // C++ Classes and includes
33 #include <list>
34 #include <map>
35 #include <vector>
36 
37 class CbmDeviceTriggerHandlerEtof : public FairMQDevice {
38 public:
41 
42 protected:
43  virtual void InitTask();
44  bool HandleData(FairMQParts&, int);
45  bool HandleMessage(FairMQMessagePtr&, int);
46 
47 private:
48  // Variables used for histo filling
49 
50  Bool_t IsChannelNameAllowed(std::string channelName);
51 
52  Bool_t InitWorkspace();
53  Bool_t InitContainers();
54 
55  Bool_t ReInitContainers();
56 
57  uint64_t fNumMessages;
58  std::vector<std::string> fAllowedChannels = {"tofcomponent",
59  "parameters",
60  "etofevts",
61  "tofhits",
62  "syscmd"};
63 
64  // Input variables
65 
66  // Output variables
67 
68  // Constants or setting parameters
69  Int_t fiMsgCnt;
71  Bool_t
73  Bool_t
75  Bool_t fbSandboxMode;
76  Bool_t
78 
79  Double_t fdEvent;
80 
81  // histograms
82 };
83 
84 // special class to expose protected TMessage constructor
85 class CbmMQTMessage : public TMessage {
86 public:
87  CbmMQTMessage(void* buf, Int_t len) : TMessage(buf, len) {
88  ResetBit(kIsOwner);
89  }
90 };
91 
92 #endif /* CBMDEVICETRIGGERHANDLERETOF_H_ */
CbmDeviceTriggerHandlerEtof::fbMonitorMode
Bool_t fbMonitorMode
Control flags.
Definition: CbmDeviceTriggerHandlerEtof.h:72
CbmDeviceTriggerHandlerEtof::HandleMessage
bool HandleMessage(FairMQMessagePtr &, int)
Definition: CbmDeviceTriggerHandlerEtof.cxx:153
CbmDeviceTriggerHandlerEtof
Definition: CbmDeviceTriggerHandlerEtof.h:37
CbmDeviceTriggerHandlerEtof::fNumMessages
uint64_t fNumMessages
Definition: CbmDeviceTriggerHandlerEtof.h:57
CbmTofStarData2019.h
CbmDeviceTriggerHandlerEtof::ReInitContainers
Bool_t ReInitContainers()
CbmMQTMessage
Definition: CbmDeviceEventBuilderEtofStar2019.h:96
CbmDeviceTriggerHandlerEtof::InitWorkspace
Bool_t InitWorkspace()
Definition: CbmDeviceTriggerHandlerEtof.cxx:99
CbmMQTMessage::CbmMQTMessage
CbmMQTMessage(void *buf, Int_t len)
Definition: CbmDeviceTriggerHandlerEtof.h:87
CbmDeviceTriggerHandlerEtof::fbEventDumpEna
Bool_t fbEventDumpEna
Switch OFF the emission of data toward the STAR DAQ.
Definition: CbmDeviceTriggerHandlerEtof.h:77
star_rhicf_write
int star_rhicf_write(unsigned int trg_word, void *dta, int bytes)
CbmDeviceTriggerHandlerEtof::InitContainers
Bool_t InitContainers()
CbmDeviceTriggerHandlerEtof::InitTask
virtual void InitTask()
Definition: CbmDeviceTriggerHandlerEtof.cxx:52
CbmDeviceTriggerHandlerEtof::fiMsgCnt
Int_t fiMsgCnt
Definition: CbmDeviceTriggerHandlerEtof.h:69
CbmDeviceTriggerHandlerEtof::fdEvent
Double_t fdEvent
Switch ON the dumping of the events to a binary file.
Definition: CbmDeviceTriggerHandlerEtof.h:79
CbmDeviceTriggerHandlerEtof::IsChannelNameAllowed
Bool_t IsChannelNameAllowed(std::string channelName)
Definition: CbmDeviceTriggerHandlerEtof.cxx:78
CbmDeviceTriggerHandlerEtof::HandleData
bool HandleData(FairMQParts &, int)
Definition: CbmDeviceTriggerHandlerEtof.cxx:110
CbmDeviceTriggerHandlerEtof::fAllowedChannels
std::vector< std::string > fAllowedChannels
Definition: CbmDeviceTriggerHandlerEtof.h:58
CbmDeviceTriggerHandlerEtof::fbSandboxMode
Bool_t fbSandboxMode
Switch ON the filling of a additional set of histograms.
Definition: CbmDeviceTriggerHandlerEtof.h:75
CbmDeviceTriggerHandlerEtof::CbmDeviceTriggerHandlerEtof
CbmDeviceTriggerHandlerEtof()
Definition: CbmDeviceTriggerHandlerEtof.cxx:41
CbmDeviceTriggerHandlerEtof::~CbmDeviceTriggerHandlerEtof
virtual ~CbmDeviceTriggerHandlerEtof()
Definition: CbmDeviceTriggerHandlerEtof.cxx:50
CbmDeviceTriggerHandlerEtof::fbDebugMonitorMode
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms.
Definition: CbmDeviceTriggerHandlerEtof.h:74