$treeview $search $mathjax $extrastylesheet
otsdaq
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #ifndef _ots_TCPDataListenerProducer_h_ 00002 #define _ots_TCPDataListenerProducer_h_ 00003 00004 #include "otsdaq-core/Configurable/Configurable.h" 00005 #include "otsdaq-core/DataManager/DataProducer.h" 00006 #include "otsdaq-core/NetworkUtilities/TCPSocket.h" // Make sure this is always first because <sys/types.h> (defined in Socket.h) must be first 00007 00008 #include <string> 00009 00010 namespace ots 00011 { 00012 class ConfigurationTree; 00013 00014 class TCPDataListenerProducer : public DataProducer, public Configurable, public TCPSocket 00015 { 00016 public: 00017 TCPDataListenerProducer(std::string supervisorApplicationUID, 00018 std::string bufferUID, 00019 std::string processorUID, 00020 const ConfigurationTree& theXDAQContextConfigTree, 00021 const std::string& configurationPath); 00022 virtual ~TCPDataListenerProducer(void); 00023 00024 protected: 00025 bool workLoopThread(toolbox::task::WorkLoop* workLoop); 00026 void slowWrite(void); 00027 void fastWrite(void); 00028 // For slow write 00029 std::string data_; 00030 std::map<std::string, std::string> header_; 00031 // For fast write 00032 std::string* dataP_; 00033 std::map<std::string, std::string>* headerP_; 00034 00035 std::string ipAddress_; 00036 unsigned short port_; 00037 00038 // bool getNextFragment(void); 00039 }; 00040 00041 } // namespace ots 00042 00043 #endif