hep.analysis
Interface EventSource

All Known Implementing Classes:
EventGenerator

public interface EventSource

A source for events. EventGenerator implements this interface, as do objects opened by the openDataSet(String) method in the DIM (data interface module) interface.

See Also:
EventGenerator

Method Summary
 void afterLastEvent()
          Called after the last event is accessed.
 void beforeFirstEvent()
          Called before the first event is accessed.
 void close()
          Provide some cleanup code if it is relevant to close the event source.
 java.lang.Class getEventDataClass()
          Specify class of objects to be returned by getNextEvent
 java.lang.String getName()
          Return a name for your event source.
 EventData getNextEvent()
          Return the next event.
 int getTotalNumberOfEvents()
          Return the number of events, or -1 if unknown.
 

Method Detail

getTotalNumberOfEvents

public int getTotalNumberOfEvents()
Return the number of events, or -1 if unknown.

beforeFirstEvent

public void beforeFirstEvent()
Called before the first event is accessed.

afterLastEvent

public void afterLastEvent()
Called after the last event is accessed.

getNextEvent

public EventData getNextEvent()
                       throws EndOfDataException
Return the next event.
Throws:
EndOfDataException - when no more events are available

getName

public java.lang.String getName()
Return a name for your event source.

close

public void close()
Provide some cleanup code if it is relevant to close the event source.

getEventDataClass

public java.lang.Class getEventDataClass()
Specify class of objects to be returned by getNextEvent