Pandora
Pandora source code navigator
|
ClusterManager class. More...
#include "ClusterManager.h"
Public Member Functions | |
ClusterManager (const Pandora *const pPandora) | |
Constructor. | |
~ClusterManager () | |
Destructor. | |
template<> | |
bool | IsAvailable (const Cluster *const pCluster) const |
template<> | |
bool | IsAvailable (const ClusterList *const pClusterList) const |
template<> | |
void | SetAvailability (const Cluster *const pCluster, bool isAvailable) const |
template<> | |
void | SetAvailability (const ClusterList *const pClusterList, bool isAvailable) const |
Protected Types | |
typedef Manager< Cluster >::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 Cluster *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::Cluster::Parameters ¶meters, const Cluster *&pCluster, const ObjectFactory< object_creation::Cluster::Parameters, object_creation::Cluster::Object > &factory) |
Create cluster. | |
StatusCode | AlterMetadata (const Cluster *const pCluster, const object_creation::Cluster::Metadata &metadata) const |
Alter the metadata information stored in a cluster. | |
template<typename T > | |
bool | IsAvailable (const T *const pT) const |
Is a cluster, or a list of clusters, available to add to a particle flow object. | |
template<typename T > | |
void | SetAvailability (const T *const pT, bool isAvailable) const |
Set availability of a cluster, or a list of clusters, to be added to a particle flow object. | |
StatusCode | AddToCluster (const Cluster *const pCluster, const CaloHit *const pCaloHit) |
Add a calo hit to a cluster. | |
StatusCode | RemoveFromCluster (const Cluster *const pCluster, const CaloHit *const pCaloHit) |
Remove a calo hit from a cluster. | |
StatusCode | AddIsolatedToCluster (const Cluster *const pCluster, const CaloHit *const pCaloHit) |
Add an isolated calo hit to a cluster. This is not counted as a regular calo hit: it contributes only towards the cluster energy and does not affect any other cluster properties. | |
StatusCode | RemoveIsolatedFromCluster (const Cluster *const pCluster, const CaloHit *const pCaloHit) |
Remove an isolated calo hit from a cluster. | |
StatusCode | MergeAndDeleteClusters (const Cluster *const pClusterToEnlarge, const Cluster *const pClusterToDelete, const std::string &enlargeListName, const std::string &deleteListName) |
Merge two clusters from two specified lists, enlarging one cluster and deleting the second. | |
StatusCode | AddTrackAssociation (const Cluster *const pCluster, const Track *const pTrack) const |
Add an association between a cluster and a track. | |
StatusCode | RemoveTrackAssociation (const Cluster *const pCluster, const Track *const pTrack) const |
Remove an association between a cluster and a track. | |
StatusCode | RemoveAllTrackAssociations () const |
Remove all cluster to track associations. | |
StatusCode | RemoveCurrentTrackAssociations (TrackList &danglingTracks) const |
Remove cluster to track associations from all clusters in the current list. | |
StatusCode | RemoveTrackAssociations (const TrackToClusterMap &trackToClusterList) const |
Remove a specified list of cluster to track associations. | |
Friends | |
class | PandoraContentApiImpl |
class | PandoraImpl |
ClusterManager class.
Definition at line 22 of file ClusterManager.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 36 of file AlgorithmObjectManager.h.
pandora::ClusterManager::ClusterManager | ( | const Pandora *const | pPandora | ) |
Constructor.
pPandora | address of the associated pandora object |
Definition at line 20 of file ClusterManager.cc.
pandora::ClusterManager::~ClusterManager | ( | ) |
Destructor.
Definition at line 28 of file ClusterManager.cc.
|
private |
Add an isolated calo hit to a cluster. This is not counted as a regular calo hit: it contributes only towards the cluster energy and does not affect any other cluster properties.
pCluster | address of the cluster to modify |
pCaloHit | address of the hit to add |
Definition at line 124 of file ClusterManager.cc.
|
private |
Add a calo hit to a cluster.
pCluster | address of the cluster to modify |
pCaloHit | address of the hit to add |
Definition at line 110 of file ClusterManager.cc.
|
private |
Add an association between a cluster and a track.
pCluster | the address of the relevant cluster |
pTrack | the address of the track with which the cluster is associated |
Definition at line 166 of file ClusterManager.cc.
|
private |
Alter the metadata information stored in a cluster.
pCluster | address of the cluster to modify |
metaData | the metadata (only populated metadata fields will be propagated to the object) |
Definition at line 69 of file ClusterManager.cc.
|
private |
Create cluster.
parameters | the cluster parameters |
pCluster | to receive the address of the cluster created |
factory | the factory that performs the object allocation |
Definition at line 35 of file ClusterManager.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.
|
protectedvirtualinherited |
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 44 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 103 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 111 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 119 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 149 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Erase all manager content.
Reimplemented from pandora::Manager< T >.
Definition at line 170 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.
|
protectedvirtualinherited |
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 127 of file AlgorithmObjectManager.cc.
bool pandora::ClusterManager::IsAvailable | ( | const Cluster *const | pCluster | ) | const |
bool pandora::ClusterManager::IsAvailable | ( | const ClusterList *const | pClusterList | ) | const |
|
private |
Is a cluster, or a list of clusters, available to add to a particle flow object.
pT | address of the object or object list |
|
private |
Merge two clusters from two specified lists, enlarging one cluster and deleting the second.
pClusterToEnlarge | address of the cluster to enlarge |
pClusterToDelete | address of the cluster to delete |
enlargeListName | name of the list containing the cluster to enlarge |
deleteListName | name of the list containing the cluster to delete |
Definition at line 138 of file ClusterManager.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.
|
protectedvirtualinherited |
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 85 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 56 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Register an algorithm with the manager.
pAlgorithm | address of the algorithm |
Definition at line 198 of file Manager.cc.
|
private |
Remove all cluster to track associations.
Definition at line 180 of file ClusterManager.cc.
|
private |
Remove cluster to track associations from all clusters in the current list.
danglingTracks | to receive the list of "dangling" associations |
Definition at line 198 of file ClusterManager.cc.
|
private |
Remove a calo hit from a cluster.
pCluster | address of the cluster to modify |
pCaloHit | address of the hit to remove |
Definition at line 117 of file ClusterManager.cc.
|
private |
Remove an isolated calo hit from a cluster.
pCluster | address of the cluster to modify |
pCaloHit | address of the hit to remove |
Definition at line 131 of file ClusterManager.cc.
|
private |
Remove an association between a cluster and a track.
pCluster | the address of the relevant cluster |
pTrack | the address of the track with which the cluster is no longer associated |
Definition at line 173 of file ClusterManager.cc.
|
private |
Remove a specified list of cluster to track associations.
trackToClusterList | the specified track to cluster list |
Definition at line 220 of file ClusterManager.cc.
|
protectedvirtualinherited |
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 157 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 142 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 165 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 134 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
Reset the manager.
Definition at line 247 of file Manager.cc.
|
protectedvirtualinherited |
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 65 of file AlgorithmObjectManager.cc.
|
protectedvirtualinherited |
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 76 of file AlgorithmObjectManager.cc.
void pandora::ClusterManager::SetAvailability | ( | const Cluster *const | pCluster, |
bool | isAvailable | ||
) | const |
void pandora::ClusterManager::SetAvailability | ( | const ClusterList *const | pClusterList, |
bool | isAvailable | ||
) | const |
|
private |
Set availability of a cluster, or a list of clusters, to be added to a particle flow object.
pT | the address of the object or object list |
isAvailable | the availability |
|
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.
listName | the name of the new current (and algorithm input) list |
Definition at line 95 of file AlgorithmObjectManager.cc.
|
friend |
Definition at line 154 of file ClusterManager.h.
|
friend |
Definition at line 155 of file ClusterManager.h.
|
protectedinherited |
|
protectedinherited |
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 |