Class HipoDataBank
java.lang.Object
org.jlab.io.hipo.HipoDataBank
- All Implemented Interfaces:
DataBank
-
Constructor Summary
ConstructorsConstructorDescriptionHipoDataBank(HipoDataDescriptor desc, int size) HipoDataBank(org.jlab.jnp.hipo4.data.Bank bank) -
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) Appends an array to existing array with the same name.voidappendFloat(String path, float[] arr) voidvoidappendLong(String path, long[] arr) voidappendShort(String path, short[] arr) intcolumns()Returns the number of columns in the bank. columns are number of variables.org.jlab.jnp.hipo4.data.BankgetBank()bytegetByte(int element, int index) 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.doublegetDouble(int element, int index) double[]Returns a native array of doubles for given name.doublefloatgetFloat(int element, int index) float[]floatintgetInt(int element, int index) int[]intlonggetLong(int element, int index) long[]longshortgetShort(int element, int index) short[]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.voidsetByte(int element, byte[] arr) voidsetByte(int element, int row, byte value) voidvoidvoidsetDouble(int element, double[] arr) voidsetDouble(int element, int row, double value) voidAdds array of doubles into the bank under the name.voidvoidsetFloat(int element, float[] arr) voidsetFloat(int element, int row, float value) voidvoidvoidsetInt(int element, int[] arr) voidsetInt(int element, int row, int value) voidvoidvoidsetLong(int element, int row, long value) voidsetLong(int element, long[] arr) voidvoidvoidsetShort(int element, int row, short value) voidsetShort(int element, short[] arr) voidvoidvoidshow()Prints the content of the bank on the screen.
-
Constructor Details
-
HipoDataBank
public HipoDataBank(org.jlab.jnp.hipo4.data.Bank bank) -
HipoDataBank
-
-
Method Details
-
getBank
public org.jlab.jnp.hipo4.data.Bank getBank() -
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
-
getDouble
-
setDouble
-
setDouble
-
appendDouble
Description copied from interface:DataBankAppends an array to existing array with the same name. The resulting array will increase in size by arr.length.- Specified by:
appendDoublein interfaceDataBank- Parameters:
path- name of the variablearr- primitive type array of doubles.
-
getFloat
-
getFloat
-
setFloat
-
setFloat
-
appendFloat
- Specified by:
appendFloatin interfaceDataBank
-
getInt
-
getInt
-
setInt
-
setInt
-
appendInt
-
getShort
-
getShort
-
setShort
-
setShort
-
appendShort
- Specified by:
appendShortin interfaceDataBank
-
getLong
-
getLong
-
setLong
-
setLong
-
appendLong
- Specified by:
appendLongin interfaceDataBank
-
getByte
-
getByte
-
setByte
-
setByte
-
appendByte
- Specified by:
appendBytein interfaceDataBank
-
columns
-
rows
-
show
-
reset
-
allocate
-
getTableModel
Description copied from interface:DataBankReturns a table model for displaying the bank information- Specified by:
getTableModelin interfaceDataBank- Parameters:
mask-- Returns:
-
getByte
-
getShort
-
getInt
-
getLong
-
getFloat
-
getDouble
-
setFloat
public void setFloat(int element, float[] arr) -
setDouble
public void setDouble(int element, double[] arr) -
setByte
public void setByte(int element, byte[] arr) -
setShort
public void setShort(int element, short[] arr) -
setInt
public void setInt(int element, int[] arr) -
setLong
public void setLong(int element, long[] arr) -
setDouble
-
setFloat
-
setInt
-
setShort
-
setByte
-
setLong
-