LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::ListChangingAlgorithm Class Reference

ListChangingAlgorithm::Algorithm class. More...

#include "ListChangingAlgorithm.h"

Inheritance diagram for lar_content::ListChangingAlgorithm:

Private Member Functions

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

Private Attributes

std::string m_caloHitListName
 The calo hit list name to set as the current calo hit list. More...
 
std::string m_clusterListName
 The cluster list name to set as the current cluster list. More...
 
std::string m_vertexListName
 The vertex list name to set as the current vertex list. More...
 
std::string m_pfoListName
 The pfo list name to set as the current pfo list. More...
 

Detailed Description

ListChangingAlgorithm::Algorithm class.

Definition at line 19 of file ListChangingAlgorithm.h.

Member Function Documentation

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

Definition at line 69 of file ListChangingAlgorithm.cc.

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 }
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_vertexListName
The vertex list name to set as the current vertex list.
std::string m_caloHitListName
The calo hit list name to set as the current calo hit list.
StatusCode lar_content::ListChangingAlgorithm::Run ( )
private

Definition at line 18 of file ListChangingAlgorithm.cc.

19 {
20  if (!m_caloHitListName.empty())
21  {
22  const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<CaloHit>(*this, m_caloHitListName));
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  {
33  const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<Cluster>(*this, m_clusterListName));
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  {
44  const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<Vertex>(*this, m_vertexListName));
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  {
55  const StatusCode statusCode(PandoraContentApi::ReplaceCurrentList<Pfo>(*this, m_pfoListName));
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 }
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_vertexListName
The vertex list name to set as the current vertex list.
std::string m_caloHitListName
The calo hit list name to set as the current calo hit list.

Member Data Documentation

std::string lar_content::ListChangingAlgorithm::m_caloHitListName
private

The calo hit list name to set as the current calo hit list.

Definition at line 25 of file ListChangingAlgorithm.h.

std::string lar_content::ListChangingAlgorithm::m_clusterListName
private

The cluster list name to set as the current cluster list.

Definition at line 26 of file ListChangingAlgorithm.h.

std::string lar_content::ListChangingAlgorithm::m_pfoListName
private

The pfo list name to set as the current pfo list.

Definition at line 28 of file ListChangingAlgorithm.h.

std::string lar_content::ListChangingAlgorithm::m_vertexListName
private

The vertex list name to set as the current vertex list.

Definition at line 27 of file ListChangingAlgorithm.h.


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