Class TopupChecker

All Implemented Interfaces:
Device, Scannable, Configurable, Findable, gda.observable.IObservable

public class TopupChecker extends BeamlineConditionMonitorBase
Scannable which will pause the scan if a machine top-up is imminent.

This must be given a Monitor object which returns the time in seconds until the next top-up, 0 if top-up in progress.

This replaces earlier classes which were not unit-testable.

  • Constructor Details

    • TopupChecker

      public TopupChecker()
  • Method Details

    • topupImminent

      public Boolean topupImminent() throws DeviceException
      Throws:
      DeviceException
    • testShouldPause

      protected void testShouldPause() throws DeviceException
      protected so this method may be overridden
      Specified by:
      testShouldPause in class BeamlineConditionMonitorBase
      Throws:
      DeviceException
      See Also:
    • getTolerance

      public double getTolerance()
    • setTolerance

      public void setTolerance(double scannableTolerance)
      Sets the tolerance time in seconds. This is an extra 'fudge factor' to use on top of the data collection time to create the time before which the topup the scan will be paused. This tolerance time would be fixed for the beamline, whereas the collection time would vary for each scan.
      Parameters:
      scannableTolerance -
    • getScannableToBeMonitored

      public Monitor getScannableToBeMonitored()
    • setScannableToBeMonitored

      public void setScannableToBeMonitored(Monitor scannableToBeMonitored)
    • setCollectionTime

      public void setCollectionTime(double collectionTime)
      The data collection time to protect from topups using this scannable.
      Parameters:
      collectionTime -
    • getCollectionTime

      public double getCollectionTime()
    • getTimeout

      public double getTimeout()
      Returns:
      the timeout in seconds to wait for the topup to finish
    • setTimeout

      public void setTimeout(double timeout)
    • getWaittime

      public double getWaittime()
      Returns:
      the waittime after data collection can resume to allow beam to stabilise.
    • setWaittime

      public void setWaittime(double waittime)