9 #include "Pandora/AlgorithmHeaders.h" 18 StatusCode ListChangingAlgorithm::Run()
20 if (!m_caloHitListName.empty())
22 const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<CaloHit>(*
this, m_caloHitListName));
24 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
27 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
28 std::cout <<
"ListChangingAlgorithm: calohit list not found " << m_caloHitListName <<
std::endl;
31 if (!m_clusterListName.empty())
33 const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<Cluster>(*
this, m_clusterListName));
35 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
38 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
39 std::cout <<
"ListChangingAlgorithm: cluster list not found " << m_clusterListName <<
std::endl;
42 if (!m_vertexListName.empty())
44 const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<Vertex>(*
this, m_vertexListName));
46 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
49 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
50 std::cout <<
"ListChangingAlgorithm: vertex list not found " << m_vertexListName <<
std::endl;
53 if (!m_pfoListName.empty())
55 const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<Pfo>(*
this, m_pfoListName));
57 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
60 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
61 std::cout <<
"ListChangingAlgorithm: pfo list not found " << m_pfoListName <<
std::endl;
64 return STATUS_CODE_SUCCESS;
69 StatusCode ListChangingAlgorithm::ReadSettings(
const TiXmlHandle xmlHandle)
71 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"CaloHitListName", m_caloHitListName));
72 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"ClusterListName", m_clusterListName));
73 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"VertexListName", m_vertexListName));
74 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"PfoListName", m_pfoListName));
76 return STATUS_CODE_SUCCESS;
Header file for the list changing algorithm class.
QTextStream & endl(QTextStream &s)