LDMX Software
acts_examples::IndexSourceLink Class Referencefinal

A source link that stores just an index_. More...

#include <IndexSourceLink.h>

Public Member Functions

constexpr IndexSourceLink (Acts::GeometryIdentifier gid, Index idx)
 Construct from geometry identifier and index_.
 
 IndexSourceLink ()=default
 satisfy SourceLinkConcept.
 
 IndexSourceLink (const IndexSourceLink &)=default
 
 IndexSourceLink (IndexSourceLink &&)=default
 
IndexSourceLinkoperator= (const IndexSourceLink &)=default
 
IndexSourceLinkoperator= (IndexSourceLink &&)=default
 
constexpr Index index () const
 Access the index_.
 
Acts::GeometryIdentifier geometryId () const
 

Private Attributes

Acts::GeometryIdentifier m_geometry_id_
 
Index m_index_ = 0
 

Friends

bool operator== (const IndexSourceLink &lhs, const IndexSourceLink &rhs)
 
bool operator!= (const IndexSourceLink &lhs, const IndexSourceLink &rhs)
 

Detailed Description

A source link that stores just an index_.

This is intentionally kept as barebones as possible. The source link is just a reference and will be copied, moved around, etc. often. Keeping it small and separate from the actual, potentially large, measurement data should result in better overall performance. Using an index instead of e.g. a pointer, means source link and measurement are decoupled and the measurement represenation can be easily changed without having to also change the source link.

Definition at line 29 of file IndexSourceLink.h.

Constructor & Destructor Documentation

◆ IndexSourceLink()

acts_examples::IndexSourceLink::IndexSourceLink ( Acts::GeometryIdentifier gid,
Index idx )
inlineconstexpr

Construct from geometry identifier and index_.

Definition at line 32 of file IndexSourceLink.h.

33 : m_geometry_id_(gid), m_index_(idx) {}

Member Function Documentation

◆ geometryId()

Acts::GeometryIdentifier acts_examples::IndexSourceLink::geometryId ( ) const
inline

Definition at line 46 of file IndexSourceLink.h.

46{ return m_geometry_id_; }

◆ index()

Index acts_examples::IndexSourceLink::index ( ) const
inlineconstexpr

Access the index_.

Definition at line 44 of file IndexSourceLink.h.

44{ return m_index_; }

Referenced by tracking::reco::CKFProcessor::produce().

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const IndexSourceLink & lhs,
const IndexSourceLink & rhs )
friend

Definition at line 57 of file IndexSourceLink.h.

58 {
59 return not(lhs == rhs);
60 }

◆ operator==

bool operator== ( const IndexSourceLink & lhs,
const IndexSourceLink & rhs )
friend

Definition at line 52 of file IndexSourceLink.h.

53 {
54 return (lhs.geometryId() == rhs.geometryId()) and
55 (lhs.m_index_ == rhs.m_index_);
56 }

Member Data Documentation

◆ m_geometry_id_

Acts::GeometryIdentifier acts_examples::IndexSourceLink::m_geometry_id_
private

Definition at line 49 of file IndexSourceLink.h.

◆ m_index_

Index acts_examples::IndexSourceLink::m_index_ = 0
private

Definition at line 50 of file IndexSourceLink.h.


The documentation for this class was generated from the following file: