#include <Relation.h>
Inheritance diagram for Event::Relation< T1, T2 >:
Public Member Functions | |
virtual const CLID & | clID () const |
Relation (T1 *obj1, T2 *obj2) | |
Relation (T1 *obj1, T2 *obj2, std::string info) | |
Relation (T1 *obj1, T2 *obj2, std::vector< std::string > infos) | |
const T1 * | getFirst () const |
T1 * | getFirst () |
const T2 * | getSecond () const |
T2 * | getSecond () |
void | addInfo (std::string inf) |
Add additional information (as a string) to the relation. | |
std::vector< std::string > | getInfos () const |
std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
Static Public Member Functions | |
static const CLID & | classID () |
Private Member Functions | |
void | setFirst (T1 *obj) |
void | setSecond (T2 *obj) |
Private Attributes | |
RelKey< T1, T1, T2 > | m_first |
Key associated to the first object to be related. | |
RelKey< T2, T1, T2 > | m_second |
Key associated to the second object to be related. | |
std::vector< std::string > | m_infos |
Additional information associated to the relation. | |
Friends | |
class | RelTable< T1, T2 > |
Definition at line 35 of file Relation.h.
Event::Relation< T1, T2 >::Relation | ( | T1 * | obj1, | |
T2 * | obj2 | |||
) | [inline] |
Relation::Relation | ( | T1 * | obj1, | |
T2 * | obj2, | |||
std::string | info | |||
) | [inline] |
Relation::Relation | ( | T1 * | obj1, | |
T2 * | obj2, | |||
std::vector< std::string > | infos | |||
) | [inline] |
void Relation::addInfo | ( | std::string | inf | ) |
Add additional information (as a string) to the relation.
Definition at line 90 of file Relation.h.
References Event::Relation< T1, T2 >::m_infos.
00090 { 00091 // Purpose and Method: This routine add additional information to the relation. 00092 // Inputs: inf is the information to be added. 00093 00094 m_infos.push_back(inf); 00095 00096 }
static const CLID& Event::Relation< T1, T2 >::classID | ( | ) | [inline, static] |
Reimplemented in RecMdcHitOnTrack.
Definition at line 40 of file Relation.h.
Referenced by Event::Relation< RecMdcHit, RecMdcTrack >::clID().
00040 { return CLID_Relation; }
virtual const CLID& Event::Relation< T1, T2 >::clID | ( | ) | const [inline, virtual] |
Reimplemented in RecMdcHitOnTrack.
Definition at line 39 of file Relation.h.
00039 { return Relation::classID(); }
std::ostream & Relation::fillStream | ( | std::ostream & | s | ) | const [inline] |
Fill the ASCII output stream.
Definition at line 109 of file Relation.h.
References genRecEmupikp::i, Event::Relation< T1, T2 >::m_first, Event::Relation< T1, T2 >::m_infos, Event::Relation< T1, T2 >::m_second, and Event::RelKey< T1, T2, T3 >::toStream().
Referenced by main().
00109 { 00110 // Fill the ASCII output stream 00111 s << " Base class Relation" 00112 << "\n First Column: "; 00113 m_first.toStream(s); 00114 s << "\n Second Column: "; 00115 m_second.toStream(s); 00116 s << "\n Additional Information: "; 00117 00118 std::vector<std::string>::const_iterator i; 00119 for(i = m_infos.begin(); i != m_infos.end(); i++) 00120 { 00121 s << "\n " << *i; 00122 } 00123 return s; 00124 }
T1* Event::Relation< T1, T2 >::getFirst | ( | ) | [inline] |
const T1* Event::Relation< T1, T2 >::getFirst | ( | ) | const [inline] |
Definition at line 47 of file Relation.h.
Referenced by Event::RelTable< T1, T2 >::bindRelationFirst(), Event::RelTable< T1, T2 >::bindRelationNoDup(), and main().
00047 {return m_first.getData();}
std::vector< std::string > Relation::getInfos | ( | ) | const |
Definition at line 99 of file Relation.h.
References Event::Relation< T1, T2 >::m_infos.
00099 { 00100 // Purpose and Method: This routine get the additional information 00101 // associated to the relation. 00102 // Outputs: a vector of strings 00103 00104 return m_infos; 00105 }
T2* Event::Relation< T1, T2 >::getSecond | ( | ) | [inline] |
const T2* Event::Relation< T1, T2 >::getSecond | ( | ) | const [inline] |
Definition at line 50 of file Relation.h.
Referenced by Event::RelTable< T1, T2 >::bindRelationSecond(), Event::RelTable< T1, T2 >::findDup(), and main().
00050 {return m_second.getData();}
void Event::Relation< T1, T2 >::setFirst | ( | T1 * | obj | ) | [inline, private] |
Definition at line 71 of file Relation.h.
Referenced by Event::RelTable< T1, T2 >::changeFirst().
00071 {m_first.setData(obj);}
void Event::Relation< T1, T2 >::setSecond | ( | T2 * | obj | ) | [inline, private] |
Definition at line 72 of file Relation.h.
Referenced by Event::RelTable< T1, T2 >::changeSecond().
00072 {m_second.setData(obj);}
friend class RelTable< T1, T2 > [friend] |
Definition at line 60 of file Relation.h.
RelKey<T1,T1,T2> Event::Relation< T1, T2 >::m_first [private] |
Key associated to the first object to be related.
Definition at line 65 of file Relation.h.
Referenced by Event::RelTable< T1, T2 >::bindRelationFirst(), Event::RelTable< T1, T2 >::bindRelationNoDup(), Event::Relation< T1, T2 >::fillStream(), Event::RelTable< T1, T2 >::findDup(), Event::Relation< RecMdcHit, RecMdcTrack >::getFirst(), Event::RelTable< T1, T2 >::removeFirst(), and Event::Relation< RecMdcHit, RecMdcTrack >::setFirst().
std::vector<std::string> Event::Relation< T1, T2 >::m_infos [private] |
Additional information associated to the relation.
Definition at line 69 of file Relation.h.
Referenced by Event::Relation< T1, T2 >::addInfo(), Event::RelTable< T1, T2 >::bindRelationNoDup(), Event::Relation< T1, T2 >::fillStream(), and Event::Relation< T1, T2 >::getInfos().
RelKey<T2,T1,T2> Event::Relation< T1, T2 >::m_second [private] |
Key associated to the second object to be related.
Definition at line 67 of file Relation.h.
Referenced by Event::RelTable< T1, T2 >::bindRelationSecond(), Event::Relation< T1, T2 >::fillStream(), Event::Relation< RecMdcHit, RecMdcTrack >::getSecond(), Event::RelTable< T1, T2 >::removeSecond(), and Event::Relation< RecMdcHit, RecMdcTrack >::setSecond().