tdaq-develop-2025-02-12
DataProducer.cc
1 #include "otsdaq/DataManager/DataProducer.h"
2 #include "otsdaq/ConfigurationInterface/ConfigurationManager.h"
3 #include "otsdaq/DataManager/DataManager.h"
4 #include "otsdaq/DataManager/DataManagerSingleton.h"
5 
6 #include <iostream>
7 #include <memory>
8 using namespace ots;
9 
10 #undef __MF_SUBJECT__
11 #define __MF_SUBJECT__ "Producer"
12 #define mfSubject_ (std::string("Producer-") + bufferUID_ + "-" + processorUID_)
13 
14 //==============================================================================
15 DataProducer::DataProducer(std::string supervisorApplicationUID,
16  std::string bufferUID,
17  std::string processorUID,
18  unsigned int bufferSize)
19  : WorkLoop(processorUID)
20  , DataProducerBase(supervisorApplicationUID, bufferUID, processorUID, bufferSize)
21 {
22  __GEN_COUT__ << "Constructed." << __E__;
23 }
24 
25 //==============================================================================
26 DataProducer::~DataProducer(void) { __GEN_COUT__ << "Destructed." << __E__; }
27 
28 //==============================================================================
29 void DataProducer::startProcessingData(std::string /*runNumber*/)
30 {
31  __GEN_COUT__ << "startWorkLoop..." << std::endl;
32  WorkLoop::startWorkLoop();
33 }
34 
35 //==============================================================================
36 void DataProducer::stopProcessingData(void)
37 {
38  __GEN_COUT__ << "stopWorkLoop..." << std::endl;
39  WorkLoop::stopWorkLoop();
40 }