GroupConfigurationStructure& ModuleConfigurationStructure::getGroupNamed(const std::string& name)
{
  XMLCFGLOGINIT;
  ModuleConfigurationStructure::iterator it = find(name);
  if (it == end())
  {
    LWARN << "Error ("<<this<<"): no such group '" << name.c_str() << "' !" << LENDL;
    throw NoSuchGroup(name);
  }
  return ((*it).second);
}
std::string& XMLConfigurationFileParser::getModuleGroupParamValue(
    const std::string& moduleName,
    const std::string& groupName,
    const std::string& key)
{
  XMLCFGLOGINIT;
  try
  {
    return (getModuleConfiguration(moduleName).getParamValueAtKeyOfGroupNamed(key, groupName));
  }
  catch(NoSuchModule& nsm)
  {
    std::cerr << nsm.what() << " "
              << m_d->m_configurationFileName.toUtf8().constData() << std::endl;
    LWARN << nsm.what() << " " << m_d->m_configurationFileName;
      //not LERROR because user may want the module to be optional -> no error
      throw NoSuchModule(std::string(m_d->m_configurationFileName.toUtf8().constData())
              +":["+moduleName
              +"]["+groupName+"]["+key+"]");
  }
  catch(NoSuchGroup& nsg)
  {
    std::cerr << nsg.what() << " "
              << m_d->m_configurationFileName.toUtf8().constData() << std::endl;
    LWARN << nsg.what() << " " << m_d->m_configurationFileName;
      throw NoSuchGroup(std::string(m_d->m_configurationFileName.toUtf8().constData())
              +":["+moduleName+"]["
              +groupName+"]["+key+"]");
  }
  catch(NoSuchParam& nsp)
  {
    std::cerr << nsp.what() << " "
              << m_d->m_configurationFileName.toUtf8().constData() << std::endl;
    LWARN << nsp.what() << " " << m_d->m_configurationFileName;
      throw NoSuchParam(std::string(m_d->m_configurationFileName.toUtf8().constData())+":["
              +moduleName+"]["+groupName+"]["+key+"]");
  }
  catch(...)
  {
      throw;
  }
}