Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Public Member Functions | List of all members
ska::cheetah::data::detail::DmTimeSlice< DmTimeType > Class Template Reference

Class that wraps a subset of DMs from a DmTime object. More...

#include <cheetah/data/detail/DmTimeSlice.h>

Inheritance diagram for ska::cheetah::data::detail::DmTimeSlice< DmTimeType >:
Inheritance graph
Collaboration diagram for ska::cheetah::data::detail::DmTimeSlice< DmTimeType >:
Collaboration graph

Public Types

typedef std::shared_ptr< DmTimeType > ParentType
 
typedef DmTimeType::ContainerType ContainerType
 
typedef DmTimeSliceIterator< SelfTypeIterator
 
typedef DmTimeSliceIterator< SelfType const > ConstIterator
 

Public Member Functions

Iterator begin ()
 Get an iterator poiting to the start of the slice. More...
 
ConstIterator cbegin () const
 
Iterator end ()
 Get an iterator poiting to the end of the slice. More...
 
ConstIterator cend () const
 
ContainerType const & blocks () const
 Get a constant reference to the underlying list of DmTime shared pointers. More...
 

Detailed Description

template<typename DmTimeType>
class ska::cheetah::data::detail::DmTimeSlice< DmTimeType >

Class that wraps a subset of DMs from a DmTime object.

DmTimeSlice objects are intended to hide the underlying storage implementation of blocks of DmTime objects. DmTimeSlice objects are passed to Tdas and Fdas for processing of blocks of DMs at a time in an async or sync task.

Definition at line 54 of file DmTimeSlice.h.

Member Function Documentation

◆ begin()

template<typename DmTimeType >
DmTimeSlice< DmTimeType >::Iterator ska::cheetah::data::detail::DmTimeSlice< DmTimeType >::begin ( )

Get an iterator poiting to the start of the slice.

Returns
An iterator poiting to the first DM trial in the slice

Definition at line 24 of file DmTimeSlice.cpp.

25 {
26  return Iterator(_start_dm_idx, this->shared_from_this());
27 }

◆ blocks()

template<typename DmTimeType >
DmTimeSlice< DmTimeType >::ContainerType const & ska::cheetah::data::detail::DmTimeSlice< DmTimeType >::blocks ( ) const

Get a constant reference to the underlying list of DmTime shared pointers.

Returns
A reference to the underlying list

Definition at line 52 of file DmTimeSlice.cpp.

53 {
54  return _parent->blocks();
55 }

◆ end()

template<typename DmTimeType >
DmTimeSlice< DmTimeType >::Iterator ska::cheetah::data::detail::DmTimeSlice< DmTimeType >::end ( )

Get an iterator poiting to the end of the slice.

Returns
An iterator poiting to the end of the last DM trial in the slice

Definition at line 36 of file DmTimeSlice.cpp.

37 {
38  // blocks is guaranteed to never be empty so front() will always return
39  std::size_t end_idx = std::min(blocks().front()->size(),_start_dm_idx+_number_dms_per_slice);
40  return Iterator(end_idx, this->shared_from_this());
41 }
ContainerType const & blocks() const
Get a constant reference to the underlying list of DmTime shared pointers.
Definition: DmTimeSlice.cpp:52

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