Class AssociationManager

Direct Known Subclasses:
Cell, Cluster, Jet, ReconstructedParticle, Track

class AssociationManager

This class has been provided as an interim solution to the association problem.
It provides an implemetation of a general templated association\ mechanism which allows any object which inherits from ContainedObject (A special Athena class used for items in the TES) to store a reference to any other such object.
A user can then subsequently retrieve a SmartRefVector containing SmartRefs to all stored associations or to a subset selected by class type. Templates have been used to avoid the user having to cast ContainedObject to specific classes in the latter case.
Every user class which wishes to use this mechanism simply inherits AssociationManager publically.


Field Summary
 protected SmartRefVectorm_associations
          This is the record of associations between ContainedObjects.

Method Summary
 voidassociate(const ContainedObject * otherEntity)
          Sets a simple one directional association between this entity and another.
 SmartRefVectorassociations()
          Returns a list of all entities associated with this object.
 SmartRefVectorassociations(T )
          Returns a list of all entities of a certain class which have been associated with this object.
 boolunAssociated()
          A quick way to find out whether there are any associations at all.

Field Detail

m_associations

protected SmartRefVector m_associations
This is the record of associations between ContainedObjects.
It is a vector of SmartRef pointing polymorphically to other ContainedObjects in the TES.
Method Detail

associate

public void associate(const ContainedObject * otherEntity)
Sets a simple one directional association between this entity and another.
otherEntity is automatically converted to SmartRef(otherEntity)

associations

public SmartRefVector associations()
Returns a list of all entities associated with this object.

associations

public SmartRefVector associations(T )
Returns a list of all entities of a certain class which have been associated with this object.
T must inherit from ContainedObject

unAssociated

public bool unAssociated()
A quick way to find out whether there are any associations at all.