Class BasicDataBank
java.lang.Object
org.jlab.io.base.BasicDataBank
- All Implemented Interfaces:
DataBank
- Direct Known Subclasses:
EvioDataBank
-
Constructor Summary
Constructors -
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) Not implemented.void
appendFloat
(String path, float[] arr) Not implemented.void
Not implemented.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
getByte
(int element, int index) 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
getDouble
(int element, int index) double[]
Returns a double array for given column name.double
float
getFloat
(int element, int index) float[]
Returns a float array for given column name.float
int
getInt
(int element, int index) int[]
int
long
getLong
(int element, int index) long[]
long
short
getShort
(int element, int index) 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
setByte
(int element, int row, byte value) void
void
void
setDouble
(int element, int row, double value) void
Adds given array to the doubles container.void
Change the value for individual entry for given column.void
setFloat
(int element, int row, float value) void
Adds given array to the floats container.void
Change the value for individual entry for given column.void
setInt
(int element, int row, int value) void
void
void
setLong
(int element, int row, long value) void
void
void
setShort
(int element, int row, short value) void
void
void
show()
Prints the content of the bank on the screen.
-
Constructor Details
-
BasicDataBank
-
-
Method Details
-
getColumnList
Description copied from interface:DataBank
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.- Specified by:
getColumnList
in interfaceDataBank
- Returns:
- array of strings with names.
-
getDescriptor
Description copied from interface:DataBank
Returns the descriptor of the bank, that contains names of the variables and their types.- Specified by:
getDescriptor
in interfaceDataBank
- Returns:
- bank descriptor
-
getDouble
-
setDouble
-
setDouble
-
appendDouble
Not implemented.- Specified by:
appendDouble
in interfaceDataBank
- Parameters:
path
-arr
-
-
getFloat
-
setFloat
-
setFloat
-
appendFloat
Not implemented.- Specified by:
appendFloat
in interfaceDataBank
- Parameters:
path
-arr
-
-
getInt
-
setInt
-
setInt
-
appendInt
-
getShort
-
setShort
-
setShort
-
appendShort
- Specified by:
appendShort
in interfaceDataBank
-
getByte
-
setByte
-
setByte
-
appendByte
- Specified by:
appendByte
in interfaceDataBank
-
getLong
-
setLong
-
setLong
-
appendLong
- Specified by:
appendLong
in interfaceDataBank
-
columns
-
rows
-
show
-
reset
-
allocate
-
getDouble
-
getFloat
-
getInt
-
getLong
-
getShort
-
getByte
-
getTableModel
Description copied from interface:DataBank
Returns a table model for displaying the bank information- Specified by:
getTableModel
in interfaceDataBank
- Parameters:
mask
-- Returns:
-
getDouble
-
setDouble
-
getFloat
-
setFloat
-
getInt
-
setInt
-
getShort
-
setShort
-
getByte
-
setByte
-
getLong
-
setLong
-