CbmRoot
CbmDeviceStsHitProducerIdeal.h
Go to the documentation of this file.
1 
8 #ifndef CBMDEVICEMSTSHITPRODUCERIDEAL_H_
9 #define CBMDEVICEMSTSHITPRODUCERIDEAL_H_
10 
11 #include "FairMQDevice.h"
12 
13 #include "CbmMQChannels.h"
14 
16 
17 #include "TMessage.h"
18 
19 #include <string>
20 #include <vector>
21 
22 class CbmTrdParSetGas;
23 
24 class CbmDeviceStsHitProducerIdeal : public FairMQDevice {
25 public:
28 
29 protected:
30  virtual void InitTask();
31  bool HandleData(FairMQMessagePtr&, int);
32 
33 private:
34  uint64_t fMaxEvents;
35  uint64_t fNumMessages;
36  std::string fRunId;
37  std::string fvmcworkdir;
38 
40 
41  std::vector<std::string> fAllowedChannels = {"StsPoint", "parameters"};
42 
43  std::vector<std::vector<std::string>> fChannelsToSend = {{}};
44  std::vector<int> fComponentsToSend {};
45 
47 
49 
50  bool IsChannelNameAllowed(std::string channelName);
51 
52  bool InitContainers();
53 
54  bool DoWork();
55 
56  bool SendData();
57 
58  void Finish();
59 };
60 
61 // special class to expose protected TMessage constructor
62 class CbmMQTMessage : public TMessage {
63 public:
64  CbmMQTMessage(void* buf, Int_t len) : TMessage(buf, len) {
65  ResetBit(kIsOwner);
66  }
67 };
68 
69 #endif /* CBMDEVICESTSLOCALRECO_H_ */
CbmDeviceStsHitProducerIdeal::SendData
bool SendData()
Definition: CbmDeviceStsHitProducerIdeal.cxx:173
CbmDeviceStsHitProducerIdeal::HandleData
bool HandleData(FairMQMessagePtr &, int)
Definition: CbmDeviceStsHitProducerIdeal.cxx:138
CbmMQChannels.h
CbmDeviceStsHitProducerIdeal::fChan
CbmMQChannels fChan
Definition: CbmDeviceStsHitProducerIdeal.h:46
CbmTrdParSetGas
Describe TRD module working settings (HV, etc)
Definition: CbmTrdParSetGas.h:15
CbmDeviceStsHitProducerIdeal::InitTask
virtual void InitTask()
Definition: CbmDeviceStsHitProducerIdeal.cxx:49
CbmDeviceStsHitProducerIdeal::fvmcworkdir
std::string fvmcworkdir
Definition: CbmDeviceStsHitProducerIdeal.h:37
CbmDeviceStsHitProducerIdeal::fNumMessages
uint64_t fNumMessages
Definition: CbmDeviceStsHitProducerIdeal.h:35
CbmDeviceStsHitProducerIdeal::fRunId
std::string fRunId
Definition: CbmDeviceStsHitProducerIdeal.h:36
CbmDeviceStsHitProducerIdeal::fAllowedChannels
std::vector< std::string > fAllowedChannels
Definition: CbmDeviceStsHitProducerIdeal.h:41
CbmMQTMessage
Definition: CbmDeviceEventBuilderEtofStar2019.h:96
CbmDeviceStsHitProducerIdeal::CbmDeviceStsHitProducerIdeal
CbmDeviceStsHitProducerIdeal()
Definition: CbmDeviceStsHitProducerIdeal.cxx:39
CbmMQTMessage::CbmMQTMessage
CbmMQTMessage(void *buf, Int_t len)
Definition: CbmDeviceStsHitProducerIdeal.h:64
CbmDeviceStsHitProducerIdeal
Definition: CbmDeviceStsHitProducerIdeal.h:24
CbmStsHitProducerIdealAlgo.h
CbmDeviceStsHitProducerIdeal::fAlgo
CbmStsHitProducerIdealAlgo * fAlgo
Definition: CbmDeviceStsHitProducerIdeal.h:48
CbmDeviceStsHitProducerIdeal::~CbmDeviceStsHitProducerIdeal
virtual ~CbmDeviceStsHitProducerIdeal()
Definition: CbmDeviceStsHitProducerIdeal.cxx:46
CbmDeviceStsHitProducerIdeal::Finish
void Finish()
Definition: CbmDeviceStsHitProducerIdeal.cxx:177
CbmDeviceStsHitProducerIdeal::fTrdGasPar
CbmTrdParSetGas * fTrdGasPar
Definition: CbmDeviceStsHitProducerIdeal.h:39
CbmStsHitProducerIdealAlgo
Definition: CbmStsHitProducerIdealAlgo.h:21
CbmDeviceStsHitProducerIdeal::InitContainers
bool InitContainers()
Definition: CbmDeviceStsHitProducerIdeal.cxx:80
CbmDeviceStsHitProducerIdeal::fComponentsToSend
std::vector< int > fComponentsToSend
Definition: CbmDeviceStsHitProducerIdeal.h:44
CbmDeviceStsHitProducerIdeal::IsChannelNameAllowed
bool IsChannelNameAllowed(std::string channelName)
CbmDeviceStsHitProducerIdeal::fChannelsToSend
std::vector< std::vector< std::string > > fChannelsToSend
Definition: CbmDeviceStsHitProducerIdeal.h:43
CbmDeviceStsHitProducerIdeal::fMaxEvents
uint64_t fMaxEvents
Definition: CbmDeviceStsHitProducerIdeal.h:34
CbmMQChannels
Definition: CbmMQChannels.h:9
CbmDeviceStsHitProducerIdeal::DoWork
bool DoWork()
Definition: CbmDeviceStsHitProducerIdeal.cxx:175