BOSS 7.0.5
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.
 
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 ()
 
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 Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

Constructor & Destructor Documentation

◆ Relation() [1/6]

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

Definition at line 43 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

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

◆ Relation() [2/6]

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

Definition at line 79 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

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

◆ Relation() [3/6]

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

Definition at line 84 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

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

◆ Relation() [4/6]

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

Definition at line 43 of file InstallArea/include/RelTable/RelTable/Relation.h.

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

◆ Relation() [5/6]

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

◆ Relation() [6/6]

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

Member Function Documentation

◆ addInfo() [1/2]

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 Event/RelTable/RelTable-00-00-02/RelTable/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}

◆ addInfo() [2/2]

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

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

◆ classID() [1/2]

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

Definition at line 40 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

40{ return CLID_Relation; }

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

◆ classID() [2/2]

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

Definition at line 40 of file InstallArea/include/RelTable/RelTable/Relation.h.

40{ return CLID_Relation; }

◆ clID() [1/2]

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

◆ clID() [2/2]

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

Reimplemented in RecMdcHitOnTrack, and RecMdcHitOnTrack.

Definition at line 39 of file InstallArea/include/RelTable/RelTable/Relation.h.

39{ return Relation::classID(); }

◆ fillStream() [1/2]

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 Event/RelTable/RelTable-00-00-02/RelTable/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.

Referenced by main().

◆ fillStream() [2/2]

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

Fill the ASCII output stream.

◆ getFirst() [1/4]

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

Definition at line 48 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

48{ return m_first.getData();}

◆ getFirst() [2/4]

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

Definition at line 48 of file InstallArea/include/RelTable/RelTable/Relation.h.

48{ return m_first.getData();}

◆ getFirst() [3/4]

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

Definition at line 47 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

47{return m_first.getData();}

◆ getFirst() [4/4]

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

Definition at line 47 of file InstallArea/include/RelTable/RelTable/Relation.h.

47{return m_first.getData();}

◆ getInfos() [1/2]

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

Definition at line 99 of file Event/RelTable/RelTable-00-00-02/RelTable/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}

◆ getInfos() [2/2]

template<class T1 , class T2 >
std::vector< std::string > Event::Relation< T1, T2 >::getInfos ( ) const

◆ getSecond() [1/4]

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

Definition at line 51 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

51{ return m_second.getData();}

◆ getSecond() [2/4]

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

Definition at line 51 of file InstallArea/include/RelTable/RelTable/Relation.h.

51{ return m_second.getData();}

◆ getSecond() [3/4]

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

Definition at line 50 of file Event/RelTable/RelTable-00-00-02/RelTable/Relation.h.

50{return m_second.getData();}

◆ getSecond() [4/4]

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

Definition at line 50 of file InstallArea/include/RelTable/RelTable/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

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