This is an auxiliary class. This class cannot be instanced.
More...
#include <abstract-reader.hpp>
|
bool | next (Event &e) |
| Get next event from the dataset.
|
|
template<std::size_t N> |
bool | next (Array< N > &array) |
| Get next events from the dataset.
|
|
bool | next_n (Vector &vector, const int n) |
| Get next n events from the dataset.
|
|
bool | next_n (Queue &queue, const int n, const bool keep_size=false) |
| Get next n events from the dataset.
|
|
bool | next_t (Vector &vector, const double t) |
| Get the next events until the specified duration is reached.
|
|
bool | next_t (Queue &queue, const double t, const bool keep_size=false) |
| Get the next events until the specified duration is reached and store them in a queue.
|
|
bool | skip_n (int n) |
| Skip the next n events in the dataset.
|
|
bool | skip_t (const double t) |
| Skip events for the specified duration.
|
|
void | reset () |
| Start reading from the first event in the dataset.
|
|
std::size_t | count () |
|
|
virtual bool | read_ (Event &e)=0 |
|
virtual void | reset_ ()=0 |
|
This is an auxiliary class. This class cannot be instanced.
◆ count()
std::size_t ev::AbstractReader_::count |
( |
| ) |
|
|
inline |
◆ next() [1/2]
template<std::size_t N>
bool ev::AbstractReader_::next |
( |
Array< N > & | array | ) |
|
|
inline |
Get next events from the dataset.
- Parameters
-
- Returns
- True if array fully populated events
◆ next() [2/2]
bool ev::AbstractReader_::next |
( |
Event & | e | ) |
|
|
inline |
Get next event from the dataset.
- Parameters
-
- Returns
- True if new event available
- Note
- The behaviour of next should be implemented in the derived classes.
◆ next_n() [1/2]
bool ev::AbstractReader_::next_n |
( |
ev::Queue & | queue, |
|
|
const int | n, |
|
|
const bool | keep_size = false ) |
Get next n events from the dataset.
- Parameters
-
n | Number of events to get |
queue | Event queue |
keep_size | If true, pop one event for each insertion to maintain queue size. |
- Returns
- True if queue populated with n new events
◆ next_n() [2/2]
bool ev::AbstractReader_::next_n |
( |
ev::Vector & | vector, |
|
|
const int | n ) |
Get next n events from the dataset.
- Parameters
-
vector | Event vector |
n | Number of events to get |
- Returns
- True if vector populated with n new events
◆ next_t() [1/2]
bool ev::AbstractReader_::next_t |
( |
ev::Queue & | queue, |
|
|
const double | t, |
|
|
const bool | keep_size = false ) |
Get the next events until the specified duration is reached and store them in a queue.
- Parameters
-
t | Duration to get events for. |
queue | Event queue to store the events. |
keep_size | If true, pop one event for each insertion to maintain queue size. |
- Returns
- True if the queue is populated with events for the specified duration.
◆ next_t() [2/2]
bool ev::AbstractReader_::next_t |
( |
ev::Vector & | vector, |
|
|
const double | t ) |
Get the next events until the specified duration is reached.
- Parameters
-
vector | Event vector to store the events. |
t | Duration to get events for. |
- Returns
- True if the vector is populated with events for the specified duration.
◆ reset()
void ev::AbstractReader_::reset |
( |
| ) |
|
|
inline |
Start reading from the first event in the dataset.
- Note
- The behaviour of reset should be implemented in the derived classes.
◆ skip_n()
bool ev::AbstractReader_::skip_n |
( |
int | n | ) |
|
Skip the next n events in the dataset.
- Parameters
-
n | Number of events to skip. |
- Returns
- True if the skip was successful.
◆ skip_t()
bool ev::AbstractReader_::skip_t |
( |
const double | t | ) |
|
Skip events for the specified duration.
- Parameters
-
t | Duration to skip events for. |
- Returns
- True if the skip was successful.
The documentation for this class was generated from the following files: