Package org.jlab.detector.calib.utils
Class DatabaseConstantProvider
java.lang.Object
org.jlab.detector.calib.utils.DatabaseConstantProvider
- All Implemented Interfaces:
ConstantProvider
- Author:
- gavalian
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseConstantProvider(int run, String var) DatabaseConstantProvider(int run, String var, String timestamp) DatabaseConstantProvider(String address) DatabaseConstantProvider(String address, String var) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddoubleReturns the double value for the given row associated with the given key string or 0 if the ConstnatProvider does not contain the key string, the key string does not have value at the specified row index, or the value at the specified row index is an integer.intgetInteger(String string, int i) Returns the integer value for the given row associated with the given key string or 0 if the ConstnatProvider does not contain the key string, the key string does not have value at the specified row index, or the value at the specified row index is an double.intgetSize()intbooleanhasConstant(String string) Returns true if this ConstantProvider contains an entry for the given key string.intReturns the number of rows associated with the given key string or 0 if the ConstantProvider does not contain the key string.voidvoidloadTables(String... tbl) static voidreadConstants(String table_name) readConstants(String table_name, int nindex) Reads calibration constants for given table in the database.final voidsetTimeStamp(String timestamp) voidshow()prints out table with loaded values.returns a string representing a table printout of the constantstoString()
-
Field Details
-
DEFAULT_INDICES
public static final int DEFAULT_INDICES- See Also:
-
DEFAULT_ADDRESS
- See Also:
-
-
Constructor Details
-
DatabaseConstantProvider
public DatabaseConstantProvider() -
DatabaseConstantProvider
-
DatabaseConstantProvider
-
DatabaseConstantProvider
-
DatabaseConstantProvider
-
-
Method Details
-
getEntrySet
-
setTimeStamp
-
readConstants
Reads calibration constants for given table in the database.- Parameters:
table_name-nindex-- Returns:
-
readConstants
-
readTable
-
readTable
-
loadTable
-
loadTables
-
hasConstant
Description copied from interface:ConstantProviderReturns true if this ConstantProvider contains an entry for the given key string.- Specified by:
hasConstantin interfaceConstantProvider- Parameters:
string- the key string- Returns:
- true if the ConstnatProvider contains the given key string
-
length
Description copied from interface:ConstantProviderReturns the number of rows associated with the given key string or 0 if the ConstantProvider does not contain the key string.- Specified by:
lengthin interfaceConstantProvider- Parameters:
string- the key string- Returns:
- the number of rows for the key string or 0
-
getDouble
Description copied from interface:ConstantProviderReturns the double value for the given row associated with the given key string or 0 if the ConstnatProvider does not contain the key string, the key string does not have value at the specified row index, or the value at the specified row index is an integer.- Specified by:
getDoublein interfaceConstantProvider- Parameters:
string- the key stringi- the row index- Returns:
- the double value for the given row associated with the given key string or 0
-
getInteger
Description copied from interface:ConstantProviderReturns the integer value for the given row associated with the given key string or 0 if the ConstnatProvider does not contain the key string, the key string does not have value at the specified row index, or the value at the specified row index is an double.- Specified by:
getIntegerin interfaceConstantProvider- Parameters:
string- the key stringi- the row index- Returns:
- the integer value for the given row associated with the given key string or 0
-
getString
-
disconnect
public void disconnect() -
show
public void show()prints out table with loaded values. -
showString
returns a string representing a table printout of the constants- Returns:
-
toString
-
clear
public void clear() -
getSize
public int getSize() -
getSize
-
main
-