Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
pandora::VertexManager Class Reference

VertexManager class. More...

#include "VertexManager.h"

Inheritance diagram for pandora::VertexManager:
Collaboration diagram for pandora::VertexManager:

Public Member Functions

 VertexManager (const Pandora *const pPandora)
 Constructor.
 
 ~VertexManager ()
 Destructor.
 
template<>
bool IsAvailable (const Vertex *const pVertex) const
 
template<>
bool IsAvailable (const VertexList *const pVertexList) const
 
template<>
void SetAvailability (const Vertex *const pVertex, bool isAvailable) const
 
template<>
void SetAvailability (const VertexList *const pVertexList, bool isAvailable) const
 

Protected Types

typedef Manager< Vertex >::ObjectList ObjectList
 
typedef std::map< std::string, ObjectList * > NameToListMap
 
typedef std::unordered_map< const Algorithm *, AlgorithmInfoAlgorithmInfoMap
 

Protected Member Functions

virtual StatusCode CreateTemporaryListAndSetCurrent (const Algorithm *const pAlgorithm, std::string &temporaryListName)
 Make a temporary list and set it to be the current list.
 
virtual StatusCode MoveObjectsToTemporaryListAndSetCurrent (const Algorithm *const pAlgorithm, const std::string &originalListName, std::string &temporaryListName, const ObjectList &objectsToMove)
 Move objects to a new temporary object list and set it to be the current object list.
 
virtual StatusCode SaveObjects (const std::string &targetListName, const std::string &sourceListName)
 Save a list of objects.
 
virtual StatusCode SaveObjects (const std::string &targetListName, const std::string &sourceListName, const ObjectList &objectsToSave)
 Save a list of objects.
 
virtual StatusCode MoveObjectsBetweenLists (const std::string &targetListName, const std::string &sourceListName, const ObjectList *pObjectSubset=nullptr)
 Move (a subset of) objects between two lists.
 
virtual StatusCode TemporarilyReplaceCurrentList (const std::string &listName)
 Temporarily replace the current list with another list, which may only be a temporary list. This switch will persist only for the duration of the algorithm and its daughters; unless otherwise specified, the list will revert to the algorithm input list upon algorithm completion.
 
virtual StatusCode DeleteObject (const Vertex *const pT, const std::string &listName)
 Delete an object from a specified list.
 
virtual StatusCode DeleteObjects (const ObjectList &objectList, const std::string &listName)
 Delete a list of objects from a specified list.
 
virtual StatusCode DeleteTemporaryObjects (const Algorithm *const pAlgorithm, const std::string &temporaryListName)
 Delete the contents of a temporary list.
 
virtual StatusCode GetResetDeletionObjects (const Algorithm *const pAlgorithm, ObjectList &objectList) const
 Get the list of objects that will be deleted when the algorithm info is reset.
 
virtual StatusCode ResetCurrentListToAlgorithmInputList (const Algorithm *const pAlgorithm)
 Reset the current list to the algorithm input list.
 
virtual StatusCode ReplaceCurrentAndAlgorithmInputLists (const Algorithm *const pAlgorithm, const std::string &listName)
 Replace the current and algorithm input lists with a pre-existing list.
 
virtual StatusCode DropCurrentList (const Algorithm *const pAlgorithm)
 Drop the current list, returning the current list to its default empty/null state.
 
virtual StatusCode RenameList (const std::string &oldListName, const std::string &newListName)
 Rename a saved list, altering its saved name from a specified old list name to a specified new list name.
 
virtual StatusCode ResetAlgorithmInfo (const Algorithm *const pAlgorithm, bool isAlgorithmFinished)
 Remove temporary lists and reset the current cluster list to that when algorithm was initialized.
 
virtual StatusCode EraseAllContent ()
 Erase all manager content.
 
virtual StatusCode GetList (const std::string &listName, const ObjectList *&pObjectList) const
 Get a list.
 
virtual StatusCode GetCurrentList (const ObjectList *&pObjectList, std::string &listName) const
 Get the current list.
 
virtual StatusCode GetCurrentListName (std::string &listName) const
 Get the current list name.
 
virtual StatusCode GetAlgorithmInputList (const Algorithm *const pAlgorithm, const ObjectList *&pObjectList, std::string &listName) const
 Get the algorithm input list.
 
virtual StatusCode GetAlgorithmInputListName (const Algorithm *const pAlgorithm, std::string &listName) const
 Get the algorithm track list name.
 
virtual StatusCode RegisterAlgorithm (const Algorithm *const pAlgorithm)
 Register an algorithm with the manager.
 
virtual StatusCode ResetForNextEvent ()
 Reset the manager.
 
virtual StatusCode CreateInitialLists ()
 Create initial lists.
 
virtual T * Modifiable (const T *const pT) const
 Access a modifiable object, when provided with address to const object.
 

Protected Attributes

bool m_canMakeNewObjects
 Whether the manager is allowed to make new objects when requested by algorithms.
 
const std::string m_nullListName
 The name of the default empty (NULL) list.
 
const Pandora *const m_pPandora
 The associated pandora object.
 
NameToListMap m_nameToListMap
 The name to list map.
 
AlgorithmInfoMap m_algorithmInfoMap
 The algorithm info map.
 
std::string m_currentListName
 The name of the current list.
 
StringSet m_savedLists
 The set of saved lists.
 

Private Member Functions

StatusCode Create (const object_creation::Vertex::Parameters &parameters, const Vertex *&pVertex, const ObjectFactory< object_creation::Vertex::Parameters, object_creation::Vertex::Object > &factory)
 Create a vertex.
 
StatusCode AlterMetadata (const Vertex *const pVertex, const object_creation::Vertex::Metadata &metadata) const
 Alter the metadata information stored in a vertex.
 
template<typename T >
bool IsAvailable (const T *const pT) const
 Is a vertex, or a list of vertices, available to add to a particle flow object.
 
template<typename T >
void SetAvailability (const T *const pT, bool isAvailable) const
 Set availability of a vertex, or a list of vertices, to be added to a particle flow object.
 

Friends

class PandoraContentApiImpl
 
class PandoraImpl
 

Detailed Description

VertexManager class.

Definition at line 22 of file VertexManager.h.

Member Typedef Documentation

◆ AlgorithmInfoMap

template<typename T >
typedef std::unordered_map<const Algorithm *, AlgorithmInfo> pandora::Manager< T >::AlgorithmInfoMap
protectedinherited

Definition at line 176 of file Manager.h.

◆ NameToListMap

template<typename T >
typedef std::map<std::string, ObjectList *> pandora::Manager< T >::NameToListMap
protectedinherited

Definition at line 175 of file Manager.h.

◆ ObjectList

typedef Manager<Vertex >::ObjectList pandora::AlgorithmObjectManager< Vertex >::ObjectList
protectedinherited

Definition at line 36 of file AlgorithmObjectManager.h.

Constructor & Destructor Documentation

◆ VertexManager()

pandora::VertexManager::VertexManager ( const Pandora *const  pPandora)

Constructor.

Parameters
pPandoraaddress of the associated pandora object

Definition at line 20 of file VertexManager.cc.

Here is the call graph for this function:

◆ ~VertexManager()

pandora::VertexManager::~VertexManager ( )

Destructor.

Definition at line 28 of file VertexManager.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AlterMetadata()

StatusCode pandora::VertexManager::AlterMetadata ( const Vertex *const  pVertex,
const object_creation::Vertex::Metadata metadata 
) const
private

Alter the metadata information stored in a vertex.

Parameters
pVertexaddress of the vertex to modify
metaDatathe metadata (only populated metadata fields will be propagated to the object)

Definition at line 69 of file VertexManager.cc.

Here is the call graph for this function:

◆ Create()

StatusCode pandora::VertexManager::Create ( const object_creation::Vertex::Parameters parameters,
const Vertex *&  pVertex,
const ObjectFactory< object_creation::Vertex::Parameters, object_creation::Vertex::Object > &  factory 
)
private

Create a vertex.

Parameters
parametersthe vertex parameters
pVertexto receive the address of the vertex created
factorythe factory that performs the object allocation

Definition at line 35 of file VertexManager.cc.

Here is the call graph for this function:

◆ CreateInitialLists()

template<typename T >
StatusCode pandora::Manager< T >::CreateInitialLists ( )
protectedvirtualinherited

Create initial lists.

Reimplemented in pandora::InputObjectManager< T >, pandora::InputObjectManager< CaloHit >, pandora::InputObjectManager< MCParticle >, and pandora::InputObjectManager< Track >.

Definition at line 274 of file Manager.cc.

Here is the caller graph for this function:

◆ CreateTemporaryListAndSetCurrent()

StatusCode pandora::AlgorithmObjectManager< Vertex >::CreateTemporaryListAndSetCurrent ( const Algorithm *const  pAlgorithm,
std::string &  temporaryListName 
)
protectedvirtualinherited

Make a temporary list and set it to be the current list.

Parameters
pAlgorithmaddress of the algorithm requesting a temporary list
temporaryListNameto receive the name of the temporary list

Reimplemented from pandora::Manager< T >.

Definition at line 44 of file AlgorithmObjectManager.cc.

◆ DeleteObject()

StatusCode pandora::AlgorithmObjectManager< Vertex >::DeleteObject ( const Vertex *const  pT,
const std::string &  listName 
)
protectedvirtualinherited

Delete an object from a specified list.

Parameters
pClusteraddress of the object to delete
listNamethe name of the list containing the object

Definition at line 103 of file AlgorithmObjectManager.cc.

◆ DeleteObjects()

StatusCode pandora::AlgorithmObjectManager< Vertex >::DeleteObjects ( const ObjectList objectList,
const std::string &  listName 
)
protectedvirtualinherited

Delete a list of objects from a specified list.

Parameters
objectListthe list of objects to delete
listNamethe name of the list containing the objects

Definition at line 111 of file AlgorithmObjectManager.cc.

◆ DeleteTemporaryObjects()

StatusCode pandora::AlgorithmObjectManager< Vertex >::DeleteTemporaryObjects ( const Algorithm *const  pAlgorithm,
const std::string &  temporaryListName 
)
protectedvirtualinherited

Delete the contents of a temporary list.

Parameters
pAlgorithmaddress of the algorithm calling this function
temporaryListNamethe name of the temporary list

Definition at line 119 of file AlgorithmObjectManager.cc.

◆ DropCurrentList()

StatusCode pandora::AlgorithmObjectManager< Vertex >::DropCurrentList ( const Algorithm *const  pAlgorithm)
protectedvirtualinherited

Drop the current list, returning the current list to its default empty/null state.

Parameters
pAlgorithmaddress of the algorithm altering the lists

Reimplemented from pandora::Manager< T >.

Definition at line 149 of file AlgorithmObjectManager.cc.

◆ EraseAllContent()

StatusCode pandora::AlgorithmObjectManager< Vertex >::EraseAllContent ( )
protectedvirtualinherited

Erase all manager content.

Reimplemented from pandora::Manager< T >.

Definition at line 170 of file AlgorithmObjectManager.cc.

◆ GetAlgorithmInputList()

template<typename T >
StatusCode pandora::Manager< T >::GetAlgorithmInputList ( const Algorithm *const  pAlgorithm,
const ObjectList *&  pObjectList,
std::string &  listName 
) const
protectedvirtualinherited

Get the algorithm input list.

Parameters
pAlgorithmaddress of the algorithm
pObjectListto receive the algorithm input list
listNameto receive the name of the algorithm input list

Definition at line 69 of file Manager.cc.

◆ GetAlgorithmInputListName()

template<typename T >
StatusCode pandora::Manager< T >::GetAlgorithmInputListName ( const Algorithm *const  pAlgorithm,
std::string &  listName 
) const
inlineprotectedvirtualinherited

Get the algorithm track list name.

Parameters
pAlgorithmaddress of the algorithm
listNameto receive the algorithm input list name

Definition at line 88 of file Manager.cc.

◆ GetCurrentList()

template<typename T >
StatusCode pandora::Manager< T >::GetCurrentList ( const ObjectList *&  pObjectList,
std::string &  listName 
) const
protectedvirtualinherited

Get the current list.

Parameters
pObjectListto receive the current list
listNameto receive the name of the current list

Definition at line 48 of file Manager.cc.

Here is the caller graph for this function:

◆ GetCurrentListName()

template<typename T >
StatusCode pandora::Manager< T >::GetCurrentListName ( std::string &  listName) const
inlineprotectedvirtualinherited

Get the current list name.

Parameters
listNameto receive the current list name

Definition at line 57 of file Manager.cc.

◆ GetList()

template<typename T >
StatusCode pandora::Manager< T >::GetList ( const std::string &  listName,
const ObjectList *&  pObjectList 
) const
protectedvirtualinherited

Get a list.

Parameters
listNamethe name of the list
pObjectListto receive the list

Definition at line 34 of file Manager.cc.

Here is the caller graph for this function:

◆ GetResetDeletionObjects()

StatusCode pandora::AlgorithmObjectManager< Vertex >::GetResetDeletionObjects ( const Algorithm *const  pAlgorithm,
ObjectList objectList 
) const
protectedvirtualinherited

Get the list of objects that will be deleted when the algorithm info is reset.

Parameters
pAlgorithmaddress of the algorithm
objectListto receive the list of objects that will be deleted when the algorithm info is reset

Definition at line 127 of file AlgorithmObjectManager.cc.

◆ IsAvailable() [1/3]

template<typename T >
bool pandora::VertexManager::IsAvailable ( const T *const  pT) const
private

Is a vertex, or a list of vertices, available to add to a particle flow object.

Parameters
pTaddress of the object or object list
Returns
boolean
Here is the caller graph for this function:

◆ IsAvailable() [2/3]

template<>
bool pandora::VertexManager::IsAvailable ( const Vertex *const  pVertex) const

Definition at line 77 of file VertexManager.cc.

Here is the call graph for this function:

◆ IsAvailable() [3/3]

template<>
bool pandora::VertexManager::IsAvailable ( const VertexList *const  pVertexList) const

Definition at line 83 of file VertexManager.cc.

Here is the call graph for this function:

◆ Modifiable()

template<typename T >
T * pandora::Manager< T >::Modifiable ( const T *const  pT) const
protectedvirtualinherited

Access a modifiable object, when provided with address to const object.

Parameters
pTthe address of the const object
Returns
address of the modifiable object

Definition at line 288 of file Manager.cc.

Here is the caller graph for this function:

◆ MoveObjectsBetweenLists()

StatusCode pandora::AlgorithmObjectManager< Vertex >::MoveObjectsBetweenLists ( const std::string &  targetListName,
const std::string &  sourceListName,
const ObjectList pObjectSubset = nullptr 
)
protectedvirtualinherited

Move (a subset of) objects between two lists.

Parameters
targetListNamethe name of the target object list, which will be created if it doesn't currently exist
sourceListNamethe name of the object list containing objects to save
pObjectSubsetif specified, only objects in both this and the source list will be moved

Definition at line 85 of file AlgorithmObjectManager.cc.

◆ MoveObjectsToTemporaryListAndSetCurrent()

StatusCode pandora::AlgorithmObjectManager< Vertex >::MoveObjectsToTemporaryListAndSetCurrent ( const Algorithm *const  pAlgorithm,
const std::string &  originalListName,
std::string &  temporaryListName,
const ObjectList objectsToMove 
)
protectedvirtualinherited

Move objects to a new temporary object list and set it to be the current object list.

Parameters
pAlgorithmaddress of the algorithm requesting a temporary list
originalListNamethe list in which the object currently exist
temporaryListNameto receive the name of the temporary list
objectsToMoveonly objects in both this and the current list will be moved
  • other object in the current list will remain in original list
  • an empty object list will be rejected

Definition at line 56 of file AlgorithmObjectManager.cc.

◆ RegisterAlgorithm()

template<typename T >
StatusCode pandora::Manager< T >::RegisterAlgorithm ( const Algorithm *const  pAlgorithm)
protectedvirtualinherited

Register an algorithm with the manager.

Parameters
pAlgorithmaddress of the algorithm

Definition at line 198 of file Manager.cc.

◆ RenameList()

StatusCode pandora::AlgorithmObjectManager< Vertex >::RenameList ( const std::string &  oldListName,
const std::string &  newListName 
)
protectedvirtualinherited

Rename a saved list, altering its saved name from a specified old list name to a specified new list name.

Parameters
oldListNamethe old list name
newListNamethe new list name

Reimplemented from pandora::Manager< T >.

Definition at line 157 of file AlgorithmObjectManager.cc.

◆ ReplaceCurrentAndAlgorithmInputLists()

StatusCode pandora::AlgorithmObjectManager< Vertex >::ReplaceCurrentAndAlgorithmInputLists ( const Algorithm *const  pAlgorithm,
const std::string &  listName 
)
protectedvirtualinherited

Replace the current and algorithm input lists with a pre-existing list.

Parameters
pAlgorithmaddress of the algorithm changing the current list
listNamethe name of the new current (and algorithm input) list

Reimplemented from pandora::Manager< T >.

Definition at line 142 of file AlgorithmObjectManager.cc.

◆ ResetAlgorithmInfo()

StatusCode pandora::AlgorithmObjectManager< Vertex >::ResetAlgorithmInfo ( const Algorithm *const  pAlgorithm,
bool  isAlgorithmFinished 
)
protectedvirtualinherited

Remove temporary lists and reset the current cluster list to that when algorithm was initialized.

Parameters
pAlgorithmthe algorithm associated with the temporary objects
isAlgorithmFinishedwhether the algorithm has completely finished and the algorithm info should be entirely removed

Reimplemented from pandora::Manager< T >.

Definition at line 165 of file AlgorithmObjectManager.cc.

◆ ResetCurrentListToAlgorithmInputList()

StatusCode pandora::AlgorithmObjectManager< Vertex >::ResetCurrentListToAlgorithmInputList ( const Algorithm *const  pAlgorithm)
protectedvirtualinherited

Reset the current list to the algorithm input list.

Parameters
pAlgorithmaddress of the algorithm changing the current track list

Reimplemented from pandora::Manager< T >.

Definition at line 134 of file AlgorithmObjectManager.cc.

◆ ResetForNextEvent()

template<typename T >
StatusCode pandora::Manager< T >::ResetForNextEvent ( )
protectedvirtualinherited

Reset the manager.

Definition at line 247 of file Manager.cc.

Here is the caller graph for this function:

◆ SaveObjects() [1/2]

StatusCode pandora::AlgorithmObjectManager< Vertex >::SaveObjects ( const std::string &  targetListName,
const std::string &  sourceListName 
)
protectedvirtualinherited

Save a list of objects.

Parameters
targetListNamethe name of the target object list, which will be created if it doesn't currently exist
sourceListNamethe name of the (typically temporary) object list to save

Definition at line 65 of file AlgorithmObjectManager.cc.

◆ SaveObjects() [2/2]

StatusCode pandora::AlgorithmObjectManager< Vertex >::SaveObjects ( const std::string &  targetListName,
const std::string &  sourceListName,
const ObjectList objectsToSave 
)
protectedvirtualinherited

Save a list of objects.

Parameters
targetListNamethe name of the target object list, which will be created if it doesn't currently exist
sourceListNamethe name of the (typically temporary) object list containing objects to save
objectToSaveonly objects in both this and the temporary list will be stored
  • other object will remain in the temporary list and will be deleted when the parent algorithm exits
  • an empty object list will be rejected

Definition at line 76 of file AlgorithmObjectManager.cc.

◆ SetAvailability() [1/3]

template<typename T >
void pandora::VertexManager::SetAvailability ( const T *const  pT,
bool  isAvailable 
) const
private

Set availability of a vertex, or a list of vertices, to be added to a particle flow object.

Parameters
pTthe address of the object or object list
isAvailablethe availability
Here is the caller graph for this function:

◆ SetAvailability() [2/3]

template<>
void pandora::VertexManager::SetAvailability ( const Vertex *const  pVertex,
bool  isAvailable 
) const

Definition at line 96 of file VertexManager.cc.

Here is the call graph for this function:

◆ SetAvailability() [3/3]

template<>
void pandora::VertexManager::SetAvailability ( const VertexList *const  pVertexList,
bool  isAvailable 
) const

Definition at line 102 of file VertexManager.cc.

Here is the call graph for this function:

◆ TemporarilyReplaceCurrentList()

StatusCode pandora::AlgorithmObjectManager< Vertex >::TemporarilyReplaceCurrentList ( const std::string &  listName)
protectedvirtualinherited

Temporarily replace the current list with another list, which may only be a temporary list. This switch will persist only for the duration of the algorithm and its daughters; unless otherwise specified, the list will revert to the algorithm input list upon algorithm completion.

Parameters
listNamethe name of the new current (and algorithm input) list

Definition at line 95 of file AlgorithmObjectManager.cc.

Friends And Related Symbol Documentation

◆ PandoraContentApiImpl

friend class PandoraContentApiImpl
friend

Definition at line 75 of file VertexManager.h.

◆ PandoraImpl

friend class PandoraImpl
friend

Definition at line 76 of file VertexManager.h.

Member Data Documentation

◆ m_algorithmInfoMap

template<typename T >
AlgorithmInfoMap pandora::Manager< T >::m_algorithmInfoMap
protectedinherited

The algorithm info map.

Definition at line 179 of file Manager.h.

◆ m_canMakeNewObjects

bool pandora::AlgorithmObjectManager< Vertex >::m_canMakeNewObjects
protectedinherited

Whether the manager is allowed to make new objects when requested by algorithms.

Definition at line 172 of file AlgorithmObjectManager.h.

◆ m_currentListName

template<typename T >
std::string pandora::Manager< T >::m_currentListName
protectedinherited

The name of the current list.

Definition at line 181 of file Manager.h.

◆ m_nameToListMap

template<typename T >
NameToListMap pandora::Manager< T >::m_nameToListMap
protectedinherited

The name to list map.

Definition at line 178 of file Manager.h.

◆ m_nullListName

template<typename T >
const std::string pandora::Manager< T >::m_nullListName
protectedinherited

The name of the default empty (NULL) list.

Definition at line 172 of file Manager.h.

◆ m_pPandora

template<typename T >
const Pandora* const pandora::Manager< T >::m_pPandora
protectedinherited

The associated pandora object.

Definition at line 173 of file Manager.h.

◆ m_savedLists

template<typename T >
StringSet pandora::Manager< T >::m_savedLists
protectedinherited

The set of saved lists.

Definition at line 182 of file Manager.h.


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