Package org.jlab.io.base
Class BasicDataBank
java.lang.Object
org.jlab.io.base.BasicDataBank
- All Implemented Interfaces:
DataBank
- Direct Known Subclasses:
EvioDataBank
- Author:
- gavalian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallocate(int rows) Allocates all variables for the the bank. the names are taken from the descriptor object.voidappendByte(String path, byte[] arr) voidappendDouble(String path, double[] arr) Not implemented.voidappendFloat(String path, float[] arr) Not implemented.voidNot implemented.voidappendLong(String path, long[] arr) voidappendShort(String path, short[] arr) intcolumns()Returns the number of columns in the bank. columns are number of variables.byte[]byteString[]Get the names of the columns in the bank.Returns the descriptor of the bank, that contains names of the variables and their types.double[]Returns a double array for given column name.doublefloat[]Returns a float array for given column name.floatint[]intlong[]longshort[]shortgetTableModel(String mask) Returns a table model for displaying the bank informationvoidreset()Clears the content of the bank. all columns are removed.introws()returns the number of rows in the bank, assuming all columns have the same length.voidvoidvoidAdds given array to the doubles container.voidChange the value for individual entry for given column.voidAdds given array to the floats container.voidChange the value for individual entry for given column.voidvoidvoidvoidvoidvoidvoidshow()Prints the content of the bank on the screen.
-
Constructor Details
-
BasicDataBank
-
BasicDataBank
public BasicDataBank()
-
-
Method Details
-
getColumnList
Description copied from interface:DataBankGet the names of the columns in the bank. The name is used in the calls getInt() and getDouble() and other calls for get the arrays.- Specified by:
getColumnListin interfaceDataBank- Returns:
- array of strings with names.
-
getDescriptor
Description copied from interface:DataBankReturns the descriptor of the bank, that contains names of the variables and their types.- Specified by:
getDescriptorin interfaceDataBank- Returns:
- bank descriptor
-
getDouble
Returns a double array for given column name. -
setDouble
Adds given array to the doubles container. If the array with given column name already exists it will not be replaced. -
setDouble
Change the value for individual entry for given column. Out of bounds check is performed. -
appendDouble
Not implemented.- Specified by:
appendDoublein interfaceDataBank- Parameters:
path-arr-
-
getFloat
Returns a float array for given column name. -
setFloat
Adds given array to the floats container. If the array with given column name already exists it will not be replaced. -
setFloat
Change the value for individual entry for given column. Out of bounds check is performed. -
appendFloat
Not implemented.- Specified by:
appendFloatin interfaceDataBank- Parameters:
path-arr-
-
getInt
-
setInt
-
setInt
-
appendInt
Not implemented. -
getShort
-
setShort
-
setShort
-
appendShort
- Specified by:
appendShortin interfaceDataBank
-
getByte
-
setByte
-
setByte
-
appendByte
- Specified by:
appendBytein interfaceDataBank
-
getLong
-
setLong
-
setLong
-
appendLong
- Specified by:
appendLongin interfaceDataBank
-
columns
public int columns()Description copied from interface:DataBankReturns the number of columns in the bank. columns are number of variables. -
rows
public int rows()Description copied from interface:DataBankreturns the number of rows in the bank, assuming all columns have the same length. -
show
public void show()Description copied from interface:DataBankPrints the content of the bank on the screen. The implementation of printout is left up to the particular implementation of the class. -
reset
public void reset()Description copied from interface:DataBankClears the content of the bank. all columns are removed. -
allocate
public void allocate(int rows) Description copied from interface:DataBankAllocates all variables for the the bank. the names are taken from the descriptor object. -
getDouble
-
getFloat
-
getInt
-
getLong
-
getShort
-
getByte
-
getTableModel
Description copied from interface:DataBankReturns a table model for displaying the bank information- Specified by:
getTableModelin interfaceDataBank- Returns:
-