ATLAS Offline Software
InverseMultiMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #ifndef INVERSEMULTIMAP_H
12 #define INVERSEMULTIMAP_H
13 
14 #include <map>
16 
17 namespace Trk {
40 template <class OrigMap, class CmpT = std::less<typename OrigMap::mapped_type>>
42  : public std::multimap<
43  typename OrigMap::mapped_type, typename OrigMap::key_type, CmpT,
44  SG::ArenaPoolSTLAllocator<
45  std::pair<const typename OrigMap::mapped_type, typename OrigMap::key_type>>> {};
46 
47 //----------------------------------------------------------------
48 // And this is the code to fill an inverse map with data
49 template <class OrigMap, class CmpT>
51  const OrigMap& rec2truth) {
52  for (const auto& p : rec2truth) {
53  result->insert(std::make_pair(p.second, p.first));
54  }
55 }
56 } // namespace Trk
57 
58 #endif /*INVERSEMULTIMAP_H*/
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::addToInverseMultiMap
void addToInverseMultiMap(InverseMultiMap< OrigMap, CmpT > *result, const OrigMap &rec2truth)
Definition: InverseMultiMap.h:50
ArenaPoolSTLAllocator.h
STL-style allocator wrapper for ArenaPoolAllocator.
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::InverseMultiMap
Definition: InverseMultiMap.h:45