hep.analysis
Class EventHandler

java.lang.Object
  |
  +--hep.analysis.EventHandler
Direct Known Subclasses:
EventAnalyzer, EventGenerator

public abstract class EventHandler
extends java.lang.Object

The base class for EventAnalyzer and EventGenerator.

See Also:
EventAnalyzer, EventGenerator

Field Summary
protected  java.io.PrintWriter out
          The log stream used to send messages.
 
Constructor Summary
EventHandler()
           
 
Method Summary
 void afterLastEvent()
          Called after the last event is handled.
 void beforeFirstEvent()
          Called before the first event is handled.
protected  Histogram histogram(java.lang.String name)
          Returns the Histogram object with the given name in the default folder.
protected  Histogram histogram(java.lang.String name, HistogramFolder parent)
          Returns the Histogram object with the given name in the given folder.
 void sendMessage(java.lang.String message)
          Displays a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.PrintWriter out
The log stream used to send messages.
Constructor Detail

EventHandler

public EventHandler()
Method Detail

beforeFirstEvent

public void beforeFirstEvent()
Called before the first event is handled. Does nothing by default. Override to have something happen.

afterLastEvent

public void afterLastEvent()
Called after the last event is handled. Does nothing by default. Override to have something happen.

sendMessage

public void sendMessage(java.lang.String message)
Displays a message.
Parameters:
message - the message to display

histogram

protected final Histogram histogram(java.lang.String name)
Returns the Histogram object with the given name in the default folder. A convenience method equivalent to HistogramFolder.find(name)
Parameters:
name - the name of the histogram to find
Returns:
the Histogram object with the name given by the parameter name.
See Also:
Histogram.find(String)

histogram

protected final Histogram histogram(java.lang.String name,
                                    HistogramFolder parent)
Returns the Histogram object with the given name in the given folder. A convenience method equivalent to HistogramFolder.find(name,parent)
Parameters:
name - the name of the histogram to find
parent - the folder to look in
Returns:
the Histogram object with the name given by the parameter name.
See Also:
Histogram.find(String,HistogramFolder)