1 #include "otsdaq-core/ARTDAQDataManager/ARTDAQDataManager.h"
2 #include "otsdaq-core/DataProcessorPlugins/ARTDAQConsumer.h"
3 #include "otsdaq-core/DataProcessorPlugins/ARTDAQProducer.h"
5 #include "artdaq/BuildInfo/GetPackageBuildInfo.hh"
14 ARTDAQDataManager::ARTDAQDataManager(
const ConfigurationTree& theXDAQContextConfigTree,
const std::string& supervisorConfigurationPath)
15 :
DataManager (theXDAQContextConfigTree, supervisorConfigurationPath)
17 INIT_MF(
"BoardReaderDataManager");
18 __COUT__ <<
"Begin!" << std::endl;
19 __COUT__ <<
"Begin!" << std::endl;
20 __COUT__ <<
"Begin!" << std::endl;
21 __COUT__ <<
"Begin!" << std::endl;
22 __COUT__ <<
"Begin!" << std::endl;
26 std::string name =
"BoardReader";
28 __CFG_MOUT__ <<
"artdaq version " <<
30 artdaq::GetPackageBuildInfo::getPackageBuildInfo().getPackageVersion()
32 artdaq::GetPackageBuildInfo::getPackageBuildInfo().getBuildTimestamp();
34 INIT_MF((name +
"App").c_str());
39 __COUT__ <<
"MF initialized" << std::endl;
41 rank_ = Configurable::getApplicationLID();
45 unsigned short port = 5100;
51 __COUT__ <<
"END" << std::endl;
54 __COUT__ <<
"Initialized!" << std::endl;
55 __COUT__ <<
"Initialized!" << std::endl;
56 __COUT__ <<
"Initialized!" << std::endl;
57 __COUT__ <<
"Initialized!" << std::endl;
58 __COUT__ <<
"Initialized!" << std::endl;
62 ARTDAQDataManager::~ARTDAQDataManager(
void)
66 void ARTDAQDataManager::configure(
void)
68 __COUT__ <<
"ARTDAQDataManager configuring..." << std::endl;
70 DataManager::configure();
72 __COUT__ <<
"ARTDAQDataManager DataManager configured now pass the MPI stuff" << std::endl;
73 for(
auto it=DataManager::buffers_.begin(); it!=DataManager::buffers_.end(); it++)
74 for(
auto& itc: it->second.consumers_)
75 if(dynamic_cast<ARTDAQConsumer*>(itc.get()))
81 __SS__ <<
"There was no ARTDAQ Consumer found on a buffer!" << std::endl;
84 __COUT__ <<
"Looking for an ARTDAQ Producer..." << std::endl;
86 for(
auto it=DataManager::buffers_.begin(); it!=DataManager::buffers_.end(); it++)
87 for(
auto& itc: it->second.producers_)
88 if(dynamic_cast<ARTDAQProducer*>(itc.get()))
94 __COUT__ <<
"No ARTDAQ Producers found either... so error!" << std::endl;
96 __COUT_ERR__ << ss.str();
97 throw std::runtime_error(ss.str());
102 void ARTDAQDataManager::stop(
void)