LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
LCRelationImpl.h
1 // -*- C++ -*-
2 #ifndef EVENT_LCWGTRELATIONIMPL_H
3 #define EVENT_LCWGTRELATIONIMPL_H 1
4 
5 #include <vector>
6 #include <map>
7 
8 #include "EVENT/LCRelation.h"
9 #include "EVENT/LCObject.h"
10 #include "AccessChecked.h"
11 
12 
13 
14 namespace IMPL {
15 
22 
23  public:
24 
25  LCRelationImpl() : _from(0) , _to(0) , _weight(1.0f) { }
26  LCRelationImpl( EVENT::LCObject* from, EVENT::LCObject* to , float weight=1.0f ) : _from(from),
27  _to(to),
28  _weight(weight) {}
29  ~LCRelationImpl(){}
30 
31  int id() const { return simpleUID() ; }
32 
33  EVENT::LCObject * getFrom() const { return _from ; }
34  EVENT::LCObject * getTo() const { return _to ; }
35  float getWeight() const { return _weight ; }
36 
37  void setFrom( EVENT::LCObject* from ) { _from = from ; }
38  void setTo( EVENT::LCObject* to ) { _to = to ; }
39  void setWeight( float weight ) { _weight = weight ; }
40 
41 
42  protected:
43  EVENT::LCObject* _from ;
44  EVENT::LCObject* _to ;
45  float _weight ;
46 
47 }; // class
48 } // namespace IMPL
49 #endif /* ifndef EVENT_LCRELATIONIMPL_H */
The generic object that is held in an LCCollection.
Definition: LCObject.h:30
Implementation of the LCRelation.
Definition: LCRelationImpl.h:21
EVENT::LCObject * getTo() const
The 'to' object of the given relation.
Definition: LCRelationImpl.h:34
EVENT::LCObject * getFrom() const
The 'from' object of the given relation.
Definition: LCRelationImpl.h:33
float getWeight() const
The weight of the given relation - only if collection flag bit LCIO::LCREL_WEIGHTED is set...
Definition: LCRelationImpl.h:35
int id() const
Returns an object id for internal (debugging) use in LCIO.
Definition: LCRelationImpl.h:31
A single weighted relationship between two LCObjects.
Definition: LCRelation.h:29
Controls access to objects.
Definition: AccessChecked.h:17