Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
AlgorithmObjectManager.h
Go to the documentation of this file.
1
8#ifndef PANDORA_ALGORITHM_OBJECT_MANAGER
9#define PANDORA_ALGORITHM_OBJECT_MANAGER 1
10
11#include "Managers/Manager.h"
12
13namespace pandora
14{
15
19template<typename T>
21{
22public:
28 AlgorithmObjectManager(const Pandora *const pPandora);
29
34
35protected:
37
44 virtual StatusCode CreateTemporaryListAndSetCurrent(const Algorithm *const pAlgorithm, std::string &temporaryListName);
45
56 virtual StatusCode MoveObjectsToTemporaryListAndSetCurrent(const Algorithm *const pAlgorithm, const std::string &originalListName,
57 std::string &temporaryListName, const ObjectList &objectsToMove);
58
65 virtual StatusCode SaveObjects(const std::string &targetListName, const std::string &sourceListName);
66
76 virtual StatusCode SaveObjects(const std::string &targetListName, const std::string &sourceListName, const ObjectList &objectsToSave);
77
85 virtual StatusCode MoveObjectsBetweenLists(const std::string &targetListName, const std::string &sourceListName,
86 const ObjectList *pObjectSubset = nullptr);
87
95 virtual StatusCode TemporarilyReplaceCurrentList(const std::string &listName);
96
103 virtual StatusCode DeleteObject(const T *const pT, const std::string &listName);
104
111 virtual StatusCode DeleteObjects(const ObjectList &objectList, const std::string &listName);
112
119 virtual StatusCode DeleteTemporaryObjects(const Algorithm *const pAlgorithm, const std::string &temporaryListName);
120
127 virtual StatusCode GetResetDeletionObjects(const Algorithm *const pAlgorithm, ObjectList &objectList) const;
128
134 virtual StatusCode ResetCurrentListToAlgorithmInputList(const Algorithm *const pAlgorithm);
135
142 virtual StatusCode ReplaceCurrentAndAlgorithmInputLists(const Algorithm *const pAlgorithm, const std::string &listName);
143
149 virtual StatusCode DropCurrentList(const Algorithm *const pAlgorithm);
150
157 virtual StatusCode RenameList(const std::string &oldListName, const std::string &newListName);
158
165 virtual StatusCode ResetAlgorithmInfo(const Algorithm *const pAlgorithm, bool isAlgorithmFinished);
166
170 virtual StatusCode EraseAllContent();
171
173};
174
175} // namespace pandora
176
177#endif // #ifndef PANDORA_ALGORITHM_OBJECT_MANAGER
Header file for the manager class.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
AlgorithmObjectManager class.
virtual StatusCode ResetCurrentListToAlgorithmInputList(const Algorithm *const pAlgorithm)
Reset the current list to the algorithm input list.
bool m_canMakeNewObjects
Whether the manager is allowed to make new objects when requested by algorithms.
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 EraseAllContent()
Erase all manager content.
virtual StatusCode CreateTemporaryListAndSetCurrent(const Algorithm *const pAlgorithm, std::string &temporaryListName)
Make a temporary list and set it to be the current list.
virtual StatusCode SaveObjects(const std::string &targetListName, const std::string &sourceListName)
Save a list of objects.
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 n...
virtual StatusCode DeleteObjects(const ObjectList &objectList, const std::string &listName)
Delete a list of objects from a specified list.
virtual StatusCode DeleteObject(const T *const pT, const std::string &listName)
Delete an object from a specified list.
virtual StatusCode TemporarilyReplaceCurrentList(const std::string &listName)
Temporarily replace the current list with another list, which may only be a temporary list....
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 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 DeleteTemporaryObjects(const Algorithm *const pAlgorithm, const std::string &temporaryListName)
Delete the contents of a temporary list.
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 ReplaceCurrentAndAlgorithmInputLists(const Algorithm *const pAlgorithm, const std::string &listName)
Replace the current and algorithm input lists with a pre-existing list.
Manager class.
Definition Manager.h:27
MANAGED_CONTAINER< const T * > ObjectList
Definition Manager.h:42
Pandora class.
Definition Pandora.h:40
StatusCode
The StatusCode enum.