1 #include "otsdaq-core/DataProcessorPlugins/TCPDataStreamerConsumer.h"
2 #include "otsdaq-core/MessageFacility/MessageFacility.h"
3 #include "otsdaq-core/Macros/CoutHeaderMacros.h"
4 #include "otsdaq-core/Macros/ProcessorPluginMacros.h"
13 TCPDataStreamerConsumer::TCPDataStreamerConsumer(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID,
const ConfigurationTree& theXDAQContextConfigTree,
const std::string& configurationPath)
16 theXDAQContextConfigTree.getNode(configurationPath).getNode(
"StreamToPort").getValue<unsigned int>()
18 ,
DataConsumer (supervisorApplicationUID, bufferUID, processorUID, HighConsumerPriority)
19 ,
Configurable (theXDAQContextConfigTree, configurationPath)
24 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
25 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
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;
31 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ <<
"done!" << std::endl;
35 TCPDataStreamerConsumer::~TCPDataStreamerConsumer(
void)
40 bool TCPDataStreamerConsumer::workLoopThread(toolbox::task::WorkLoop* workLoop)
43 return WorkLoop::continueWorkLoop_;
47 void TCPDataStreamerConsumer::fastRead(
void)
50 if(DataConsumer::read(dataP_, headerP_) < 0)
59 TCPDataStreamerBase::send( *dataP_);
60 DataConsumer::setReadSubBuffer<std::string, std::map<std::string, std::string>>();
64 void TCPDataStreamerConsumer::slowRead(
void)
68 if(DataConsumer::read(data_, header_) < 0)
76 TCPDataStreamerBase::send( data_);