30 const PfoList *pPfoList(
nullptr);
33 if (STATUS_CODE_SUCCESS != statusCode)
36 const PfoList pfoList(*pPfoList);
41 std::cout <<
"ListPruningAlgorithm: Could not delete Pfo." << std::endl;
47 std::cout <<
"ListPruningAlgorithm: pfo list " << listName <<
" unavailable." << std::endl;
58 if (STATUS_CODE_SUCCESS != statusCode)
63 for (
const Cluster *
const pCluster : clusterList)
69 std::cout <<
"ListPruningAlgorithm: Could not delete Cluster." << std::endl;
75 std::cout <<
"ListPruningAlgorithm: cluster list " << listName <<
" unavailable." << std::endl;
86 if (STATUS_CODE_SUCCESS != statusCode)
91 for (
const Vertex *
const pVertex : vertexList)
97 std::cout <<
"ListPruningAlgorithm: Could not delete Vertex." << std::endl;
103 std::cout <<
"ListPruningAlgorithm: vertex list " << listName <<
" unavailable." << std::endl;
107 return STATUS_CODE_SUCCESS;
126 return STATUS_CODE_SUCCESS;
Header file for the list pruning algorithm class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
static pandora::StatusCode Delete(const pandora::Algorithm &algorithm, const T *const pT)
Delete an object from the current list.
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
pandora::StringVector m_pfoListNames
The pfo list names.
pandora::StringVector m_vertexListNames
The vertex list names.
pandora::StringVector m_clusterListNames
The cluster list names.
ListPruningAlgorithm()
Default constructor.
pandora::StatusCode Run()
Run the algorithm.
bool m_warnIfObjectsUnavailable
Whether to print warning if attempt made to delete unavailable objects.
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
ParticleFlowObject class.
StatusCodeException class.
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.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
MANAGED_CONTAINER< const Cluster * > ClusterList
MANAGED_CONTAINER< const Vertex * > VertexList
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList