hep.aida
Interface ITuple


public interface ITuple

User level interface to a Tuple.

Version:
$Id: ITuple.html,v 1.1 2002/10/08 00:51:18 tonyj Exp $
Author:
Pavel Binko, Dino Ferrero Merlino, Wolfgang Hoschek, Tony Johnson, Andreas Pfeiffer, Mark Donszelmann, Guy Barrand
Source Code:
ITuple.java

Method Summary
 void addRow()
          Should be called after fill is called for the columns.
 double columnMax(int column)
           
 double columnMean(int column)
           
 double columnMin(int column)
           
 String columnName(int column)
          Gets the name of a column from its index
 double columnRms(int column)
           
 int columns()
          Number of columns in ntuple
 Class columnType(int column)
          Returns the type of the column (maybe a String in C++)
 void fill(double[] values)
           
 void fill(float[] values)
           
 void fill(int column, boolean value)
           
 void fill(int column, byte value)
           
 void fill(int column, char value)
           
 void fill(int column, double value)
           
 void fill(int column, float value)
           
 void fill(int column, int value)
           
 void fill(int column, long value)
           
 void fill(int column, Object value)
           
 void fill(int column, short value)
           
 void fill(int column, String value)
           
 int findColumn(String name)
          Convert a name to a column index.
 boolean getBoolean(int column)
           
 byte getByte(int column)
           
 char getChar(int column)
           
 double getDouble(int column)
           
 float getFloat(int column)
           
 int getInt(int column)
           
 long getLong(int column)
           
 Object getObject(int column)
           
 short getShort(int column)
           
 String getString(int column)
           
 String label()
          The label for this n-tuple
 boolean next()
          Positions the cursor at the next row.
 boolean project(IHistogram1D histogram, IEvaluator evaluatorX, IFilter filter)
          Fill an IHistogram1D from the tuple.
 boolean project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter)
          Fill an IHistogram2D from the tuple.
 boolean project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter)
          Fill an IHistogram3D from the tuple.
 void reset()
          Clears all rows from ntuple?
 void resetRow()
          Clears the current (not yet added) row.
 int rows()
          The number of rows currently in the ntuple.
 boolean skip(int rows)
          Skips rows.
 void start()
          Positions the read cursor immediately before the first row.
 

Method Detail

label

public String label()
The label for this n-tuple

fill

public void fill(int column,
                 double value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 float value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 int value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 short value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 long value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 char value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 byte value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 boolean value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 String value)
          throws IllegalArgumentException

fill

public void fill(int column,
                 Object value)
          throws IllegalArgumentException

fill

public void fill(double[] values)
          throws IllegalArgumentException

fill

public void fill(float[] values)
          throws IllegalArgumentException

addRow

public void addRow()
            throws OutOfStorageException
Should be called after fill is called for the columns. Unfilled columns will be filled with the default value for that column.

resetRow

public void resetRow()
Clears the current (not yet added) row.

reset

public void reset()
Clears all rows from ntuple?

rows

public int rows()
The number of rows currently in the ntuple.
Returns:
-1 if cannot be determined.

start

public void start()
Positions the read cursor immediately before the first row.

skip

public boolean skip(int rows)
Skips rows.
Parameters:
rows - number of rows to skip, greater than 0.
Returns:
false if it cannot skip rows.

next

public boolean next()
Positions the cursor at the next row.
Returns:
false if there is no next row.

findColumn

public int findColumn(String name)
               throws IllegalArgumentException
Convert a name to a column index. Note: C++ version may return -1 if column not found
Returns:
the column number for a given name

getDouble

public double getDouble(int column)
                 throws ClassCastException

getFloat

public float getFloat(int column)
               throws ClassCastException

getInt

public int getInt(int column)
           throws ClassCastException

getShort

public short getShort(int column)
               throws ClassCastException

getLong

public long getLong(int column)
             throws ClassCastException

getChar

public char getChar(int column)
             throws ClassCastException

getByte

public byte getByte(int column)
             throws ClassCastException

getBoolean

public boolean getBoolean(int column)
                   throws ClassCastException

getString

public String getString(int column)
                 throws ClassCastException

getObject

public Object getObject(int column)
                 throws ClassCastException

columns

public int columns()
Number of columns in ntuple

columnName

public String columnName(int column)
Gets the name of a column from its index

columnType

public Class columnType(int column)
Returns the type of the column (maybe a String in C++)

columnMin

public double columnMin(int column)

columnMax

public double columnMax(int column)

columnMean

public double columnMean(int column)

columnRms

public double columnRms(int column)

project

public boolean project(IHistogram1D histogram,
                       IEvaluator evaluatorX,
                       IFilter filter)
Fill an IHistogram1D from the tuple.
Parameters:
histogram. - The histogram to fill.
evaluator. - The evaluator object used to compute the value to be filled in the histogram. The value is computed from the current row of the tuple.
filter. - The filter object used to accept or not the current row. If rejected, the histogram is not filled.

project

public boolean project(IHistogram2D histogram,
                       IEvaluator evaluatorX,
                       IEvaluator evaluatorY,
                       IFilter filter)
Fill an IHistogram2D from the tuple.
Parameters:
histogram. - The histogram to fill.
evaluatorX. - The evaluator object used to compute the "x value" to be filled in the histogram.
evaluatorY. - The evaluator object used to compute the "y value" to be filled in the histogram. Then some : fill(valueX, valueY, 1) is done for each tuple row.
filter. - The filter object used to accept or not the current row. If rejected, the histogram is not filled.

project

public boolean project(IHistogram3D histogram,
                       IEvaluator evaluatorX,
                       IEvaluator evaluatorY,
                       IEvaluator evaluatorZ,
                       IFilter filter)
Fill an IHistogram3D from the tuple.


Copyright © 2000, 2001 AIDA Team, All Rights Reserved.