1 #include "otsdaq/DataProcessorPlugins/TCPDataStreamerConsumer.h"
2 #include "otsdaq/Macros/CoutMacros.h"
3 #include "otsdaq/Macros/ProcessorPluginMacros.h"
4 #include "otsdaq/MessageFacility/MessageFacility.h"
13 TCPDataStreamerConsumer::TCPDataStreamerConsumer(std::string supervisorApplicationUID,
14 std::string bufferUID,
15 std::string processorUID,
17 const std::string& configurationPath)
19 , TCPDataStreamerBase(theXDAQContextConfigTree.getNode(configurationPath).getNode(
"StreamToPort").getValue<unsigned int>())
20 ,
DataConsumer(supervisorApplicationUID, bufferUID, processorUID, HighConsumerPriority)
21 ,
Configurable(theXDAQContextConfigTree, configurationPath)
26 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
27 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
28 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
29 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
30 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
31 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
33 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ <<
"done!" << std::endl;
37 TCPDataStreamerConsumer::~TCPDataStreamerConsumer(
void) {}
40 bool TCPDataStreamerConsumer::workLoopThread(toolbox::task::WorkLoop* workLoop)
43 return WorkLoop::continueWorkLoop_;
47 void TCPDataStreamerConsumer::fastRead(
void)
51 if(DataConsumer::read(dataP_, headerP_) < 0)
64 TCPDataStreamerBase::send(*dataP_);
65 DataConsumer::setReadSubBuffer<std::string, std::map<std::string, std::string>>();
69 void TCPDataStreamerConsumer::slowRead(
void)
73 if(DataConsumer::read(data_, header_) < 0)
85 TCPDataStreamerBase::send(data_);