LDMX Software
Public Member Functions | Private Attributes | Friends | List of all members
ActsExamples::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_geometryId
 
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()

constexpr ActsExamples::IndexSourceLink::IndexSourceLink ( Acts::GeometryIdentifier  gid,
Index  idx 
)
inlineconstexpr

Construct from geometry identifier and index.

Definition at line 32 of file IndexSourceLink.h.

33 : m_geometryId(gid), m_index(idx) {}

Member Function Documentation

◆ geometryId()

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

Definition at line 46 of file IndexSourceLink.h.

46{ return m_geometryId; }

◆ index()

constexpr Index ActsExamples::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_geometryId

Acts::GeometryIdentifier ActsExamples::IndexSourceLink::m_geometryId
private

Definition at line 49 of file IndexSourceLink.h.

◆ m_index

Index ActsExamples::IndexSourceLink::m_index = 0
private

Definition at line 50 of file IndexSourceLink.h.


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