16 StatusCode LArMvaHelper::ProcessAlgorithmToolListToMap(
const Algorithm &algorithm,
const TiXmlHandle &xmlHandle,
17 const std::string &listName, StringVector &algorithmToolNameVector,
AlgorithmToolMap &algorithmToolMap)
21 if (
"algorithm" != xmlHandle.ToNode()->ValueStr())
22 return STATUS_CODE_NOT_ALLOWED;
24 const TiXmlHandle algorithmListHandle = TiXmlHandle(xmlHandle.FirstChild(listName).Element());
26 for (TiXmlElement *pXmlElement = algorithmListHandle.FirstChild(
"tool").Element();
nullptr != pXmlElement;
27 pXmlElement = pXmlElement->NextSiblingElement(
"tool"))
29 AlgorithmTool *pAlgorithmTool(
nullptr);
30 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CreateAlgorithmTool(algorithm, pXmlElement, pAlgorithmTool));
31 std::string toolName = pXmlElement->Attribute(
"type");
33 if (algorithmToolMap.find(toolName) != algorithmToolMap.end())
34 toolName +=
"_" + pAlgorithmTool->GetInstanceName();
35 algorithmToolMap[toolName] = pAlgorithmTool;
36 algorithmToolNameVector.push_back(toolName);
39 return STATUS_CODE_SUCCESS;
std::map< std::string, pandora::AlgorithmTool * > AlgorithmToolMap