2 #ifndef EVENT_LCRELATIONNAVIGATORIMPL_H
3 #define EVENT_LCRELATIONNAVIGATORIMPL_H 1
The generic object that is held in an LCCollection.
virtual const EVENT::FloatVec & getRelatedToWeights(EVENT::LCObject *from) const
The weights of the relations returned by a call to getRelatedToObjects(from).
virtual const EVENT::LCObjectVec & getRelatedFromObjects(EVENT::LCObject *to) const
All from-objects related to the given object ( the inverse relationship).
LCRelationNavigator(const std::string &fromType, const std::string &toType)
Default constructor.
The LCRelationNavigator makes repeated lookup of relations more conveneient and efficient.
virtual void removeRelation(EVENT::LCObject *from, EVENT::LCObject *to)
Remove a given relation.
virtual const EVENT::LCObjectVec & getRelatedToObjects(EVENT::LCObject *from) const
All objects that the given from-object is related to.
virtual ~LCRelationNavigator()
Destructor.
virtual EVENT::LCCollection * createLCCollection()
Remove a given relation.
virtual const std::string & getFromType() const
The type of the 'from' objects in this relation.
virtual const std::string & getToType() const
The type of the 'to' objects in this relation.
virtual void initialize(const EVENT::LCCollection *col)
The generic collection used in LCIO.
virtual void addRelation(EVENT::LCObject *from, EVENT::LCObject *to, float weight=1.0)
Adds a relation.
std::map< EVENT::LCObject *, std::pair< EVENT::LCObjectVec, EVENT::FloatVec > > RelMap
virtual const EVENT::FloatVec & getRelatedFromWeights(EVENT::LCObject *to) const
The weights of the relations returned by a call to getRelatedFromObjects(to).