22 return STATUS_CODE_FAILURE;
31 if (STATUS_CODE_SUCCESS != statusCode)
33 if (STATUS_CODE_NOT_FOUND == statusCode)
35 if (this->
GetPandora().GetSettings()->ShouldDisplayAlgorithmInfo())
36 std::cout <<
"ListMergingAlgorithm: vertex list not found, source: " << sourceListName <<
", target: " << targetListName
39 else if (STATUS_CODE_NOT_INITIALIZED == statusCode)
41 if (this->
GetPandora().GetSettings()->ShouldDisplayAlgorithmInfo())
42 std::cout <<
"ListMergingAlgorithm: no vertexs to move, source: " << sourceListName <<
", target: " << targetListName << std::endl;
46 std::cout <<
"ListMergingAlgorithm: error in vertex merging, source: " << sourceListName <<
", target: " << targetListName << std::endl;
54 return STATUS_CODE_FAILURE;
63 if (STATUS_CODE_SUCCESS != statusCode)
65 if (STATUS_CODE_NOT_FOUND == statusCode)
67 if (this->
GetPandora().GetSettings()->ShouldDisplayAlgorithmInfo())
68 std::cout <<
"ListMergingAlgorithm: cluster list not found, source: " << sourceListName
69 <<
", target: " << targetListName << std::endl;
71 else if (STATUS_CODE_NOT_INITIALIZED == statusCode)
73 if (this->
GetPandora().GetSettings()->ShouldDisplayAlgorithmInfo())
74 std::cout <<
"ListMergingAlgorithm: no clusters to move, source: " << sourceListName <<
", target: " << targetListName << std::endl;
78 std::cout <<
"ListMergingAlgorithm: error in cluster merging, source: " << sourceListName <<
", target: " << targetListName
87 return STATUS_CODE_FAILURE;
89 for (
unsigned int iIndex = 0, iIndexEnd =
m_sourcePfoListNames.size(); iIndex < iIndexEnd; ++iIndex)
96 if (STATUS_CODE_SUCCESS != statusCode)
98 if (STATUS_CODE_NOT_FOUND == statusCode)
100 if (this->
GetPandora().GetSettings()->ShouldDisplayAlgorithmInfo())
101 std::cout <<
"ListMergingAlgorithm: pfo list not found, source: " << sourceListName <<
", target: " << targetListName << std::endl;
103 else if (STATUS_CODE_NOT_INITIALIZED == statusCode)
105 if (this->
GetPandora().GetSettings()->ShouldDisplayAlgorithmInfo())
106 std::cout <<
"ListMergingAlgorithm: no pfos to move, source: " << sourceListName <<
", target: " << targetListName << std::endl;
110 std::cout <<
"ListMergingAlgorithm: error in pfo merging, source: " << sourceListName <<
", target: " << targetListName << std::endl;
116 return STATUS_CODE_SUCCESS;
143 std::cout <<
"ListMergingAlgorithm::ReadSettings: invalid list configuration " << std::endl;
144 return STATUS_CODE_INVALID_PARAMETER;
147 return STATUS_CODE_SUCCESS;
static pandora::StatusCode ReplaceCurrentList(const pandora::Algorithm &algorithm, const std::string &newListName)
Replace the current list with a pre-saved list; use this new list as a permanent replacement for the ...
pandora::StringVector m_sourceVertexListNames
The source vertex list names.
pandora::StringVector m_sourcePfoListNames
The source pfo list names.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
pandora::StatusCode Run()
Run the algorithm.
pandora::StringVector m_targetClusterListNames
The target cluster list names.
pandora::StringVector m_targetPfoListNames
The target pfo list names.
pandora::StringVector m_sourceClusterListNames
The source cluster list names.
pandora::StringVector m_targetVertexListNames
The target vertex list names.
static StatusCode ReadVectorOfValues(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
Read a vector of values from a (space separated) list in an xml element.