1 #include "otsdaq-core/Configurable/Configurable.h"
3 #include "otsdaq-core/ConfigurationPluginDataFormats/XDAQContextConfiguration.h"
9 #define __COUT_HDR__ "Configurable"
13 Configurable::Configurable(
const ConfigurationTree& theXDAQContextConfigTree,
const std::string& theConfigurationPath)
14 : theXDAQContextConfigTree_ (theXDAQContextConfigTree)
15 , theConfigurationPath_ (theConfigurationPath)
16 , theConfigurationRecordName_ (theXDAQContextConfigTree_.getNode(theConfigurationPath_).getValueAsString())
18 __CFG_COUT__ << __E__;
22 Configurable::~Configurable(
void)
28 return theXDAQContextConfigTree_.getNode(theConfigurationPath_);
34 return theXDAQContextConfigTree_.getConfigurationManager();
38 const std::string& Configurable::getContextUID()
const
40 return theXDAQContextConfigTree_.getForwardNode(
41 theConfigurationPath_,1 ).getValueAsString();
45 const std::string& Configurable::getApplicationUID()
const
47 return theXDAQContextConfigTree_.getForwardNode(
48 theConfigurationPath_,3 ).getValueAsString();
52 unsigned int Configurable::getApplicationLID()
const
57 return contextConfig->getApplicationNode(
58 getConfigurationManager(),
60 getApplicationUID()).getNode(
61 contextConfig->colApplication_.colId_).getValue<
unsigned int>();
65 std::string Configurable::getContextAddress()
const
70 return contextConfig->getContextNode(
71 getConfigurationManager(),
72 getContextUID()).getNode(
73 contextConfig->colContext_.colAddress_).getValue<std::string>();
77 unsigned int Configurable::getContextPort()
const
82 return contextConfig->getContextNode(
83 getConfigurationManager(),
84 getContextUID()).getNode(
85 contextConfig->colContext_.colPort_).getValue<
unsigned int>();