File indexing completed on 2025-08-06 08:18:11
0001
0002
0003
0004
0005
0006
0007
0008 #include "TrkrClusterHitAssocv1.h"
0009
0010 #include <ostream> // for operator<<, endl, basic_ostream, ostream, basic_o...
0011
0012 void TrkrClusterHitAssocv1::Reset()
0013 {
0014 m_map.clear();
0015 }
0016
0017 void TrkrClusterHitAssocv1::identify(std::ostream& os) const
0018 {
0019 os << "-----TrkrClusterHitAssocv1-----" << std::endl;
0020 os << "Number of associations: " << m_map.size() << std::endl;
0021
0022 for (auto& entry : m_map)
0023 {
0024
0025 os << " cluster key: " << entry.first << std::dec
0026 << " hit key: " << entry.second << std::endl;
0027 }
0028
0029 os << "------------------------------" << std::endl;
0030
0031 return;
0032 }
0033
0034 void TrkrClusterHitAssocv1::addAssoc(TrkrDefs::cluskey ckey, unsigned int hidx)
0035 {
0036 m_map.insert(std::make_pair(ckey, hidx));
0037 }
0038
0039 TrkrClusterHitAssocv1::ConstRange
0040 TrkrClusterHitAssocv1::getHits(TrkrDefs::cluskey ckey)
0041 {
0042 return std::make_pair(m_map.lower_bound(ckey), m_map.upper_bound(ckey));
0043 }