Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
pandora::Manager< T > Class Template Reference

Manager class. More...

#include "Manager.h"

Inheritance diagram for pandora::Manager< T >:
Collaboration diagram for pandora::Manager< T >:

Classes

class  AlgorithmInfo
 AlgorithmInfo class. More...
 

Public Member Functions

 Manager (const Pandora *const pPandora)
 Constructor.
 
virtual ~Manager ()
 Destructor.
 

Protected Types

typedef MANAGED_CONTAINER< const T * > ObjectList
 
typedef std::map< std::string, ObjectList * > NameToListMap
 
typedef std::unordered_map< const Algorithm *, AlgorithmInfoAlgorithmInfoMap
 

Protected Member Functions

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 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 CreateTemporaryListAndSetCurrent (const Algorithm *const pAlgorithm, std::string &temporaryListName)
 Create a temporary list associated with a particular algorithm.
 
virtual StatusCode RegisterAlgorithm (const Algorithm *const pAlgorithm)
 Register an algorithm with the manager.
 
virtual StatusCode ResetAlgorithmInfo (const Algorithm *const pAlgorithm, bool isAlgorithmFinished)
 Remove temporary lists and reset the current list to that when algorithm was initialized.
 
virtual StatusCode ResetForNextEvent ()
 Reset the manager.
 
virtual StatusCode EraseAllContent ()
 Erase all manager content.
 
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

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.
 

Detailed Description

template<typename T>
class pandora::Manager< T >

Manager class.

Definition at line 26 of file Manager.h.


Class Documentation

◆ pandora::Manager::AlgorithmInfo

class pandora::Manager::AlgorithmInfo
template<typename T>
class pandora::Manager< T >::AlgorithmInfo

AlgorithmInfo class.

Definition at line 164 of file Manager.h.

Class Members
unsigned int m_numberOfListsCreated The number of lists created by the algorithm.
string m_parentListName The current list when algorithm was initialized.
StringSet m_temporaryListNames The temporary list names.

Member Typedef Documentation

◆ AlgorithmInfoMap

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

Definition at line 176 of file Manager.h.

◆ NameToListMap

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

Definition at line 175 of file Manager.h.

◆ ObjectList

template<typename T >
typedef MANAGED_CONTAINER<const T *> pandora::Manager< T >::ObjectList
protected

Definition at line 42 of file Manager.h.

Constructor & Destructor Documentation

◆ Manager()

template<typename T >
pandora::Manager< T >::Manager ( const Pandora *const  pPandora)

Constructor.

Parameters
pPandoraaddress of the associated pandora object

Definition at line 17 of file Manager.cc.

◆ ~Manager()

template<typename T >
pandora::Manager< T >::~Manager ( )
virtual

Destructor.

Definition at line 27 of file Manager.cc.

Member Function Documentation

◆ CreateInitialLists()

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

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()

template<typename T >
StatusCode pandora::Manager< T >::CreateTemporaryListAndSetCurrent ( const Algorithm *const  pAlgorithm,
std::string &  temporaryListName 
)
protectedvirtual

Create a temporary list associated with a particular algorithm.

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

Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.

Definition at line 177 of file Manager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DropCurrentList()

template<typename T >
StatusCode pandora::Manager< T >::DropCurrentList ( const Algorithm *const  pAlgorithm)
protectedvirtual

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

Parameters
pAlgorithmaddress of the algorithm altering the lists

Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.

Definition at line 134 of file Manager.cc.

Here is the caller graph for this function:

◆ EraseAllContent()

◆ GetAlgorithmInputList()

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

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
inlineprotectedvirtual

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
protectedvirtual

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
inlineprotectedvirtual

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
protectedvirtual

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:

◆ Modifiable()

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

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:

◆ RegisterAlgorithm()

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

Register an algorithm with the manager.

Parameters
pAlgorithmaddress of the algorithm

Definition at line 198 of file Manager.cc.

◆ RenameList()

template<typename T >
StatusCode pandora::Manager< T >::RenameList ( const std::string &  oldListName,
const std::string &  newListName 
)
protectedvirtual

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 in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, pandora::AlgorithmObjectManager< Vertex >, pandora::InputObjectManager< T >, pandora::InputObjectManager< CaloHit >, pandora::InputObjectManager< MCParticle >, and pandora::InputObjectManager< Track >.

Definition at line 142 of file Manager.cc.

Here is the caller graph for this function:

◆ ReplaceCurrentAndAlgorithmInputLists()

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

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 in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.

Definition at line 110 of file Manager.cc.

Here is the caller graph for this function:

◆ ResetAlgorithmInfo()

template<typename T >
StatusCode pandora::Manager< T >::ResetAlgorithmInfo ( const Algorithm *const  pAlgorithm,
bool  isAlgorithmFinished 
)
protectedvirtual

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

Parameters
pAlgorithmaddress of the algorithm altering the lists
isAlgorithmFinishedwhether the algorithm has completely finished and the algorithm info should be entirely removed

Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.

Definition at line 216 of file Manager.cc.

Here is the caller graph for this function:

◆ ResetCurrentListToAlgorithmInputList()

template<typename T >
StatusCode pandora::Manager< T >::ResetCurrentListToAlgorithmInputList ( const Algorithm *const  pAlgorithm)
protectedvirtual

Reset the current list to the algorithm input list.

Parameters
pAlgorithmaddress of the algorithm changing the current track list

Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.

Definition at line 102 of file Manager.cc.

Here is the caller graph for this function:

◆ ResetForNextEvent()

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

Reset the manager.

Definition at line 247 of file Manager.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ m_algorithmInfoMap

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

The algorithm info map.

Definition at line 179 of file Manager.h.

◆ m_currentListName

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

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
protected

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
protected

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
protected

The associated pandora object.

Definition at line 173 of file Manager.h.

◆ m_savedLists

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

The set of saved lists.

Definition at line 182 of file Manager.h.


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