Class DatabaseConstantProvider

java.lang.Object
org.jlab.detector.calib.utils.DatabaseConstantProvider
All Implemented Interfaces:
ConstantProvider

public class DatabaseConstantProvider extends Object implements ConstantProvider
Author:
gavalian
  • Field Details Link icon

  • Constructor Details Link icon

    • DatabaseConstantProvider Link icon

      public DatabaseConstantProvider()
    • DatabaseConstantProvider Link icon

      public DatabaseConstantProvider(int run, String var)
    • DatabaseConstantProvider Link icon

      public DatabaseConstantProvider(int run, String var, String timestamp)
    • DatabaseConstantProvider Link icon

      public DatabaseConstantProvider(String address)
    • DatabaseConstantProvider Link icon

      public DatabaseConstantProvider(String address, String var)
  • Method Details Link icon

    • getEntrySet Link icon

      public Set<String> getEntrySet()
    • setTimeStamp Link icon

      public final void setTimeStamp(String timestamp)
    • readConstants Link icon

      public CalibrationConstants readConstants(String table_name, int nindex)
      Reads calibration constants for given table in the database.
      Parameters:
      table_name -
      nindex -
      Returns:
    • readConstants Link icon

      public CalibrationConstants readConstants(String table_name)
    • readTable Link icon

      public IndexedTable readTable(String table_name)
    • readTable Link icon

      public IndexedTable readTable(String table_name, int nindex)
    • loadTable Link icon

      public void loadTable(String table_name)
    • loadTables Link icon

      public void loadTables(String... tbl)
    • hasConstant Link icon

      public boolean hasConstant(String string)
      Description copied from interface: ConstantProvider
      Returns true if this ConstantProvider contains an entry for the given key string.
      Specified by:
      hasConstant in interface ConstantProvider
      Parameters:
      string - the key string
      Returns:
      true if the ConstnatProvider contains the given key string
    • length Link icon

      public int length(String string)
      Description copied from interface: ConstantProvider
      Returns the number of rows associated with the given key string or 0 if the ConstantProvider does not contain the key string.
      Specified by:
      length in interface ConstantProvider
      Parameters:
      string - the key string
      Returns:
      the number of rows for the key string or 0
    • getDouble Link icon

      public double getDouble(String string, int i)
      Description copied from interface: ConstantProvider
      Returns 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:
      getDouble in interface ConstantProvider
      Parameters:
      string - the key string
      i - the row index
      Returns:
      the double value for the given row associated with the given key string or 0
    • getInteger Link icon

      public int getInteger(String string, int i)
      Description copied from interface: ConstantProvider
      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.
      Specified by:
      getInteger in interface ConstantProvider
      Parameters:
      string - the key string
      i - the row index
      Returns:
      the integer value for the given row associated with the given key string or 0
    • getString Link icon

      public String getString(String string, int i)
    • disconnect Link icon

      public void disconnect()
    • show Link icon

      public void show()
      prints out table with loaded values.
    • showString Link icon

      public String showString()
      returns a string representing a table printout of the constants
      Returns:
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • clear Link icon

      public void clear()
    • getSize Link icon

      public int getSize()
    • getSize Link icon

      public int getSize(String name)
    • main Link icon

      public static void main(String[] args)