#include <EventIter.h>
Public Member Functions | |
EventIter () | |
Default constructor makes invalid iterator. | |
EventIter (const boost::shared_ptr< EventLoop > &evtLoop, EventLoop::EventType stopType) | |
Constructor takes event loop instance and "stop event type". | |
~EventIter () | |
boost::shared_ptr< PSEvt::Event > | next () |
get next event, returns zero pointer when done |
This class uses EventLoop class as a source of raw events, it then selects events of "Event" type and returns them one by one when next() method is called. Iteration stops when there are no more events left in the input source or when specified "stop" event type is reached. To iterate over all events from begin to end use None event type, to stop at the end of the run use EndRun type, to stop at the end of the step use EndCalibCycle event type.
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 61 of file EventIter.h.
psana::EventIter::EventIter | ( | ) |
psana::EventIter::EventIter | ( | const boost::shared_ptr< EventLoop > & | evtLoop, | |
EventLoop::EventType | stopType | |||
) |
Constructor takes event loop instance and "stop event type".
Do not use EventLoop::Event for stop type, first it does not make sense, second this iterator uses it for special purpose.
Definition at line 45 of file EventIter.cpp.
psana::EventIter::~EventIter | ( | ) |
Definition at line 54 of file EventIter.cpp.
boost::shared_ptr< PSEvt::Event > psana::EventIter::next | ( | ) |
get next event, returns zero pointer when done
Definition at line 60 of file EventIter.cpp.
References psana::EventLoop::Event, and psana::EventLoop::None.
Referenced by BOOST_AUTO_TEST_CASE().