9 #include "Pandora/AlgorithmHeaders.h" 18 StatusCode ListDeletionAlgorithm::Run()
20 for (
const std::string &listName : m_pfoListNames)
22 const PfoList *pList(
nullptr);
23 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*
this, listName, pList));
25 if (pList && !pList->empty())
27 const PfoList listCopy(*pList);
28 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*
this, &listCopy, listName));
32 for (
const std::string &listName : m_clusterListNames)
34 const ClusterList *pList(
nullptr);
35 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*
this, listName, pList));
37 if (pList && !pList->empty())
39 const ClusterList listCopy(*pList);
40 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*
this, &listCopy, listName));
44 for (
const std::string &listName : m_vertexListNames)
47 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*
this, listName, pList));
49 if (pList && !pList->empty())
52 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*
this, &listCopy, listName));
56 return STATUS_CODE_SUCCESS;
61 StatusCode ListDeletionAlgorithm::ReadSettings(
const TiXmlHandle xmlHandle)
63 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
64 "PfoListNames", m_pfoListNames));
66 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
67 "ClusterListNames", m_clusterListNames));
69 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
70 "VertexListNames", m_vertexListNames));
72 return STATUS_CODE_SUCCESS;
std::list< Vertex > VertexList
Header file for the list deletion algorithm class.