psana::EventIter Class Reference
[psana package]

Class representing iterator over events. More...

#include <EventIter.h>

List of all members.

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::Eventnext ()
 get next event, returns zero pointer when done


Detailed Description

Class representing iterator over events.

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.

Version:
Id
EventIter.h 6430 2013-06-24 17:12:58Z salnikov@SLAC.STANFORD.EDU
Author:
Andy Salnikov

Definition at line 61 of file EventIter.h.


Constructor & Destructor Documentation

psana::EventIter::EventIter (  ) 

Default constructor makes invalid iterator.

Definition at line 39 of file EventIter.cpp.

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.


Member Function Documentation

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().


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7