1 #include "otsdaq-core/SupervisorInfo/SupervisorDescriptorInfoBase.h"
3 #include <xdaq/ContextDescriptor.h>
4 #include "otsdaq-core/MessageFacility/MessageFacility.h"
13 SupervisorDescriptorInfoBase::SupervisorDescriptorInfoBase(
void)
18 SupervisorDescriptorInfoBase::SupervisorDescriptorInfoBase(xdaq::ApplicationContext* applicationContext)
20 init(applicationContext);
24 SupervisorDescriptorInfoBase::~SupervisorDescriptorInfoBase()
28 void SupervisorDescriptorInfoBase::destroy()
30 allSupervisors_.clear();
34 void SupervisorDescriptorInfoBase::init(xdaq::ApplicationContext* applicationContext)
36 if(applicationContext->getDefaultZone()->getApplicationGroup(
"daq") == 0)
38 __SS__ <<
"Could not find xdaq application group \"daq\" (Must not be present in the xdaq context configuration)" << __E__;
42 __COUT__ <<
"Init" << __E__;
60 std::set<XDAQ_CONST_CALL xdaq::ApplicationDescriptor*> appDescriptors;
65 allSupervisors_.clear();
66 appDescriptors = applicationContext->getDefaultZone()->getApplicationGroup(
67 "daq")->getApplicationDescriptors();
68 for(
auto& it: appDescriptors)
70 auto retPair = allSupervisors_.emplace(std::pair
71 <xdata::UnsignedIntegerT, XDAQ_CONST_CALL xdaq::ApplicationDescriptor*>(
76 __SS__ <<
"Error! Duplicate Application IDs are not allowed. ID =" <<
77 it->getLocalId() << __E__;
237 const SupervisorDescriptors& SupervisorDescriptorInfoBase::getAllDescriptors(
void)
const
239 return allSupervisors_;