Class BeamlineConditionMonitorBase

All Implemented Interfaces:
Device, Scannable, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
BeamMonitor, CheckingScannable, DetectorFillingMonitorScannable, PVConditionMonitorBase, TopupChecker

public abstract class BeamlineConditionMonitorBase extends ScannableBase
A base class for zero-input, zero-output scannables whose job is to automatically pause a scan if some condition is met (say port shutter closed due to a beam dump) and resume when that condition has passed.

This provides such scannables with a way to ignore that condition when the machine is not running e.g. on machine development days (Tuesdays) or shutdowns. So these scannables may be always added to the list of default scannables and used in every scan.

  • Constructor Details

    • BeamlineConditionMonitorBase

      public BeamlineConditionMonitorBase()
  • Method Details

    • atScanStart

      public void atScanStart() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atScanStart in interface Scannable
      Overrides:
      atScanStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atPointStart

      public void atPointStart() throws DeviceException
      Description copied from class: ScannableBase
      Called on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atPointStart in interface Scannable
      Overrides:
      atPointStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atScanLineStart

      public void atScanLineStart() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atScanLineStart in interface Scannable
      Overrides:
      atScanLineStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • rawGetPosition

      public Object rawGetPosition() throws DeviceException
      Description copied from class: ScannableBase
      [Consider abstract] Read the position in its internal (user) representation.
      Overrides:
      rawGetPosition in class ScannableBase
      Returns:
      the value represented by this Scannable
      Throws:
      DeviceException
      See Also:
    • rawAsynchronousMoveTo

      public void rawAsynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: ScannableBase
      [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.
      Overrides:
      rawAsynchronousMoveTo in class ScannableBase
      Parameters:
      position - Position in its internal/hardware representation. e.g. with units and offsets removed
      Throws:
      DeviceException
      See Also:
    • testShouldPause

      protected abstract void testShouldPause() throws DeviceException
      The test is performed inside this method. An inheriting class could either wait inside this method until the condition has passed, or throw an Exception to end the scan, or throw a RedoScanLineThrowable to repeat the current scan.
      Throws:
      DeviceException
      See Also:
    • machineIsRunning

      protected boolean machineIsRunning() throws DeviceException
      Returns false if not in a real running mode.
      Returns:
      true if user mode, so this object should operate.
      Throws:
      DeviceException
    • sendAndPrintMessage

      protected void sendAndPrintMessage(String message)
    • getMachineModeMonitor

      public Scannable getMachineModeMonitor()
    • setMachineModeMonitor

      public void setMachineModeMonitor(Scannable machineModeMonitor)
    • isBusy

      public boolean isBusy() throws DeviceException
      Description copied from interface: Scannable
      Check if the Scannable is moving/operating.
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException
    • isPauseBeforeLine

      public boolean isPauseBeforeLine()
    • isPauseBeforeScan

      public boolean isPauseBeforeScan()
    • setPauseBeforeScan

      public void setPauseBeforeScan(boolean pauseBeforeScan)
    • setPauseBeforeLine

      public void setPauseBeforeLine(boolean pauseBeforeLine)
    • isPauseBeforePoint

      public boolean isPauseBeforePoint()
    • setPauseBeforePoint

      public void setPauseBeforePoint(boolean pauseBeforePoint)