CbmRoot
Loading...
Searching...
No Matches
CbmDeviceStsHitProducerIdeal.h
Go to the documentation of this file.
1/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
12#ifndef CBMDEVICEMSTSHITPRODUCERIDEAL_H_
13#define CBMDEVICEMSTSHITPRODUCERIDEAL_H_
14
15#include "CbmMQChannels.h"
17
18#include "FairMQDevice.h"
19
20#include "TMessage.h"
21
22#include <string>
23#include <vector>
24
25class CbmTrdParSetGas;
26
27class CbmDeviceStsHitProducerIdeal : public FairMQDevice {
28public:
31
32protected:
33 virtual void InitTask();
34 bool HandleData(FairMQMessagePtr&, int);
35
36private:
37 uint64_t fMaxEvents;
38 uint64_t fNumMessages;
39 std::string fRunId;
40 std::string fvmcworkdir;
41
43
44 std::vector<std::string> fAllowedChannels = {"StsPoint", "parameters"};
45
46 std::vector<std::vector<std::string>> fChannelsToSend = {{}};
47 std::vector<int> fComponentsToSend {};
48
50
52
53 bool IsChannelNameAllowed(std::string channelName);
54
55 bool InitContainers();
56
57 bool DoWork();
58
59 bool SendData();
60
61 void Finish();
62};
63
64// special class to expose protected TMessage constructor
65class CbmMQTMessage : public TMessage {
66public:
67 CbmMQTMessage(void* buf, Int_t len) : TMessage(buf, len) { ResetBit(kIsOwner); }
68};
69
70#endif /* CBMDEVICESTSLOCALRECO_H_ */
bool HandleData(FairMQMessagePtr &, int)
std::vector< std::vector< std::string > > fChannelsToSend
bool IsChannelNameAllowed(std::string channelName)
std::vector< std::string > fAllowedChannels
CbmMQTMessage(void *buf, Int_t len)
Describe TRD module working settings (HV, etc)