All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
galleryUtils.EventIterator Class Reference

Public Member Functions

def __init__
 
def __iter__
 
def next
 
def __init__
 
def __iter__
 
def next
 

Private Attributes

 _event
 
 _index
 

Detailed Description

Iterator for an event sequence.

It can be used directly as:
    
    for event in EventIterator(event): ...
    
or it can be plugged in directly in the gallery.Event class, making the latter
be iterable:
    
    for event in event: ...
    
(or `for evt in event: ...`).

Definition at line 198 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.

Constructor & Destructor Documentation

def galleryUtils.EventIterator.__init__ (   self,
  event 
)
def galleryUtils.EventIterator.__init__ (   self,
  event 
)

Definition at line 124 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.

125  def __init__(self, event):
126  self._event = event
self._index = None

Member Function Documentation

def galleryUtils.EventIterator.__iter__ (   self)

Definition at line 127 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.

128  def __iter__(self):
129  self._index = None
return self
def galleryUtils.EventIterator.__iter__ (   self)

Definition at line 216 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.

217  def __iter__(self):
218  self._index = None
return self
def galleryUtils.EventIterator.next (   self)

Definition at line 130 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.

131  def next(self):
132  if self._index is not None:
133  self._event.next()
134  self._index += 1
135  if self._event.atEnd(): raise StopIteration
return self._event
def galleryUtils.EventIterator.next (   self)

Definition at line 219 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.

220  def next(self):
221  if self._index is not None:
222  self._event.next()
223  self._index += 1
224  if self._event.atEnd(): raise StopIteration
return self._event

Member Data Documentation

galleryUtils.EventIterator._event
private

Definition at line 214 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.

galleryUtils.EventIterator._index
private

Definition at line 215 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.


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