otsdaq  v2_05_02_indev
TCPDataStreamerConsumer.h
1 #ifndef _ots_TCPDataStreamerConsumer_h_
2 #define _ots_TCPDataStreamerConsumer_h_
3 
4 #include "otsdaq/Configurable/Configurable.h"
5 #include "otsdaq/DataManager/DataConsumer.h"
6 #include "otsdaq/NetworkUtilities/TCPPublishServer.h"
7 
8 #include <string>
9 
10 namespace ots
11 {
12 class ConfigurationTree;
13 
14 class TCPDataStreamerConsumer : public TCPublishServer, public DataConsumer, public Configurable
15 {
16  public:
17  TCPDataStreamerConsumer(std::string supervisorApplicationUID,
18  std::string bufferUID,
19  std::string processorUID,
20  const ConfigurationTree& theXDAQContextConfigTree,
21  const std::string& configurationPath);
22  virtual ~TCPDataStreamerConsumer(void);
23 
24  protected:
25  bool workLoopThread(toolbox::task::WorkLoop* workLoop);
26 
27  void fastRead(void);
28  void slowRead(void);
29 
30  // For fast read
31  std::string* dataP_;
32  std::map<std::string, std::string>* headerP_;
33  // For slow read
34  std::string data_;
35  std::map<std::string, std::string> header_;
36 };
37 
38 } // namespace ots
39 
40 #endif