Package gda.scan

Class DataPointCache

All Implemented Interfaces:
Configurable, Findable, IScanDataPointObserver, gda.observable.IObserver
Direct Known Subclasses:
ScanDataPointCache, SortedScanDataPointCache

public abstract class DataPointCache extends FindableConfigurableBase implements IScanDataPointObserver
Base class for IScanDataPoint caches. Initialises at the start of each scan and then adds each point in turn.
  • Constructor Details

    • DataPointCache

      public DataPointCache()
  • Method Details

    • getPositionsFor

      public abstract List<Double> getPositionsFor(String scannableName)
      Extract a list of values for the given field name from the cached data.
      Parameters:
      scannableName - The field name for which to extract data
      Returns:
      A list of positions for the given field
    • addDataPoint

      protected abstract void addDataPoint(IScanDataPoint sdp)
      Add a IScanDataPoint to this cache. This will be called whenever a data point is produced by the IScanDataPointProvider this is observing.
      Parameters:
      sdp - The new IScanDataPoint to cache
    • initialise

      protected void initialise(IScanDataPoint sdp)
      Run any initialisation required at the start of a scan. This will be called with the first point (where the currentPointNumber == 0) of each scan.
      Parameters:
      sdp - The first IScanDataPoint of the scan
    • update

      public void update(Object source, Object arg)
      Specified by:
      update in interface gda.observable.IObserver
    • configure

      public void configure()
      Description copied from class: ConfigurableBase
      Default implementation for classes that do not have to do any specific configuration.
      Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase