ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SpacePointColumnProxy< T, read_only > Class Template Reference

Additional column of data that can be added to the space point container. More...

#include <Acts/EventData/SpacePointColumnProxy2.hpp>

Inheritance diagram for Acts::SpacePointColumnProxy< T, read_only >:
[legend]

Classes

class  Subset

Public Types

using Column = const_if_t<ReadOnly, std::vector<Value>>
 Type alias for column container type (const if read-only).
using Container = const_if_t<ReadOnly, SpacePointContainer2>
 Type alias for container type (const if read-only).
using Index = SpacePointIndex2
 Type alias for space point index type.
using IndexRange = SpacePointIndexRange2
 Type alias for space point index range type.
using IndexSubset = SpacePointIndexSubset2
 Type alias for space point index subset type.
using Value = T
 Type alias for column value type.

Public Member Functions

 SpacePointColumnProxy (const SpacePointColumnProxy &other) noexcept=default
 Copy construct a space point column proxy.
 SpacePointColumnProxy (const SpacePointColumnProxy< T, false > &other) noexcept
 Copy construct a mutable space point column proxy.
 SpacePointColumnProxy (Container &container, Column &column)
 Constructs a space point column proxy for the given container and column.
SpacePointColumnProxy< T, true > asConst () const noexcept
 Returns a const proxy of the space point column.
Valueat (Index index)
 Returns a mutable reference to the column entry at the given index.
const Valueat (Index index) const
 Returns a const reference to the column entry at the given index.
const std::vector< Value > & column () const noexcept
 Returns a const reference to the column container.
const SpacePointContainer2container () const noexcept
 Gets the container holding the space point.
SpacePointContainer2container () noexcept
 Gets the container holding the space point.
std::span< const Valuedata () const noexcept
 Returns a const span to the column data.
std::span< Valuedata () noexcept
 Returns a mutable span to the column data.
const Valueoperator[] (Index index) const noexcept
 Returns a const reference to the column entry at the given index.
Valueoperator[] (Index index) noexcept
 Returns a mutable reference to the column entry at the given index.
Subset subset (const IndexSubset &subset) const noexcept
 Creates a subset view of this space point column based on provided indices.

Static Public Attributes

static constexpr bool ReadOnly = read_only
 Flag indicating whether this space point column proxy is read-only.

Detailed Description

template<typename T, bool read_only>
class Acts::SpacePointColumnProxy< T, read_only >

Additional column of data that can be added to the space point container.

The column is indexed by the space point index.

Member Typedef Documentation

◆ Column

template<typename T, bool read_only>
using Acts::SpacePointColumnProxy< T, read_only >::Column = const_if_t<ReadOnly, std::vector<Value>>

Type alias for column container type (const if read-only).

◆ Container

template<typename T, bool read_only>
using Acts::SpacePointColumnProxy< T, read_only >::Container = const_if_t<ReadOnly, SpacePointContainer2>

Type alias for container type (const if read-only).

◆ Index

template<typename T, bool read_only>
using Acts::SpacePointColumnProxy< T, read_only >::Index = SpacePointIndex2

Type alias for space point index type.

◆ IndexRange

template<typename T, bool read_only>
using Acts::SpacePointColumnProxy< T, read_only >::IndexRange = SpacePointIndexRange2

Type alias for space point index range type.

◆ IndexSubset

template<typename T, bool read_only>
using Acts::SpacePointColumnProxy< T, read_only >::IndexSubset = SpacePointIndexSubset2

Type alias for space point index subset type.

◆ Value

template<typename T, bool read_only>
using Acts::SpacePointColumnProxy< T, read_only >::Value = T

Type alias for column value type.

Constructor & Destructor Documentation

◆ SpacePointColumnProxy() [1/3]

template<typename T, bool read_only>
Acts::SpacePointColumnProxy< T, read_only >::SpacePointColumnProxy ( Container & container,
Column & column )

Constructs a space point column proxy for the given container and column.

Parameters
containerThe container holding the space point.
columnThe column of data to access.

◆ SpacePointColumnProxy() [2/3]

template<typename T, bool read_only>
Acts::SpacePointColumnProxy< T, read_only >::SpacePointColumnProxy ( const SpacePointColumnProxy< T, read_only > & other)
defaultnoexcept

Copy construct a space point column proxy.

Parameters
otherThe space point column proxy to copy.

◆ SpacePointColumnProxy() [3/3]

template<typename T, bool read_only>
Acts::SpacePointColumnProxy< T, read_only >::SpacePointColumnProxy ( const SpacePointColumnProxy< T, false > & other)
explicitnoexcept

Copy construct a mutable space point column proxy.

Parameters
otherThe mutable space point column proxy to copy.

Member Function Documentation

◆ asConst()

template<typename T, bool read_only>
SpacePointColumnProxy< T, true > Acts::SpacePointColumnProxy< T, read_only >::asConst ( ) const
noexcept

Returns a const proxy of the space point column.

Returns
A const proxy of the space point column.

◆ at() [1/2]

template<typename T, bool read_only>
Value & Acts::SpacePointColumnProxy< T, read_only >::at ( Index index)

Returns a mutable reference to the column entry at the given index.

If the index is out of range, an exception is thrown.

Parameters
indexThe index of the space point to access.
Returns
A mutable reference to the column entry at the given index.
Exceptions
std::out_of_rangeif the index is out of range.

◆ at() [2/2]

template<typename T, bool read_only>
const Value & Acts::SpacePointColumnProxy< T, read_only >::at ( Index index) const

Returns a const reference to the column entry at the given index.

If the index is out of range, an exception is thrown.

Parameters
indexThe index of the space point to access.
Returns
A const reference to the column entry at the given index.
Exceptions
std::out_of_rangeif the index is out of range.

◆ column()

template<typename T, bool read_only>
const std::vector< Value > & Acts::SpacePointColumnProxy< T, read_only >::column ( ) const
noexcept

Returns a const reference to the column container.

Returns
A const reference to the column container.

◆ container() [1/2]

template<typename T, bool read_only>
const SpacePointContainer2 & Acts::SpacePointColumnProxy< T, read_only >::container ( ) const
noexcept

Gets the container holding the space point.

Returns
A const reference to the container holding the space point.

◆ container() [2/2]

template<typename T, bool read_only>
SpacePointContainer2 & Acts::SpacePointColumnProxy< T, read_only >::container ( )
noexcept

Gets the container holding the space point.

Returns
A reference to the container holding the space point.

◆ data() [1/2]

template<typename T, bool read_only>
std::span< const Value > Acts::SpacePointColumnProxy< T, read_only >::data ( ) const
noexcept

Returns a const span to the column data.

Returns
A const span to the column data.

◆ data() [2/2]

template<typename T, bool read_only>
std::span< Value > Acts::SpacePointColumnProxy< T, read_only >::data ( )
noexcept

Returns a mutable span to the column data.

Returns
A mutable span to the column data.

◆ operator[]() [1/2]

template<typename T, bool read_only>
const Value & Acts::SpacePointColumnProxy< T, read_only >::operator[] ( Index index) const
noexcept

Returns a const reference to the column entry at the given index.

Parameters
indexThe index of the space point to access.
Returns
A const reference to the column entry at the given index.

◆ operator[]() [2/2]

template<typename T, bool read_only>
Value & Acts::SpacePointColumnProxy< T, read_only >::operator[] ( Index index)
noexcept

Returns a mutable reference to the column entry at the given index.

Parameters
indexThe index of the space point to access.
Returns
A mutable reference to the column entry at the given index.

◆ subset()

template<typename T, bool read_only>
Subset Acts::SpacePointColumnProxy< T, read_only >::subset ( const IndexSubset & subset) const
noexcept

Creates a subset view of this space point column based on provided indices.

This method creates a subset proxy that provides access to only the space points at the indices specified in the IndexSubset. The subset maintains a reference to the original column data without copying, enabling efficient access to selected space points for filtering, clustering, or other operations.

Parameters
subsetThe index subset specifying which space points to include
Returns
A subset proxy providing access to the selected space points
Note
The returned subset shares data with the original column
The subset remains valid only as long as the original column exists
This operation does not copy data, providing efficient subset access

Member Data Documentation

◆ ReadOnly

template<typename T, bool read_only>
bool Acts::SpacePointColumnProxy< T, read_only >::ReadOnly = read_only
staticconstexpr

Flag indicating whether this space point column proxy is read-only.