2 #ifndef EVENT_LCRELATIONNAVIGATORIMPL_H
3 #define EVENT_LCRELATIONNAVIGATORIMPL_H 1
7 #include "EVENT/LCObject.h"
8 #include "EVENT/LCCollection.h"
9 #include "LCIOSTLTypes.h"
25 typedef std::map< EVENT::LCObject* , std::pair< EVENT::LCObjectVec , EVENT::FloatVec > > RelMap ;
49 virtual const std::string &
getToType()
const ;
95 mutable RelMap _rMap ;
The generic object that is held in an LCCollection.
Definition: LCObject.h:30
virtual const EVENT::FloatVec & getRelatedToWeights(EVENT::LCObject *from) const
The weights of the relations returned by a call to getRelatedToObjects(from).
Definition: LCRelationNavigator.cc:61
virtual const EVENT::LCObjectVec & getRelatedFromObjects(EVENT::LCObject *to) const
All from-objects related to the given object ( the inverse relationship).
Definition: LCRelationNavigator.cc:56
std::vector< LCObject * > LCObjectVec
Vector of (pointers to) LCObjects.
Definition: LCObject.h:17
std::vector< float > FloatVec
Vector of floats.
Definition: LCIOSTLTypes.h:18
LCRelationNavigator(const std::string &fromType, const std::string &toType)
Default constructor.
Definition: LCRelationNavigator.h:32
The LCRelationNavigator makes repeated lookup of relations more conveneient and efficient.
Definition: LCRelationNavigator.h:23
virtual void removeRelation(EVENT::LCObject *from, EVENT::LCObject *to)
Remove a given relation.
Definition: LCRelationNavigator.cc:103
virtual const EVENT::LCObjectVec & getRelatedToObjects(EVENT::LCObject *from) const
All objects that the given from-object is related to.
Definition: LCRelationNavigator.cc:50
virtual ~LCRelationNavigator()
Destructor.
Definition: LCRelationNavigator.h:41
virtual EVENT::LCCollection * createLCCollection()
Remove a given relation.
Definition: LCRelationNavigator.cc:142
virtual const std::string & getFromType() const
The type of the 'from' objects in this relation.
Definition: LCRelationNavigator.cc:46
virtual const std::string & getToType() const
The type of the 'to' objects in this relation.
Definition: LCRelationNavigator.cc:47
The generic collection used in LCIO.
Definition: LCCollection.h:29
virtual void addRelation(EVENT::LCObject *from, EVENT::LCObject *to, float weight=1.0)
Adds a relation.
Definition: LCRelationNavigator.cc:71
virtual const EVENT::FloatVec & getRelatedFromWeights(EVENT::LCObject *to) const
The weights of the relations returned by a call to getRelatedFromObjects(to).
Definition: LCRelationNavigator.cc:66