1 #include "otsdaq/SupervisorInfo/SupervisorDescriptorInfoBase.h"
3 #include <xdaq/ContextDescriptor.h>
4 #include "otsdaq/MessageFacility/MessageFacility.h"
11 SupervisorDescriptorInfoBase::SupervisorDescriptorInfoBase(
void) {}
14 SupervisorDescriptorInfoBase::SupervisorDescriptorInfoBase(
15 xdaq::ApplicationContext* applicationContext)
17 init(applicationContext);
21 SupervisorDescriptorInfoBase::~SupervisorDescriptorInfoBase() {}
24 void SupervisorDescriptorInfoBase::destroy() { allSupervisors_.clear(); }
27 void SupervisorDescriptorInfoBase::init(xdaq::ApplicationContext* applicationContext)
29 if(applicationContext->getDefaultZone()->getApplicationGroup(
"daq") == 0)
31 __SS__ <<
"Could not find xdaq application group \"daq\" (Must not be present in "
32 "the xdaq context configuration)"
37 __COUT__ <<
"Init" << __E__;
63 std::set<XDAQ_CONST_CALL xdaq::ApplicationDescriptor*> appDescriptors;
68 allSupervisors_.clear();
69 appDescriptors = applicationContext->getDefaultZone()
70 ->getApplicationGroup(
"daq")
71 ->getApplicationDescriptors();
72 for(
auto& it : appDescriptors)
74 auto retPair = allSupervisors_.emplace(
75 std::pair<xdata::UnsignedIntegerT,
76 XDAQ_CONST_CALL xdaq::ApplicationDescriptor*>(it->getLocalId(),
80 __SS__ <<
"Error! Duplicate Application IDs are not allowed. ID ="
81 << it->getLocalId() << __E__;
90 return allSupervisors_;
std::map< xdata::UnsignedIntegerT, XDAQ_CONST_CALL xdaq::ApplicationDescriptor * > SupervisorDescriptors
key is the crate number