00001 #ifndef _ots_TCPDataListenerProducer_h_
00002 #define _ots_TCPDataListenerProducer_h_
00003
00004 #include "otsdaq-core/NetworkUtilities/TCPSocket.h"
00005 #include "otsdaq-core/DataManager/DataProducer.h"
00006 #include "otsdaq-core/Configurable/Configurable.h"
00007
00008 #include <string>
00009
00010 namespace ots
00011 {
00012
00013 class ConfigurationTree;
00014
00015 class TCPDataListenerProducer : public DataProducer, public Configurable, public TCPSocket
00016 {
00017 public:
00018 TCPDataListenerProducer (std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID,
00019 const ConfigurationTree& theXDAQContextConfigTree, const std::string& configurationPath);
00020 virtual ~TCPDataListenerProducer(void);
00021
00022 protected:
00023 bool workLoopThread(toolbox::task::WorkLoop* workLoop);
00024 void slowWrite (void);
00025 void fastWrite (void);
00026
00027 std::string data_;
00028 std::map<std::string,std::string> header_;
00029
00030 std::string* dataP_;
00031 std::map<std::string,std::string>* headerP_;
00032
00033 std::string ipAddress_;
00034 unsigned short port_;
00035
00036
00037 };
00038
00039 }
00040
00041 #endif