9 #include "Pandora/AlgorithmHeaders.h" 25 StreamSelectionAlgorithm::StreamSelectionAlgorithm() :
37 std::cout <<
"StreamSelectionAlgorithm::Run - Error: No output lists found" << std::endl;
38 return STATUS_CODE_NOT_FOUND;
41 const ClusterList *pClusterList{
nullptr};
42 std::string originalClusterListName;
45 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*
this, pClusterList));
46 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentListName<Cluster>(*
this, originalClusterListName));
50 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*
this,
m_inputListName, pClusterList));
57 for (
const Cluster *pCluster : *pClusterList)
60 if (status != STATUS_CODE_SUCCESS)
66 for (std::string listName : m_listNames)
67 PandoraContentApi::SaveList<ClusterList>(*
this, originalClusterListName, listName,
m_clusterListMap.at(listName));
69 return STATUS_CODE_SUCCESS;
76 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"InputListName",
m_inputListName));
77 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"ListType",
m_listType));
81 std::cout <<
"StreamingAlgorithm::ReadSettings - Error: Only Cluster list type is supported at this time" << std::endl;
82 return STATUS_CODE_INVALID_PARAMETER;
87 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
"ListNames",
m_listNames));
89 return STATUS_CODE_SUCCESS;
std::string m_listType
The type of the input lists (currently only Cluster is supported)
Header file for the lar calo hit class.
Header file for the lar monitoring helper helper class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Header file for the lar monte carlo particle helper helper class.
std::string m_inputListName
The input list name if not using the current list.
pandora::StringVector m_listNames
The name of the output lists.
pandora::StatusCode Run()
ClusterListMap m_clusterListMap
The map from cluster list names to cluster lists.
Header file for the deep learning track shower cluster streaming algorithm.
virtual pandora::StatusCode AllocateToStreams(const pandora::Cluster *const pCluster)=0
Allocate a cluster to the appropriate streams.