Project
Loading...
Searching...
No Matches
o2::emcal::RecoContainerReader Class Reference

Iterator over reco containers. More...

#include <RecoContainer.h>

Classes

class  InvalidAccessException
 Handling of access to objects beyond container boundary. More...
 

Public Member Functions

 RecoContainerReader (RecoContainer &container)
 Constructor.
 
 RecoContainerReader (RecoContainer &&container)=delete
 
 ~RecoContainerReader ()=default
 Destructor.
 
EventContainernextEvent ()
 Get the next event in container.
 
bool hasNext () const
 Check whehter there are more events in the container.
 
std::size_t getNumberOfEvents () const
 Get the number of events in the container.
 

Detailed Description

Iterator over reco containers.

Author
Markus Fasel narku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
May 30, 2023

The RecoContainerReader iterates over the events stored in the RecoContainer in a time-ordered sequence. The function hasNext checks whether there are more events to iterate over, while nextEvent provides access to the next event.

Error handling: The RecoContainerReader can raise an InvalidAccessException in case access is tried to invalid data.

Definition at line 331 of file RecoContainer.h.

Constructor & Destructor Documentation

◆ RecoContainerReader() [1/2]

RecoContainerReader::RecoContainerReader ( RecoContainer container)

Constructor.

Parameters
containerContainer to be iterated over

Definition at line 166 of file RecoContainer.cxx.

◆ RecoContainerReader() [2/2]

o2::emcal::RecoContainerReader::RecoContainerReader ( RecoContainer &&  container)
delete

◆ ~RecoContainerReader()

o2::emcal::RecoContainerReader::~RecoContainerReader ( )
default

Destructor.

Member Function Documentation

◆ getNumberOfEvents()

std::size_t o2::emcal::RecoContainerReader::getNumberOfEvents ( ) const
inline

Get the number of events in the container.

Returns
Number of events

Definition at line 369 of file RecoContainer.h.

◆ hasNext()

bool o2::emcal::RecoContainerReader::hasNext ( ) const
inline

Check whehter there are more events in the container.

Returns
True if the event is not the last event, false otherwise.

Definition at line 365 of file RecoContainer.h.

◆ nextEvent()

EventContainer & RecoContainerReader::nextEvent ( )

Get the next event in container.

Returns
Next event in reco container (ordered)
Exceptions
InvalidAccessException

Definition at line 171 of file RecoContainer.cxx.


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