ATLAS Offline Software
Loading...
Searching...
No Matches
TIDA::Associator< T, S > Class Template Referenceabstract

#include <TIDAAssociator.h>

Inheritance diagram for TIDA::Associator< T, S >:
Collaboration diagram for TIDA::Associator< T, S >:

Public Types

typedef std::map< const T *, const S * > map_type
typedef std::map< const S *, const T * > rmap_type

Public Member Functions

 Associator (const std::string &name)
virtual ~Associator ()
virtual Associatorclone ()=0
virtual std::unique_ptr< Associatoruclone () const =0
virtual void match (const std::vector< T * > &s1, const std::vector< S * > &s2)=0
virtual const S * matched (T *t) const
virtual const T * revmatched (S *t) const
const map_typematched () const
const rmap_typerevmatched () const
void clear ()
unsigned size () const

Protected Attributes

std::string mname
map_type mmatched
rmap_type mrevmatched

Detailed Description

template<typename T, typename S = T>
class TIDA::Associator< T, S >

Definition at line 25 of file TIDAAssociator.h.

Member Typedef Documentation

◆ map_type

template<typename T, typename S = T>
typedef std::map<const T*, const S*> TIDA::Associator< T, S >::map_type

Definition at line 29 of file TIDAAssociator.h.

◆ rmap_type

template<typename T, typename S = T>
typedef std::map<const S*, const T*> TIDA::Associator< T, S >::rmap_type

Definition at line 30 of file TIDAAssociator.h.

Constructor & Destructor Documentation

◆ Associator()

template<typename T, typename S = T>
TIDA::Associator< T, S >::Associator ( const std::string & name)
inline

Definition at line 34 of file TIDAAssociator.h.

◆ ~Associator()

template<typename T, typename S = T>
virtual TIDA::Associator< T, S >::~Associator ( )
inlinevirtual

Definition at line 38 of file TIDAAssociator.h.

38{ }

Member Function Documentation

◆ clear()

template<typename T, typename S = T>
void TIDA::Associator< T, S >::clear ( )
inline

Definition at line 66 of file TIDAAssociator.h.

66{ mmatched.clear(); mrevmatched.clear(); }
rmap_type mrevmatched

◆ clone()

◆ match()

template<typename T, typename S = T>
virtual void TIDA::Associator< T, S >::match ( const std::vector< T * > & s1,
const std::vector< S * > & s2 )
pure virtual

◆ matched() [1/2]

template<typename T, typename S = T>
const map_type & TIDA::Associator< T, S >::matched ( ) const
inline

Definition at line 62 of file TIDAAssociator.h.

62{ return mmatched; }

◆ matched() [2/2]

template<typename T, typename S = T>
virtual const S * TIDA::Associator< T, S >::matched ( T * t) const
inlinevirtual

Definition at line 48 of file TIDAAssociator.h.

48 {
49 typename map_type::const_iterator titr = mmatched.find(t);
50 if ( titr != mmatched.end() ) return titr->second;
51 else return 0;
52 }

◆ revmatched() [1/2]

template<typename T, typename S = T>
const rmap_type & TIDA::Associator< T, S >::revmatched ( ) const
inline

Definition at line 63 of file TIDAAssociator.h.

63{ return mrevmatched; }

◆ revmatched() [2/2]

template<typename T, typename S = T>
virtual const T * TIDA::Associator< T, S >::revmatched ( S * t) const
inlinevirtual

Definition at line 55 of file TIDAAssociator.h.

55 {
56 typename rmap_type::const_iterator titr = mrevmatched.find(t);
57 if ( titr != mrevmatched.end() ) return titr->second;
58 else return 0;
59 }

◆ size()

template<typename T, typename S = T>
unsigned TIDA::Associator< T, S >::size ( ) const
inline

Definition at line 69 of file TIDAAssociator.h.

69{ return mmatched.size(); }

◆ uclone()

Member Data Documentation

◆ mmatched

template<typename T, typename S = T>
map_type TIDA::Associator< T, S >::mmatched
protected

Definition at line 76 of file TIDAAssociator.h.

◆ mname

template<typename T, typename S = T>
std::string TIDA::Associator< T, S >::mname
protected

Definition at line 74 of file TIDAAssociator.h.

◆ mrevmatched

template<typename T, typename S = T>
rmap_type TIDA::Associator< T, S >::mrevmatched
protected

Definition at line 77 of file TIDAAssociator.h.


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