Class EpicsSequence

java.lang.Object
org.jlab.detector.epics.EpicsSequence
All Implemented Interfaces:
Comparator<Epics>

public class EpicsSequence extends Object implements Comparator<Epics>
For easy access to most recent epics readout for any given event. See the main() method for example use case, where only the 2 lines marked with "!!!" are specific to accessing epics information.
Author:
baltzell, devita
  • Field Details Link icon

  • Constructor Details Link icon

    • EpicsSequence Link icon

      public EpicsSequence()
  • Method Details Link icon

    • compare Link icon

      public int compare(Epics o1, Epics o2)
      Specified by:
      compare in interface Comparator<Epics>
    • findIndex Link icon

      protected int findIndex(int unixTime)
    • add Link icon

      protected boolean add(Epics de)
    • getElement Link icon

      public Epics getElement(int index)
      Parameters:
      index -
      Returns:
      the Epics for the given index
    • get Link icon

      public Epics get(int unixTime)
      Parameters:
      unixTime - (i.e. RUN::config.timestamp)
      Returns:
      the most recent Epics for the given timestamp
    • get Link icon

      public Epics get(org.jlab.jnp.hipo4.data.Event event)
      Parameters:
      event -
      Returns:
      the most recent Epics for the given event
    • getSubList Link icon

      public List<Epics> getSubList(int t1, int t2)
      Parameters:
      t1 - lower limit of a Unix time interval
      t2 - upper limit of a Unix time interval
      Returns:
      subset of sequence entries in the interval
    • getIntegral Link icon

      public double getIntegral(String name, double defaultvalue, int t1, int t2)
      Parameters:
      name - Epics variable name
      defaultvalue - Epics variable default value
      t1 - lower limit of a Unix time interval
      t2 - upper limit of a Unix time interval
      Returns:
      integral of the chosen variable in the time interval
    • getIntegral Link icon

      public double getIntegral(String name, double defaultvalue)
      Parameters:
      name - Epics variable name
      defaultvalue - Epics variable default value
      Returns:
      integral of the chosen variable
    • getMinimum Link icon

      public double getMinimum(String name, double defaultvalue, int t1, int t2)
      Parameters:
      name - Epics variable name
      defaultvalue - Epics variable default value
      t1 - lower limit of a Unix time interval
      t2 - upper limit of a Unix time interval
      Returns:
      minimum of the chosen variable in the time interval
    • getMinimum Link icon

      public double getMinimum(String name, double defaultvalue, int unixtime)
      Parameters:
      name - Epics variable name
      defaultvalue - Epics variable default value
      unixtime - Unix time
      Returns:
      minimum of the chosen variable in -2s:+4s around the input time
    • print Link icon

      public void print(String name)
    • readSequence Link icon

      public static EpicsSequence readSequence(List<String> filenames)
      This reads tag=1 events for RAW::epics banks, and initializes and returns a EpicsSequence that can be used to access the most recent epics readout for any given event.
      Parameters:
      filenames - list of names of HIPO files to read
      Returns:
      sequence
    • size Link icon

      public int size()
    • main Link icon

      public static void main(String[] args)