ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SeedContainer2 Class Reference

A container of seeds. More...

#include <Acts/EventData/SeedContainer2.hpp>

Public Types

using const_iterator = Iterator<true>
 Type alias for const iterator over seeds.
using ConstProxy = ConstSeedProxy2
 Type alias for const seed proxy.
using Index = SeedIndex2
 Type alias for seed index type.
template<bool read_only>
using Iterator
 Type alias for iterator template over seed container.
using iterator = Iterator<false>
 Type alias for mutable iterator over seeds.
using MutableProxy = MutableSeedProxy2
 Type alias for mutable seed proxy.

Public Member Functions

 SeedContainer2 () noexcept
 Constructs and empty seed container.
 SeedContainer2 (const SeedContainer2 &other) noexcept
 Constructs a copy of the given seed container.
 SeedContainer2 (SeedContainer2 &&other) noexcept
 Move constructs a seed container.
 ~SeedContainer2 () noexcept=default
 Detructs the seed container.
void assignSpacePointContainer (const SpacePointContainer2 &spacePointContainer) noexcept
 Assigns the const space point container to be used by this seed container by const reference.
void assignSpacePointContainer (const std::shared_ptr< const SpacePointContainer2 > &spacePointContainer) noexcept
 Assigns the const space point container to be used by this seed container by shared pointer.
void assignSpacePointContainer (const std::shared_ptr< SpacePointContainer2 > &spacePointContainer) noexcept
 Assigns the mutable space point container to be used by this seed container by shared pointer.
void assignSpacePointContainer (SpacePointContainer2 &&spacePointContainer) noexcept
 Assigns the mutable space point container to be used by this seed container by value.
void assignSpacePointContainer (SpacePointContainer2 &spacePointContainer) noexcept
 Assigns the mutable space point container to be used by this seed container by reference.
MutableProxy at (Index index)
 Returns a mutable proxy to the seed at the given index.
ConstProxy at (Index index) const
 Returns a const proxy to the seed at the given index.
const_iterator begin () const noexcept
 Get const iterator to the beginning of seeds.
iterator begin () noexcept
 Get mutable iterator to the beginning of seeds.
void clear () noexcept
 Clears the seed container, removing all seeds and space points.
void copyFrom (Index index, const SeedContainer2 &otherContainer, Index otherIndex, SeedColumns columnsToCopy)
 Copies the specified columns from another seed to this seed.
MutableProxy createSeed () noexcept
 Creates a new seed.
bool empty () const noexcept
 Checks if the seed container is empty.
const_iterator end () const noexcept
 Get const iterator to the end of seeds.
iterator end () noexcept
 Get mutable iterator to the end of seeds.
bool hasMutableSpacePointContainer () const noexcept
 Checks if a mutable space point container has been assigned to this seed container.
bool hasSpacePointContainer () const noexcept
 Checks if a space point container has been assigned to this seed container.
SpacePointContainer2mutableSpacePointContainer ()
 Returns a mutable reference to the assigned space point container.
SeedContainer2operator= (const SeedContainer2 &other) noexcept
 Assignment operator for copying a seed container.
SeedContainer2operator= (SeedContainer2 &&other) noexcept
 Move assignment operator for a seed container.
ConstProxy operator[] (Index index) const noexcept
 Returns a const proxy to the seed at the given index.
MutableProxy operator[] (Index index) noexcept
 Returns a mutable proxy to the seed at the given index.
void reserve (Index size, float averageSpacePoints=3) noexcept
 Reserves space for the given number of seeds.
Index size () const noexcept
 Returns the size of the seed container, i.e., the number of seeds contained in it.
const SpacePointContainer2spacePointContainer () const
 Returns a const reference to the assigned space point container.

Detailed Description

A container of seeds.

Individual seeds are modeled as a sequence of N space points which are addressed via an index into the space point container. Individual seeds are addressed via index. A proxy object simplifies the handling.

Member Typedef Documentation

◆ Iterator

template<bool read_only>
using Acts::SeedContainer2::Iterator
Initial value:
detail::ContainerIterator<
std::conditional_t<read_only, ConstSeedProxy2, MutableSeedProxy2>, Index,
read_only>
SeedContainer2() noexcept
Constructs and empty seed container.
SeedIndex2 Index
Type alias for seed index type.
Definition SeedContainer2.hpp:36

Type alias for iterator template over seed container.

Constructor & Destructor Documentation

◆ SeedContainer2() [1/2]

Acts::SeedContainer2::SeedContainer2 ( const SeedContainer2 & other)
noexcept

Constructs a copy of the given seed container.

Parameters
otherThe seed container to copy.

◆ SeedContainer2() [2/2]

Acts::SeedContainer2::SeedContainer2 ( SeedContainer2 && other)
noexcept

Move constructs a seed container.

Parameters
otherThe seed container to move.

Member Function Documentation

◆ assignSpacePointContainer() [1/5]

void Acts::SeedContainer2::assignSpacePointContainer ( const SpacePointContainer2 & spacePointContainer)
noexcept

Assigns the const space point container to be used by this seed container by const reference.

Note that the ownership of the space point container is not transferred and the user must ensure that the space point container remains valid for the lifetime of this seed container.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [2/5]

void Acts::SeedContainer2::assignSpacePointContainer ( const std::shared_ptr< const SpacePointContainer2 > & spacePointContainer)
noexcept

Assigns the const space point container to be used by this seed container by shared pointer.

The ownership of the space point container is shared between this seed container and the user.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [3/5]

void Acts::SeedContainer2::assignSpacePointContainer ( const std::shared_ptr< SpacePointContainer2 > & spacePointContainer)
noexcept

Assigns the mutable space point container to be used by this seed container by shared pointer.

The ownership of the space point container is shared between this seed container and the user.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [4/5]

void Acts::SeedContainer2::assignSpacePointContainer ( SpacePointContainer2 && spacePointContainer)
noexcept

Assigns the mutable space point container to be used by this seed container by value.

This can be used to either copy or move-assign a container. The ownership of the space point container is transferred to this seed container.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [5/5]

void Acts::SeedContainer2::assignSpacePointContainer ( SpacePointContainer2 & spacePointContainer)
noexcept

Assigns the mutable space point container to be used by this seed container by reference.

Note that the ownership of the space point container is not transferred and the user must ensure that the space point container remains valid for the lifetime of this seed container.

Parameters
spacePointContainerThe space point container to assign.

◆ at() [1/2]

MutableProxy Acts::SeedContainer2::at ( Index index)

Returns a mutable proxy to the seed at the given index.

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

Parameters
indexThe index of the seed to access.
Returns
A mutable proxy to the seed at the given index.
Exceptions
std::out_of_rangeif the index is out of range.

◆ at() [2/2]

ConstProxy Acts::SeedContainer2::at ( Index index) const

Returns a const proxy to the seed at the given index.

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

Parameters
indexThe index of the seed to access.
Returns
A const proxy to the seed at the given index.
Exceptions
std::out_of_rangeif the index is out of range.

◆ begin() [1/2]

const_iterator Acts::SeedContainer2::begin ( ) const
noexcept

Get const iterator to the beginning of seeds.

Returns
Const iterator to the first seed

◆ begin() [2/2]

iterator Acts::SeedContainer2::begin ( )
noexcept

Get mutable iterator to the beginning of seeds.

Returns
Mutable iterator to the first seed

◆ copyFrom()

void Acts::SeedContainer2::copyFrom ( Index index,
const SeedContainer2 & otherContainer,
Index otherIndex,
SeedColumns columnsToCopy )

Copies the specified columns from another seed to this seed.

Parameters
indexThe index of the seed to copy to in this container.
otherContainerThe seed container to copy from.
otherIndexThe index of the seed to copy from in the other container.
columnsToCopyThe columns to copy from the other seed.

◆ createSeed()

MutableProxy Acts::SeedContainer2::createSeed ( )
noexcept

Creates a new seed.

Returns
A mutable proxy to the newly created seed.

◆ empty()

bool Acts::SeedContainer2::empty ( ) const
noexcept

Checks if the seed container is empty.

Returns
True if the container is empty, false otherwise.

◆ end() [1/2]

const_iterator Acts::SeedContainer2::end ( ) const
noexcept

Get const iterator to the end of seeds.

Returns
Const iterator past the last seed

◆ end() [2/2]

iterator Acts::SeedContainer2::end ( )
noexcept

Get mutable iterator to the end of seeds.

Returns
Mutable iterator past the last seed

◆ hasMutableSpacePointContainer()

bool Acts::SeedContainer2::hasMutableSpacePointContainer ( ) const
noexcept

Checks if a mutable space point container has been assigned to this seed container.

Returns
True if a mutable space point container has been assigned.

◆ hasSpacePointContainer()

bool Acts::SeedContainer2::hasSpacePointContainer ( ) const
noexcept

Checks if a space point container has been assigned to this seed container.

Returns
True if a space point container has been assigned.

◆ mutableSpacePointContainer()

SpacePointContainer2 & Acts::SeedContainer2::mutableSpacePointContainer ( )

Returns a mutable reference to the assigned space point container.

Returns
A mutable reference to the assigned space point container.
Exceptions
std::logic_errorif no mutable space point container has been assigned.

◆ operator=() [1/2]

SeedContainer2 & Acts::SeedContainer2::operator= ( const SeedContainer2 & other)
noexcept

Assignment operator for copying a seed container.

Parameters
otherThe seed container to copy.
Returns
A reference to this seed container.

◆ operator=() [2/2]

SeedContainer2 & Acts::SeedContainer2::operator= ( SeedContainer2 && other)
noexcept

Move assignment operator for a seed container.

Parameters
otherThe seed container to move.
Returns
A reference to this seed container.

◆ operator[]() [1/2]

ConstProxy Acts::SeedContainer2::operator[] ( Index index) const
noexcept

Returns a const proxy to the seed at the given index.

Parameters
indexThe index of the seed to access.
Returns
A const proxy to the seed at the given index.

◆ operator[]() [2/2]

MutableProxy Acts::SeedContainer2::operator[] ( Index index)
noexcept

Returns a mutable proxy to the seed at the given index.

Parameters
indexThe index of the seed to access.
Returns
A mutable proxy to the seed at the given index.

◆ reserve()

void Acts::SeedContainer2::reserve ( Index size,
float averageSpacePoints = 3 )
noexcept

Reserves space for the given number of seeds.

Parameters
sizeThe number of seeds to reserve space for.
averageSpacePointsThe average number of space points per seed.

◆ size()

Index Acts::SeedContainer2::size ( ) const
noexcept

Returns the size of the seed container, i.e., the number of seeds contained in it.

Returns
The number of seeds in the container.

◆ spacePointContainer()

const SpacePointContainer2 & Acts::SeedContainer2::spacePointContainer ( ) const

Returns a const reference to the assigned space point container.

Returns
A const reference to the assigned space point container.
Exceptions
std::logic_errorif no space point container has been assigned.