Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ListChangingAlgorithm.cc
Go to the documentation of this file.
1
10
12
13using namespace pandora;
14
15namespace lar_content
16{
17
19{
20 if (!m_caloHitListName.empty())
21 {
23
24 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
25 return statusCode;
26
27 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
28 std::cout << "ListChangingAlgorithm: calohit list not found " << m_caloHitListName << std::endl;
29 }
30
31 if (!m_clusterListName.empty())
32 {
34
35 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
36 return statusCode;
37
38 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
39 std::cout << "ListChangingAlgorithm: cluster list not found " << m_clusterListName << std::endl;
40 }
41
42 if (!m_vertexListName.empty())
43 {
45
46 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
47 return statusCode;
48
49 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
50 std::cout << "ListChangingAlgorithm: vertex list not found " << m_vertexListName << std::endl;
51 }
52
53 if (!m_pfoListName.empty())
54 {
56
57 if ((STATUS_CODE_SUCCESS != statusCode) && (STATUS_CODE_NOT_FOUND != statusCode))
58 return statusCode;
59
60 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() && (STATUS_CODE_NOT_FOUND == statusCode))
61 std::cout << "ListChangingAlgorithm: pfo list not found " << m_pfoListName << std::endl;
62 }
63
64 return STATUS_CODE_SUCCESS;
65}
66
67//------------------------------------------------------------------------------------------------------------------------------------------
68
70{
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));
75
76 return STATUS_CODE_SUCCESS;
77}
78
79} // namespace lar_content
Grouping of header files for many classes of use in particle flow algorithms.
Header file for the list changing algorithm class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
Definition StatusCodes.h:31
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 ...
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
pandora::StatusCode Run()
Run the algorithm.
std::string m_pfoListName
The pfo list name to set as the current pfo list.
std::string m_clusterListName
The cluster list name to set as the current cluster list.
std::string m_caloHitListName
The calo hit list name to set as the current calo hit list.
std::string m_vertexListName
The vertex list name to set as the current vertex list.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
Definition XmlHelper.h:136
StatusCode
The StatusCode enum.