Contents
Class EpicsSequence
java.lang.Object
org.jlab.detector.epics.EpicsSequence
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
int
protected int
findIndex
(int unixTime) get
(int unixTime) get
(org.jlab.jnp.hipo4.data.Event event) getElement
(int index) double
getIntegral
(String name, double defaultvalue) double
getIntegral
(String name, double defaultvalue, int t1, int t2) double
getMinimum
(String name, double defaultvalue, int unixtime) double
getMinimum
(String name, double defaultvalue, int t1, int t2) getSubList
(int t1, int t2) static void
void
static EpicsSequence
readSequence
(List<String> filenames) This reads tag=1 events for RAW::epics banks, and initializes and returns aEpicsSequence
that can be used to access the most recent epics readout for any given event.int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
Constructor Details
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Epics>
-
findIndex
protected int findIndex(int unixTime) -
add
-
getElement
- Parameters:
index
-- Returns:
- the Epics for the given index
-
get
- Parameters:
unixTime
- (i.e. RUN::config.timestamp)- Returns:
- the most recent Epics for the given timestamp
-
get
- Parameters:
event
-- Returns:
- the most recent Epics for the given event
-
getSubList
-
getIntegral
- Parameters:
name
- Epics variable namedefaultvalue
- Epics variable default valuet1
- lower limit of a Unix time intervalt2
- upper limit of a Unix time interval- Returns:
- integral of the chosen variable in the time interval
-
getIntegral
- Parameters:
name
- Epics variable namedefaultvalue
- Epics variable default value- Returns:
- integral of the chosen variable
-
getMinimum
- Parameters:
name
- Epics variable namedefaultvalue
- Epics variable default valuet1
- lower limit of a Unix time intervalt2
- upper limit of a Unix time interval- Returns:
- minimum of the chosen variable in the time interval
-
getMinimum
- Parameters:
name
- Epics variable namedefaultvalue
- Epics variable default valueunixtime
- Unix time- Returns:
- minimum of the chosen variable in -2s:+4s around the input time
-
print
-
readSequence
This reads tag=1 events for RAW::epics banks, and initializes and returns aEpicsSequence
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
public int size() -
main
-