ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | List of all members
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< T *, S * > map_type
 
typedef std::map< S *, T * > rmap_type
 

Public Member Functions

 Associator (const std::string &name)
 
virtual ~Associator ()
 
virtual Associatorclone ()=0
 
virtual void match (const std::vector< T * > &s1, const std::vector< S * > &s2)=0
 
virtual const S * matched (T *t)
 
virtual const T * revmatched (S *t)
 
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 24 of file TIDAAssociator.h.

Member Typedef Documentation

◆ map_type

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

Definition at line 28 of file TIDAAssociator.h.

◆ rmap_type

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

Definition at line 29 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 33 of file TIDAAssociator.h.

34  : mname(name)
35  { }

◆ ~Associator()

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

Definition at line 37 of file TIDAAssociator.h.

37 { }

Member Function Documentation

◆ clear()

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

Definition at line 63 of file TIDAAssociator.h.

63 { mmatched.clear(); mrevmatched.clear(); }

◆ clone()

template<typename T , typename S = T>
virtual Associator* TIDA::Associator< T, S >::clone ( )
pure virtual

◆ 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

Implemented in BestMatcher< TIDA::Vertex >.

◆ matched() [1/2]

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

Definition at line 59 of file TIDAAssociator.h.

59 { return mmatched; }

◆ matched() [2/2]

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

Definition at line 45 of file TIDAAssociator.h.

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

◆ revmatched() [1/2]

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

Definition at line 60 of file TIDAAssociator.h.

60 { return mrevmatched; }

◆ revmatched() [2/2]

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

Definition at line 52 of file TIDAAssociator.h.

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

◆ size()

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

Definition at line 66 of file TIDAAssociator.h.

66 { return mmatched.size(); }

Member Data Documentation

◆ mmatched

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

Definition at line 73 of file TIDAAssociator.h.

◆ mname

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

Definition at line 71 of file TIDAAssociator.h.

◆ mrevmatched

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

Definition at line 74 of file TIDAAssociator.h.


The documentation for this class was generated from the following file:
TIDA::Associator::mmatched
map_type mmatched
Definition: TIDAAssociator.h:73
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TIDA::Associator::mname
std::string mname
Definition: TIDAAssociator.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TIDA::Associator::mrevmatched
rmap_type mrevmatched
Definition: TIDAAssociator.h:74