Package org.jlab.io.base
Interface DataBank
- All Known Implementing Classes:
BasicDataBank
,BosDataBank
,EvioDataBank
,Hipo3DataBank
,HipoDataBank
public interface DataBank
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(int rows) Allocates all variables for the the bank. the names are taken from the descriptor object.void
appendByte
(String path, byte[] arr) void
appendDouble
(String path, double[] arr) Appends an array to existing array with the same name.void
appendFloat
(String path, float[] arr) void
void
appendLong
(String path, long[] arr) void
appendShort
(String path, short[] arr) int
columns()
Returns the number of columns in the bank. columns are number of variables.byte[]
byte
String[]
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 native array of doubles for given name.double
float[]
float
int[]
int
long[]
long
short[]
short
getTableModel
(String mask) Returns a table model for displaying the bank informationvoid
reset()
Clears the content of the bank. all columns are removed.int
rows()
returns the number of rows in the bank, assuming all columns have the same length.void
void
void
Adds array of doubles into the bank under the name.void
void
void
void
void
void
void
void
void
void
show()
Prints the content of the bank on the screen.
-
Method Details
-
getColumnList
String[] getColumnList()Get 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.- Returns:
- array of strings with names.
-
getDescriptor
DataDescriptor getDescriptor()Returns the descriptor of the bank, that contains names of the variables and their types.- Returns:
- bank descriptor
-
getDouble
Returns a native array of doubles for given name.- Parameters:
path
- - name of the column.- Returns:
- double[] array with values.
-
getDouble
-
setDouble
Adds array of doubles into the bank under the name.- Parameters:
path
- - name of the array.arr
- primitive type array of doubles.
-
setDouble
-
appendDouble
Appends an array to existing array with the same name. The resulting array will increase in size by arr.length.- Parameters:
path
- name of the variablearr
- primitive type array of doubles.
-
getFloat
-
getFloat
-
setFloat
-
setFloat
-
appendFloat
-
getInt
-
getInt
-
setInt
-
setInt
-
appendInt
-
getShort
-
getShort
-
setShort
-
setShort
-
appendShort
-
getByte
-
getByte
-
setByte
-
setByte
-
appendByte
-
getLong
-
getLong
-
setLong
-
setLong
-
appendLong
-
columns
int columns()Returns the number of columns in the bank. columns are number of variables.- Returns:
- number of columns
-
rows
int rows()returns the number of rows in the bank, assuming all columns have the same length.- Returns:
- number of rows
-
show
void show()Prints the content of the bank on the screen. The implementation of printout is left up to the particular implementation of the class. -
reset
void reset()Clears the content of the bank. all columns are removed. -
allocate
void allocate(int rows) Allocates all variables for the the bank. the names are taken from the descriptor object.- Parameters:
rows
- number of rows for each column to allocate
-
getTableModel
Returns a table model for displaying the bank information- Parameters:
mask
-- Returns:
-