1 #include "otsdaq/DataManager/DataConsumer.h"
3 #include "otsdaq/ConfigurationInterface/ConfigurationManager.h"
4 #include "otsdaq/DataManager/DataManager.h"
5 #include "otsdaq/DataManager/DataManagerSingleton.h"
10 #define __MF_SUBJECT__ "Consumer"
11 #define mfSubject_ (std::string("Consumer:") + DataProcessor::processorUID_)
14 DataConsumer::DataConsumer(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, ConsumerPriority priority)
15 :
WorkLoop(processorUID),
DataProcessor(supervisorApplicationUID, bufferUID, processorUID), priority_(priority)
17 __GEN_COUT__ <<
"Constructor." << __E__;
19 __GEN_COUT__ <<
"Constructed." << __E__;
23 DataConsumer::~DataConsumer(
void)
25 __GEN_COUT__ <<
"Destructor." << __E__;
27 __GEN_COUT__ <<
"Destructed." << __E__;
31 DataConsumer::ConsumerPriority DataConsumer::getPriority(
void) {
return priority_; }
35 void DataConsumer::registerToBuffer(
void)
37 __GEN_COUT__ <<
"Consumer '" << DataProcessor::processorUID_ <<
"' is registering to DataManager Supervisor Buffer '"
38 << DataProcessor::supervisorApplicationUID_ <<
":" << DataProcessor::bufferUID_ <<
".'" << std::endl;
40 DataManager* dataManager = (DataManagerSingleton::getInstance(supervisorApplicationUID_));
42 dataManager->registerConsumer(bufferUID_,
this);
46 dataManager->dumpStatus(&ss);
47 std::cout << ss.str() << __E__;
50 __GEN_COUT__ <<
"Consumer '" << DataProcessor::processorUID_ <<
"' Registered." << __E__;
92 void DataConsumer::startProcessingData(std::string ) { WorkLoop::startWorkLoop(); }
95 void DataConsumer::stopProcessingData(
void) { WorkLoop::stopWorkLoop(); }