LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::MopUpBaseAlgorithm Class Reference

MopUpBaseAlgorithm class. More...

#include "MopUpBaseAlgorithm.h"

Inheritance diagram for lar_content::MopUpBaseAlgorithm:
lar_content::ClusterMopUpBaseAlgorithm lar_content::PfoMopUpBaseAlgorithm lar_content::BoundedClusterMopUpAlgorithm lar_content::ConeClusterMopUpAlgorithm lar_content::IsolatedClusterMopUpAlgorithm lar_content::NearbyClusterMopUpAlgorithm lar_content::SlidingConeClusterMopUpAlgorithm lar_content::SlidingConePfoMopUpAlgorithm lar_content::VertexBasedPfoMopUpAlgorithm lar_content::ShowerPfoMopUpAlgorithm

Public Member Functions

template<typename T >
const std::string GetListName (const T *const pT) const
 Find the name of the list hosting a specific object. More...
 

Protected Member Functions

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

Protected Attributes

pandora::StringVector m_daughterListNames
 The list of potential daughter object list names. More...
 

Detailed Description

MopUpBaseAlgorithm class.

Definition at line 19 of file MopUpBaseAlgorithm.h.

Member Function Documentation

template<typename T >
template const std::string lar_content::MopUpBaseAlgorithm::GetListName ( const T *const  pT) const

Find the name of the list hosting a specific object.

Parameters
pTthe address of the object
Returns
the name of the list

Definition at line 19 of file MopUpBaseAlgorithm.cc.

Referenced by lar_content::IsolatedClusterMopUpAlgorithm::DissolveClustersToHits(), lar_content::ClusterMopUpBaseAlgorithm::MakeClusterMerges(), and lar_content::SlidingConeClusterMopUpAlgorithm::MakeClusterMerges().

20 {
21  std::string currentListName;
22  const MANAGED_CONTAINER<const T*> *pCurrentList(nullptr);
23  (void) PandoraContentApi::GetCurrentList(*this, pCurrentList, currentListName);
24 
25  if (pCurrentList && (pCurrentList->end() != std::find(pCurrentList->begin(), pCurrentList->end(), pT)))
26  return currentListName;
27 
28  for (const std::string &listName : m_daughterListNames)
29  {
30  const MANAGED_CONTAINER<const T*> *pList(nullptr);
31  (void) PandoraContentApi::GetList(*this, listName, pList);
32 
33  if (pList && (pList->end() != std::find(pList->begin(), pList->end(), pT)))
34  return listName;
35  }
36 
37  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
38 }
pandora::StringVector m_daughterListNames
The list of potential daughter object list names.
StatusCode lar_content::MopUpBaseAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
protectedvirtual

Reimplemented in lar_content::VertexBasedPfoMopUpAlgorithm, lar_content::SlidingConePfoMopUpAlgorithm, lar_content::SlidingConeClusterMopUpAlgorithm, lar_content::ClusterMopUpBaseAlgorithm, lar_content::BoundedClusterMopUpAlgorithm, lar_content::IsolatedClusterMopUpAlgorithm, lar_content::ConeClusterMopUpAlgorithm, lar_content::PfoMopUpBaseAlgorithm, lar_content::NearbyClusterMopUpAlgorithm, and lar_content::ShowerPfoMopUpAlgorithm.

Definition at line 42 of file MopUpBaseAlgorithm.cc.

Referenced by lar_content::ClusterMopUpBaseAlgorithm::ReadSettings().

43 {
44  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
45  "DaughterListNames", m_daughterListNames));
46 
47  if (m_daughterListNames.empty())
48  {
49  std::cout << "MopUpBaseAlgorithm::ReadSettings - Must provide names of daughter object lists for use in mop up." << std::endl;
50  return STATUS_CODE_INVALID_PARAMETER;
51  }
52 
53  return STATUS_CODE_SUCCESS;
54 }
pandora::StringVector m_daughterListNames
The list of potential daughter object list names.

Member Data Documentation

pandora::StringVector lar_content::MopUpBaseAlgorithm::m_daughterListNames
protected

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