ATLAS Offline Software
MuonTagToSegMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCOMBINEDEVENT_MUONTAGTOSEGMAP_H
6 #define MUONCOMBINEDEVENT_MUONTAGTOSEGMAP_H
7 
11 
12 #include <set>
13 
20 namespace MuonCombined {
22  public:
23  MuonTagToSegMap() = default;
24  ~MuonTagToSegMap() = default;
25 
29  unsigned int persistify(const Muon::MuonSegment* assoc_seg, Trk::SegmentCollection* container);
30 
32  std::set<const Trk::Segment*> getPersistifiedSegments() const;
33 
36  unsigned int linkIndex(const Trk::Segment* storegate) const;
37 
38  private:
43  struct SegmentLink {
44  SegmentLink() = default;
45  SegmentLink(const Muon::MuonSegment* _gate, const Muon::MuonSegment* _pers, unsigned int idx) :
46  storegate{_gate}, persistent{_pers}, index{idx} {}
47 
48  const Trk::Segment* storegate{nullptr};
49  const Trk::Segment* persistent{nullptr};
50  unsigned int index{0};
51  };
52 
53  using LinkMap = std::vector<SegmentLink>;
55  };
56 
57 } // namespace MuonCombined
59 
60 #endif
MuonCombined::MuonTagToSegMap::linkIndex
unsigned int linkIndex(const Trk::Segment *storegate) const
Returns the index of the persistent in the output container In case, that the segment has not been pe...
Definition: MuonTagToSegMap.cxx:19
index
Definition: index.py:1
MuonCombined::MuonTagToSegMap::LinkMap
std::vector< SegmentLink > LinkMap
Definition: MuonTagToSegMap.h:53
Trk::Segment
Definition: TrkEvent/TrkSegment/TrkSegment/Segment.h:56
DataVector< Trk::Segment >
MuonCombined::MuonTagToSegMap::getPersistifiedSegments
std::set< const Trk::Segment * > getPersistifiedSegments() const
Returns the set of all store gate segments that were persitified.
Definition: MuonTagToSegMap.cxx:27
MuonCombined::MuonTagToSegMap::persistify
unsigned int persistify(const Muon::MuonSegment *assoc_seg, Trk::SegmentCollection *container)
Pushes back the segment cached in the store gate back to the new segment container meant for write-ou...
Definition: MuonTagToSegMap.cxx:9
MuonCombined::MuonTagToSegMap::~MuonTagToSegMap
~MuonTagToSegMap()=default
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
MuonCombined::MuonTagToSegMap::m_map
LinkMap m_map
Definition: MuonTagToSegMap.h:54
MuonCombined::MuonTagToSegMap::MuonTagToSegMap
MuonTagToSegMap()=default
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
MuonCombined::MuonTagToSegMap
Definition: MuonTagToSegMap.h:21
MuonSegment.h
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
CLASS_DEF.h
macros to associate a CLID to a type
SegmentCollection.h