34 PANDORA_RETURN_RESULT_IF_AND_IF(
35 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*
this,
m_vertexListName, pVertexList));
37 if (!pVertexList || pVertexList->empty())
39 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo())
42 return STATUS_CODE_SUCCESS;
46 const PfoList *pNeutrinoPfoList(
nullptr);
47 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CreateTemporaryListAndSetCurrent(*
this, pNeutrinoPfoList, neutrinoPfoListName));
51 const Vertex *
const pVertex = *vIter;
53 if (VERTEX_3D != pVertex->GetVertexType())
54 throw StatusCodeException(STATUS_CODE_FAILURE);
57 PandoraContentApi::ParticleFlowObject::Parameters pfoParameters;
59 pfoParameters.m_vertexList.push_back(pVertex);
61 const ParticleFlowObject *pNeutrinoPfo(
nullptr);
62 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*
this, pfoParameters, pNeutrinoPfo));
65 if ((!pNeutrinoPfoList) || pNeutrinoPfoList->empty())
66 throw StatusCodeException(STATUS_CODE_FAILURE);
68 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList<Pfo>(*
this,
m_neutrinoPfoListName));
69 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ReplaceCurrentList<Pfo>(*
this,
m_neutrinoPfoListName));
71 return STATUS_CODE_SUCCESS;
std::string m_vertexListName
The name of the neutrino vertex list.
bool m_forceSingleEmptyNeutrino
Whether to force creation of a single neutrino, with no vertex, regardless of number of input vertice...
void FillDefaultNeutrinoParameters(PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
Fill provided pfo parameters with default/dummy values for later refinement.
std::string m_neutrinoPfoListName
The name of the neutrino pfo list.
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
std::list< Vertex > VertexList
pandora::StatusCode ForceSingleEmptyNeutrino() const
Force creation of a single neutrino, with no vertex, regardless of number of input vertices...
QTextStream & endl(QTextStream &s)