StreamSelectionAlgorithm class.
More...
#include <StreamSelectionAlgorithm.h>
|
virtual pandora::StatusCode | AllocateToStreams (const pandora::Cluster *const pCluster)=0 |
| Allocate a cluster to the appropriate streams. More...
|
|
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
|
|
pandora::StatusCode | Run () |
|
lar_content::StreamSelectionAlgorithm::StreamSelectionAlgorithm |
( |
| ) |
|
Default constructor.
Definition at line 25 of file StreamSelectionAlgorithm.cc.
std::string m_listType
The type of the input lists (currently only Cluster is supported)
std::string m_inputListName
The input list name if not using the current list.
virtual lar_content::StreamSelectionAlgorithm::~StreamSelectionAlgorithm |
( |
| ) |
|
|
virtualdefault |
virtual pandora::StatusCode lar_content::StreamSelectionAlgorithm::AllocateToStreams |
( |
const pandora::Cluster *const |
pCluster | ) |
|
|
protectedpure virtual |
StatusCode lar_content::StreamSelectionAlgorithm::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
protected |
Definition at line 72 of file StreamSelectionAlgorithm.cc.
74 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"InputListName",
m_inputListName));
75 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"ListType",
m_listType));
79 std::cout <<
"StreamingAlgorithm::ReadSettings - Error: Only Cluster list type is supported at this time" << std::endl;
80 return STATUS_CODE_INVALID_PARAMETER;
85 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
"ListNames",
m_listNames));
87 return STATUS_CODE_SUCCESS;
std::string m_listType
The type of the input lists (currently only Cluster is supported)
std::string m_inputListName
The input list name if not using the current list.
pandora::StringVector m_listNames
The name of the output lists.
BEGIN_PROLOG could also be cout
StatusCode lar_content::StreamSelectionAlgorithm::Run |
( |
| ) |
|
|
private |
Definition at line 31 of file StreamSelectionAlgorithm.cc.
35 std::cout <<
"StreamSelectionAlgorithm::Run - Error: No output lists found" << std::endl;
36 return STATUS_CODE_NOT_FOUND;
39 const ClusterList *pClusterList{
nullptr};
40 std::string originalClusterListName;
43 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*
this, pClusterList));
44 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentListName<Cluster>(*
this, originalClusterListName));
48 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*
this,
m_inputListName, pClusterList));
55 for (
const Cluster *pCluster : *pClusterList)
58 if (status != STATUS_CODE_SUCCESS)
64 for (std::string listName : m_listNames)
65 PandoraContentApi::SaveList<ClusterList>(*
this, originalClusterListName, listName,
m_clusterListMap.at(listName));
67 return STATUS_CODE_SUCCESS;
std::string m_inputListName
The input list name if not using the current list.
pandora::StringVector m_listNames
The name of the output lists.
ClusterListMap m_clusterListMap
The map from cluster list names to cluster lists.
BEGIN_PROLOG could also be cout
virtual pandora::StatusCode AllocateToStreams(const pandora::Cluster *const pCluster)=0
Allocate a cluster to the appropriate streams.
ClusterListMap lar_content::StreamSelectionAlgorithm::m_clusterListMap |
|
protected |
std::string lar_content::StreamSelectionAlgorithm::m_inputListName |
|
protected |
pandora::StringVector lar_content::StreamSelectionAlgorithm::m_listNames |
|
protected |
std::string lar_content::StreamSelectionAlgorithm::m_listType |
|
protected |
The documentation for this class was generated from the following files: