Private Member Functions | Private Attributes | List of all members
lar_content::ListDeletionAlgorithm Class Reference

ListDeletionAlgorithm class. More...

#include <ListDeletionAlgorithm.h>

Inheritance diagram for lar_content::ListDeletionAlgorithm:

Private Member Functions

pandora::StatusCode Run ()
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

pandora::StringVector m_pfoListNames
 The list of pfo list names. More...
 
pandora::StringVector m_clusterListNames
 The list of cluster list names. More...
 
pandora::StringVector m_vertexListNames
 The list of vertex list names. More...
 

Detailed Description

ListDeletionAlgorithm class.

Definition at line 19 of file ListDeletionAlgorithm.h.

Member Function Documentation

StatusCode lar_content::ListDeletionAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 61 of file ListDeletionAlgorithm.cc.

62 {
63  PANDORA_RETURN_RESULT_IF_AND_IF(
64  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle, "PfoListNames", m_pfoListNames));
65 
66  PANDORA_RETURN_RESULT_IF_AND_IF(
67  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle, "ClusterListNames", m_clusterListNames));
68 
69  PANDORA_RETURN_RESULT_IF_AND_IF(
70  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle, "VertexListNames", m_vertexListNames));
71 
72  return STATUS_CODE_SUCCESS;
73 }
pandora::StringVector m_vertexListNames
The list of vertex list names.
pandora::StringVector m_pfoListNames
The list of pfo list names.
pandora::StringVector m_clusterListNames
The list of cluster list names.
StatusCode lar_content::ListDeletionAlgorithm::Run ( )
private

Definition at line 18 of file ListDeletionAlgorithm.cc.

19 {
20  for (const std::string &listName : m_pfoListNames)
21  {
22  const PfoList *pList(nullptr);
23  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, listName, pList));
24 
25  if (pList && !pList->empty())
26  {
27  const PfoList listCopy(*pList);
28  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, &listCopy, listName));
29  }
30  }
31 
32  for (const std::string &listName : m_clusterListNames)
33  {
34  const ClusterList *pList(nullptr);
35  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, listName, pList));
36 
37  if (pList && !pList->empty())
38  {
39  const ClusterList listCopy(*pList);
40  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, &listCopy, listName));
41  }
42  }
43 
44  for (const std::string &listName : m_vertexListNames)
45  {
46  const VertexList *pList(nullptr);
47  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, listName, pList));
48 
49  if (pList && !pList->empty())
50  {
51  const VertexList listCopy(*pList);
52  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, &listCopy, listName));
53  }
54  }
55 
56  return STATUS_CODE_SUCCESS;
57 }
std::string string
Definition: nybbler.cc:12
pandora::StringVector m_vertexListNames
The list of vertex list names.
pandora::StringVector m_pfoListNames
The list of pfo list names.
std::list< Vertex > VertexList
Definition: DCEL.h:182
pandora::StringVector m_clusterListNames
The list of cluster list names.

Member Data Documentation

pandora::StringVector lar_content::ListDeletionAlgorithm::m_clusterListNames
private

The list of cluster list names.

Definition at line 26 of file ListDeletionAlgorithm.h.

pandora::StringVector lar_content::ListDeletionAlgorithm::m_pfoListNames
private

The list of pfo list names.

Definition at line 25 of file ListDeletionAlgorithm.h.

pandora::StringVector lar_content::ListDeletionAlgorithm::m_vertexListNames
private

The list of vertex list names.

Definition at line 27 of file ListDeletionAlgorithm.h.


The documentation for this class was generated from the following files: