Pandora
Pandora source code navigator
|
AlgorithmObjectManager class. More...
#include "AlgorithmObjectManager.h"
Public Member Functions | |
AlgorithmObjectManager (const Pandora *const pPandora) | |
Constructor. | |
virtual | ~AlgorithmObjectManager () |
Destructor. | |
Protected Types | |
typedef Manager< T >::ObjectList | ObjectList |
typedef std::map< std::string, ObjectList * > | NameToListMap |
typedef std::unordered_map< const Algorithm *, AlgorithmInfo > | AlgorithmInfoMap |
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 T *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. | |
AlgorithmObjectManager class.
Definition at line 20 of file AlgorithmObjectManager.h.
|
protectedinherited |
|
protectedinherited |
|
protected |
Definition at line 36 of file AlgorithmObjectManager.h.
pandora::AlgorithmObjectManager< T >::AlgorithmObjectManager | ( | const Pandora *const | pPandora | ) |
Constructor.
pPandora | address of the associated pandora object |
Definition at line 21 of file AlgorithmObjectManager.cc.
|
virtual |
Destructor.
Definition at line 30 of file AlgorithmObjectManager.cc.
|
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.
|
protectedvirtual |
Make a temporary list and set it to be the current list.
pAlgorithm | address of the algorithm requesting a temporary list |
temporaryListName | to receive the name of the temporary list |
Reimplemented from pandora::Manager< T >.
Definition at line 37 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Delete an object from a specified list.
pCluster | address of the object to delete |
listName | the name of the list containing the object |
Definition at line 167 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Delete a list of objects from a specified list.
objectList | the list of objects to delete |
listName | the name of the list containing the objects |
Definition at line 188 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Delete the contents of a temporary list.
pAlgorithm | address of the algorithm calling this function |
temporaryListName | the name of the temporary list |
Definition at line 215 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Drop the current list, returning the current list to its default empty/null state.
pAlgorithm | address of the algorithm altering the lists |
Reimplemented from pandora::Manager< T >.
Definition at line 284 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Erase all manager content.
Reimplemented from pandora::Manager< T >.
Definition at line 319 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Get the algorithm input list.
pAlgorithm | address of the algorithm |
pObjectList | to receive the algorithm input list |
listName | to receive the name of the algorithm input list |
Definition at line 69 of file Manager.cc.
|
inlineprotectedvirtualinherited |
Get the algorithm track list name.
pAlgorithm | address of the algorithm |
listName | to receive the algorithm input list name |
Definition at line 88 of file Manager.cc.
|
protectedvirtualinherited |
Get the current list.
pObjectList | to receive the current list |
listName | to receive the name of the current list |
Definition at line 48 of file Manager.cc.
|
inlineprotectedvirtualinherited |
Get the current list name.
listName | to receive the current list name |
Definition at line 57 of file Manager.cc.
|
protectedvirtualinherited |
Get a list.
listName | the name of the list |
pObjectList | to receive the list |
Definition at line 34 of file Manager.cc.
|
protectedvirtual |
Get the list of objects that will be deleted when the algorithm info is reset.
pAlgorithm | address of the algorithm |
objectList | to receive the list of objects that will be deleted when the algorithm info is reset |
Definition at line 243 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Access a modifiable object, when provided with address to const object.
pT | the address of the const object |
Definition at line 288 of file Manager.cc.
|
protectedvirtual |
Move (a subset of) objects between two lists.
targetListName | the name of the target object list, which will be created if it doesn't currently exist |
sourceListName | the name of the object list containing objects to save |
pObjectSubset | if specified, only objects in both this and the source list will be moved |
Definition at line 96 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Move objects to a new temporary object list and set it to be the current object list.
pAlgorithm | address of the algorithm requesting a temporary list |
originalListName | the list in which the object currently exist |
temporaryListName | to receive the name of the temporary list |
objectsToMove | only objects in both this and the current list will be moved
|
Definition at line 46 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Register an algorithm with the manager.
pAlgorithm | address of the algorithm |
Definition at line 198 of file Manager.cc.
|
protectedvirtual |
Rename a saved list, altering its saved name from a specified old list name to a specified new list name.
oldListName | the old list name |
newListName | the new list name |
Reimplemented from pandora::Manager< T >.
Definition at line 293 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Replace the current and algorithm input lists with a pre-existing list.
pAlgorithm | address of the algorithm changing the current list |
listName | the name of the new current (and algorithm input) list |
Reimplemented from pandora::Manager< T >.
Definition at line 275 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Remove temporary lists and reset the current cluster list to that when algorithm was initialized.
pAlgorithm | the algorithm associated with the temporary objects |
isAlgorithmFinished | whether the algorithm has completely finished and the algorithm info should be entirely removed |
Reimplemented from pandora::Manager< T >.
Definition at line 304 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Reset the current list to the algorithm input list.
pAlgorithm | address of the algorithm changing the current track list |
Reimplemented from pandora::Manager< T >.
Definition at line 266 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Reset the manager.
Definition at line 247 of file Manager.cc.
|
protectedvirtual |
Save a list of objects.
targetListName | the name of the target object list, which will be created if it doesn't currently exist |
sourceListName | the name of the (typically temporary) object list to save |
Definition at line 61 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
Save a list of objects.
targetListName | the name of the target object list, which will be created if it doesn't currently exist |
sourceListName | the name of the (typically temporary) object list containing objects to save |
objectToSave | only objects in both this and the temporary list will be stored
|
Definition at line 77 of file AlgorithmObjectManager.cc.
|
protectedvirtual |
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.
listName | the name of the new current (and algorithm input) list |
Definition at line 154 of file AlgorithmObjectManager.cc.
|
protectedinherited |
|
protected |
Whether the manager is allowed to make new objects when requested by algorithms.
Definition at line 172 of file AlgorithmObjectManager.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |