BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
Event::Relation< T1, T2 > Class Template Reference

#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 ()
 

Friends

class RelTable< T1, T2 >
 

Detailed Description

template<class T1, class T2>
class Event::Relation< T1, T2 >

Definition at line 35 of file Relation.h.

Constructor & Destructor Documentation

◆ Relation() [1/3]

template<class T1 , class T2 >
Event::Relation< T1, T2 >::Relation ( T1 *  obj1,
T2 *  obj2 
)
inline

Definition at line 43 of file Relation.h.

43: m_first(obj1), m_second(obj2) {}

◆ Relation() [2/3]

template<class T1 , class T2 >
Relation::Relation ( T1 *  obj1,
T2 *  obj2,
std::string  info 
)
inline

Definition at line 79 of file Relation.h.

79 :
80 m_first(obj1), m_second(obj2), m_infos(1,info) {}

◆ Relation() [3/3]

template<class T1 , class T2 >
Relation::Relation ( T1 *  obj1,
T2 *  obj2,
std::vector< std::string >  infos 
)
inline

Definition at line 84 of file Relation.h.

84 :
85 m_first(obj1), m_second(obj2), m_infos(infos) {}

Member Function Documentation

◆ addInfo()

template<class T1 , class T2 >
void Relation::addInfo ( std::string  inf)

Add additional information (as a string) to the relation.

Definition at line 90 of file Relation.h.

90 {
91 // Purpose and Method: This routine add additional information to the relation.
92 // Inputs: inf is the information to be added.
93
94 m_infos.push_back(inf);
95
96}

◆ classID()

template<class T1 , class T2 >
static const CLID & Event::Relation< T1, T2 >::classID ( )
inlinestatic

Definition at line 40 of file Relation.h.

40{ return CLID_Relation; }

Referenced by Event::Relation< T1, T2 >::clID().

◆ clID()

template<class T1 , class T2 >
virtual const CLID & Event::Relation< T1, T2 >::clID ( ) const
inlinevirtual

Reimplemented in RecMdcHitOnTrack.

Definition at line 39 of file Relation.h.

39{ return Relation::classID(); }
static const CLID & classID()
Definition: Relation.h:40

◆ fillStream()

template<class T1 , class T2 >
std::ostream & Relation::fillStream ( std::ostream &  s) const
inline

Fill the ASCII output stream.

Definition at line 109 of file Relation.h.

109 {
110 // Fill the ASCII output stream
111 s << " Base class Relation"
112 << "\n First Column: ";
113 m_first.toStream(s);
114 s << "\n Second Column: ";
115 m_second.toStream(s);
116 s << "\n Additional Information: ";
117
118 std::vector<std::string>::const_iterator i;
119 for(i = m_infos.begin(); i != m_infos.end(); i++)
120 {
121 s << "\n " << *i;
122 }
123 return s;
124}
XmlRpcServer s
Definition: HelloServer.cpp:11
void toStream(std::ostream &s) const
Fill the ASCII output stream.
Definition: RelKey.h:71

Referenced by main().

◆ getFirst() [1/2]

template<class T1 , class T2 >
T1 * Event::Relation< T1, T2 >::getFirst ( )
inline

Definition at line 48 of file Relation.h.

48{ return m_first.getData();}
const T1 * getData() const
Definition: RelKey.h:41

◆ getFirst() [2/2]

template<class T1 , class T2 >
const T1 * Event::Relation< T1, T2 >::getFirst ( ) const
inline

Definition at line 47 of file Relation.h.

47{return m_first.getData();}

◆ getInfos()

template<class T1 , class T2 >
std::vector< std::string > Relation::getInfos

Definition at line 99 of file Relation.h.

99 {
100 // Purpose and Method: This routine get the additional information
101 // associated to the relation.
102 // Outputs: a vector of strings
103
104 return m_infos;
105}

◆ getSecond() [1/2]

template<class T1 , class T2 >
T2 * Event::Relation< T1, T2 >::getSecond ( )
inline

Definition at line 51 of file Relation.h.

51{ return m_second.getData();}

◆ getSecond() [2/2]

template<class T1 , class T2 >
const T2 * Event::Relation< T1, T2 >::getSecond ( ) const
inline

Definition at line 50 of file Relation.h.

50{return m_second.getData();}

Friends And Related Function Documentation

◆ RelTable< T1, T2 >

template<class T1 , class T2 >
friend class RelTable< T1, T2 >
friend

Definition at line 58 of file Relation.h.


The documentation for this class was generated from the following file: