hep.analysis
Class AbstractEventData

java.lang.Object
  |
  +--hep.analysis.AbstractEventData
All Implemented Interfaces:
EventData, NTupleEventData

public abstract class AbstractEventData
extends java.lang.Object
implements NTupleEventData

Extend this class to get a simple implementation of the NTupleEventData interface. By default, this class implements all of the NTupleEventData methods but throws an EventDataException from each. Therefore, a subclass should override the methods corresponding to the types it wants to support and leave the remaining method implementations to throw exceptions.

See Also:
NTupleEventData, EventDataException

Constructor Summary
AbstractEventData()
           
 
Method Summary
 boolean getBoolean(int column)
          Override if your subclass supports boolean data types.
 boolean getBoolean(java.lang.String name)
          Override if your subclass supports boolean data types.
 java.util.Date getDate(int column)
          Override if your subclass supports Date data types.
 java.util.Date getDate(java.lang.String name)
          Override if your subclass supports Date data types.
 double getDouble(int column)
          Override if your subclass supports double data types.
 double getDouble(java.lang.String name)
          Override if your subclass supports double data types.
 int getInt(int column)
          Override if your subclass supports int data types.
 int getInt(java.lang.String name)
          Override if your subclass supports int data types.
 java.lang.Object getObject(int column)
          Override if your subclass supports Object data types.
 java.lang.Object getObject(java.lang.String name)
          Override if your subclass supports Object data types.
 java.lang.String getString(int column)
          Override if your subclass supports String data types.
 java.lang.String getString(java.lang.String name)
          Override if your subclass supports String data types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.analysis.NTupleEventData
findColumn
 

Constructor Detail

AbstractEventData

public AbstractEventData()
Method Detail

getDouble

public double getDouble(java.lang.String name)
Override if your subclass supports double data types. Throws an EventDataException if not overridden.
Specified by:
getDouble in interface NTupleEventData
Parameters:
name - the name of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getInt

public int getInt(java.lang.String name)
Override if your subclass supports int data types. Throws an EventDataException if not overridden.
Specified by:
getInt in interface NTupleEventData
Parameters:
name - the name of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getDate

public java.util.Date getDate(java.lang.String name)
Override if your subclass supports Date data types. Throws an EventDataException if not overridden.
Specified by:
getDate in interface NTupleEventData
Parameters:
name - the name of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getString

public java.lang.String getString(java.lang.String name)
Override if your subclass supports String data types. Throws an EventDataException if not overridden.
Specified by:
getString in interface NTupleEventData
Parameters:
name - the name of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getBoolean

public boolean getBoolean(java.lang.String name)
Override if your subclass supports boolean data types. Throws an EventDataException if not overridden.
Specified by:
getBoolean in interface NTupleEventData
Parameters:
name - the name of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getObject

public java.lang.Object getObject(java.lang.String name)
Override if your subclass supports Object data types. Throws an EventDataException if not overridden.
Specified by:
getObject in interface NTupleEventData
Parameters:
name - the name of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getDouble

public double getDouble(int column)
Override if your subclass supports double data types. Throws an EventDataException if not overridden.
Specified by:
getDouble in interface NTupleEventData
Parameters:
column - the integer index of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getInt

public int getInt(int column)
Override if your subclass supports int data types. Throws an EventDataException if not overridden.
Specified by:
getInt in interface NTupleEventData
Parameters:
column - the integer index of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getDate

public java.util.Date getDate(int column)
Override if your subclass supports Date data types. Throws an EventDataException if not overridden.
Specified by:
getDate in interface NTupleEventData
Parameters:
column - the integer index of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getString

public java.lang.String getString(int column)
Override if your subclass supports String data types. Throws an EventDataException if not overridden.
Specified by:
getString in interface NTupleEventData
Parameters:
column - the integer index of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getBoolean

public boolean getBoolean(int column)
Override if your subclass supports boolean data types. Throws an EventDataException if not overridden.
Specified by:
getBoolean in interface NTupleEventData
Parameters:
column - the integer index of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden

getObject

public java.lang.Object getObject(int column)
Override if your subclass supports Object data types. Throws an EventDataException if not overridden.
Specified by:
getObject in interface NTupleEventData
Parameters:
column - the integer index of the field you want a value for
Returns:
the value of the specified field for the event that this object represents
Throws:
EventDataException - if not overridden