00001 // -*- C++ -*- 00002 #ifndef EVENT_LCWGTRELATIONIMPL_H 00003 #define EVENT_LCWGTRELATIONIMPL_H 1 00004 00005 #include <vector> 00006 #include <map> 00007 00008 #include "EVENT/LCRelation.h" 00009 #include "EVENT/LCObject.h" 00010 #include "AccessChecked.h" 00011 00012 00013 00014 namespace IMPL { 00015 00021 class LCRelationImpl : public EVENT::LCRelation, public AccessChecked { 00022 00023 public: 00024 00025 LCRelationImpl() : _from(0) , _to(0) , _weight(1.0f) { } 00026 LCRelationImpl( EVENT::LCObject* from, EVENT::LCObject* to , float weight=1.0f ) : _from(from), 00027 _to(to), 00028 _weight(weight) {} 00030 LCRelationImpl(const LCRelationImpl&) = default ; 00031 00033 LCRelationImpl& operator=(const LCRelationImpl&) = default ; 00034 00035 ~LCRelationImpl(){} 00036 00037 int id() const { return simpleUID() ; } 00038 00039 EVENT::LCObject * getFrom() const { return _from ; } 00040 EVENT::LCObject * getTo() const { return _to ; } 00041 float getWeight() const { return _weight ; } 00042 00043 void setFrom( EVENT::LCObject* from ) { _from = from ; } 00044 void setTo( EVENT::LCObject* to ) { _to = to ; } 00045 void setWeight( float weight ) { _weight = weight ; } 00046 00047 00048 protected: 00049 EVENT::LCObject* _from ; 00050 EVENT::LCObject* _to ; 00051 float _weight ; 00052 00053 }; // class 00054 } // namespace IMPL 00055 #endif /* ifndef EVENT_LCRELATIONIMPL_H */