1 #include "otsdaq/DataManager/DataProducerBase.h"
2 #include "otsdaq/ConfigurationInterface/ConfigurationManager.h"
3 #include "otsdaq/DataManager/DataManager.h"
4 #include "otsdaq/DataManager/DataManagerSingleton.h"
11 #define __MF_SUBJECT__ "Producer"
12 #define mfSubject_ (std::string("ProducerBase:") + DataProcessor::processorUID_)
15 DataProducerBase::DataProducerBase(
const std::string& supervisorApplicationUID,
16 const std::string& bufferUID,
17 const std::string& processorUID,
18 unsigned int bufferSize)
19 :
DataProcessor(supervisorApplicationUID, bufferUID, processorUID), bufferSize_(bufferSize)
21 __GEN_COUT__ <<
"Constructor." << __E__;
23 __GEN_COUT__ <<
"Constructed." << __E__;
27 DataProducerBase::~DataProducerBase(
void) { __GEN_COUT__ <<
"Destructed." << __E__; }
31 void DataProducerBase::registerToBuffer(
void)
33 __GEN_COUT__ <<
"Producer '" << DataProcessor::processorUID_ <<
"' is registering to DataManager Supervisor Buffer '"
34 << DataProcessor::supervisorApplicationUID_ <<
":" << DataProcessor::bufferUID_ <<
".'" << std::endl;
36 DataManager* dataManager = (DataManagerSingleton::getInstance(supervisorApplicationUID_));
38 dataManager->registerProducer(bufferUID_,
this);
42 dataManager->dumpStatus(&ss);
43 std::cout << ss.str() << __E__;
46 __GEN_COUT__ <<
"Producer '" << DataProcessor::processorUID_ <<
"' Registered." << __E__;