|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef TIDA_ASSOCIATOR_H
13 #define TIDA_ASSOCIATOR_H
23 template<
typename T,
typename S=T>
41 virtual void match(
const std::vector<T*>& s1,
42 const std::vector<S*>&
s2 ) = 0;
46 typename map_type::const_iterator titr =
mmatched.find(
t);
47 if ( titr !=
mmatched.end() )
return titr->second;
53 typename rmap_type::const_iterator titr =
mrevmatched.find(
t);
54 if ( titr !=
mrevmatched.end() )
return titr->second;
83 template<
typename T,
typename S>
88 std::cout <<
"TIDA::Associator size() " <<
a.size() << std::endl;
90 while ( mitr!=mend ) {
92 if ( mitr->first )
s << *(mitr->first) <<
"\t";
93 else s <<
"-------\t\t";
95 if ( mitr->second )
s << *(mitr->second);
98 s <<
" ]" << std::endl;
107 #endif // TIDA_ASSOCIATOR_H
const map_type & matched() const
virtual const S * matched(T *t)
std::map< S *, T * > rmap_type
virtual Associator * clone()=0
const rmap_type & revmatched() const
std::map< T *, S * > map_type
virtual const T * revmatched(S *t)
std::ostream & operator<<(std::ostream &s, const TIDA::Associator< T, S > &a)
Associator(const std::string &name)
virtual void match(const std::vector< T * > &s1, const std::vector< S * > &s2)=0