1 #include "../ARTDAQDataManager/ARTDAQDataManager.h"
3 #include "otsdaq/DataProcessorPlugins/ARTDAQConsumer.h"
4 #include "otsdaq/DataProcessorPlugins/ARTDAQProducer.h"
6 #include "artdaq/BuildInfo/GetPackageBuildInfo.hh"
14 ARTDAQDataManager::ARTDAQDataManager(
const ConfigurationTree& theXDAQContextConfigTree,
const std::string& supervisorConfigurationPath)
15 :
DataManager(theXDAQContextConfigTree, supervisorConfigurationPath)
19 __CFG_COUT__ <<
"Constructor." << __E__;
21 std::string name =
"BoardReader";
23 __CFG_MCOUT__(
"artdaq version " << artdaq::GetPackageBuildInfo::getPackageBuildInfo().getPackageVersion() <<
", built "
24 << artdaq::GetPackageBuildInfo::getPackageBuildInfo().getBuildTimestamp());
29 __CFG_COUT__ <<
"MF initialized" << __E__;
31 rank_ = Configurable::getApplicationLID();
41 __CFG_COUT__ <<
"END" << __E__;
43 __CFG_COUT__ <<
"Constructed." << __E__;
47 ARTDAQDataManager::~ARTDAQDataManager(
void) {}
50 void ARTDAQDataManager::configure(
void)
52 __CFG_COUT__ <<
"ARTDAQDataManager configuring..." << __E__;
54 DataManager::configure();
59 __CFG_COUT__ <<
"ARTDAQDataManager DataManager configured now pass the MPI stuff" << __E__;
60 for(
auto it = DataManager::buffers_.begin(); it != DataManager::buffers_.end(); it++)
61 for(
auto& consumer : it->second.consumers_)
62 if(dynamic_cast<ARTDAQConsumer*>(consumer))
64 __CFG_COUT__ <<
"Found an ARTDAQ Consumer: " << consumer->getProcessorID() << __E__;
71 __CFG_SS__ <<
"There was no ARTDAQ Consumer found on a buffer!" << __E__;
72 __CFG_COUT__ << ss.str();
74 __CFG_COUT__ <<
"Looking for an ARTDAQ Producer..." << __E__;
76 for(
auto it = DataManager::buffers_.begin(); it != DataManager::buffers_.end(); it++)
77 for(
auto& producer : it->second.producers_)
78 if(dynamic_cast<ARTDAQProducer*>(producer))
80 __CFG_COUT__ <<
"Found an ARTDAQ Producer: " << producer->getProcessorID() << __E__;
87 ss <<
"No ARTDAQ Producers found either... so error!" << __E__;
88 __CFG_COUT__ << ss.str();
92 DataManager::dumpStatus((std::ostream*)&ss);
93 __COUT__ << ss.str() << __E__;
96 __CFG_COUT_ERR__ << ss.str();
101 void ARTDAQDataManager::stop(
void) { DataManager::stop(); }