Contents
Class DaqScalersSequence
java.lang.Object
org.jlab.detector.scalers.DaqScalersSequence
- All Implemented Interfaces:
Comparator<DaqScalers>
For easy access to most recent scaler readout for any given event.
See the main() method for example use case, where only the 2 lines
marked with "!!!" are specific to accessing scalers.
- Author:
- baltzell
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
add
(DaqScalers ds) int
compare
(DaqScalers o1, DaqScalers o2) protected int
findIndex
(long timestamp) get
(long timestamp) get
(org.jlab.jnp.hipo4.data.Event event) getInterval
(long timestamp) getInterval
(long t1, long t2) getInterval
(org.jlab.jnp.hipo4.data.Event event) getInterval
(org.jlab.jnp.hipo4.data.Event event1, org.jlab.jnp.hipo4.data.Event event2) static void
static DaqScalersSequence
readSequence
(List<String> filenames) This reads tag=1 events for RUN::scaler banks, and initializes and returns aDaqScalersSequence
that can be used to access the most recent scaler readout for any given event.static DaqScalersSequence
rebuildSequence
(int tags, ConstantsManager conman, List<String> filenames) 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<DaqScalers>
-
findIndex
protected int findIndex(long timestamp) -
add
-
get
- Parameters:
timestamp
- TI timestamp (i.e. RUN::config.timestamp)- Returns:
- the most recent DaqScalers for the given timestamp
-
get
- Parameters:
event
-- Returns:
- the most recent DaqScalers for the given event
-
getInterval
- Returns:
- largest available interval of scaler readings
-
getInterval
- Parameters:
timestamp
- TI timestamp (i.e. RUN::config.timestamp)- Returns:
- smallest interval of scaler readings around that timestamp
-
getInterval
- Parameters:
event
-- Returns:
- smallest interval of scaler readings around that event
-
getInterval
- Parameters:
t1
- first TI timestamp (i.e. RUN::config.timestamp)t2
- second TI timestamp- Returns:
- smallest interval of scaler readings around those timestamps
-
getInterval
public DaqScalersSequence.Interval getInterval(org.jlab.jnp.hipo4.data.Event event1, org.jlab.jnp.hipo4.data.Event event2) - Parameters:
event1
- first eventevent2
- second event- Returns:
- smallest interval of scaler readings around those events
-
readSequence
This reads tag=1 events for RUN::scaler banks, and initializes and returns aDaqScalersSequence
that can be used to access the most recent scaler readout for any given event.- Parameters:
filenames
- list of names of HIPO files to read- Returns:
- sequence
-
rebuildSequence
public static DaqScalersSequence rebuildSequence(int tags, ConstantsManager conman, List<String> filenames) - Parameters:
tags
-conman
-filenames
-- Returns:
-
main
-