#include <MuonTagToSegMap.h>
|
struct | SegmentLink |
| Helper struct to cache the mapping between the segment in the store gate, that's associated with the TagBase & the one that will be written on disk The index parameters decodes the position of the persistent segment in its correpsonding container. More...
|
|
Definition at line 21 of file MuonTagToSegMap.h.
◆ LinkMap
◆ MuonTagToSegMap()
MuonCombined::MuonTagToSegMap::MuonTagToSegMap |
( |
| ) |
|
|
default |
◆ ~MuonTagToSegMap()
MuonCombined::MuonTagToSegMap::~MuonTagToSegMap |
( |
| ) |
|
|
default |
◆ getPersistifiedSegments()
std::set< const Trk::Segment * > MuonCombined::MuonTagToSegMap::getPersistifiedSegments |
( |
| ) |
const |
Returns the set of all store gate segments that were persitified.
Definition at line 27 of file MuonTagToSegMap.cxx.
28 std::set<const Trk::Segment*>
ret;
29 for (
const SegmentLink& link :
m_map)
ret.insert(link.storegate);
◆ linkIndex()
unsigned int MuonCombined::MuonTagToSegMap::linkIndex |
( |
const Trk::Segment * |
storegate | ) |
const |
Returns the index of the persistent in the output container In case, that the segment has not been persistified yet, -1 is returned.
Definition at line 19 of file MuonTagToSegMap.cxx.
20 LinkMap::const_iterator itr =
21 std::find_if(
m_map.begin(),
m_map.end(), [storegate](
const SegmentLink& link) { return link.storegate == storegate; });
22 if (itr !=
m_map.end())
return itr->index;
◆ persistify()
Pushes back the segment cached in the store gate back to the new segment container meant for write-out, if the segment has not already been added to the container.
Returns the position index of the new segment in the container
Definition at line 9 of file MuonTagToSegMap.cxx.
10 unsigned int curr_size = container->
size();
11 unsigned int test_stored =
linkIndex(assoc_seg);
12 if (test_stored < curr_size)
return test_stored;
13 std::unique_ptr<Muon::MuonSegment>
copy = std::make_unique<Muon::MuonSegment>(*assoc_seg);
14 m_map.emplace_back(assoc_seg,
copy.get(), curr_size);
◆ m_map
LinkMap MuonCombined::MuonTagToSegMap::m_map {} |
|
private |
The documentation for this class was generated from the following files: