Class MonitorZebraAndMoveScannable

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

public class MonitorZebraAndMoveScannable extends ScannableBase
Class that monitors the number of captured pulses on Zebra and moves a scannable to positions after certain numbers of spectra have been captured.
  • Set the scannable to be moved using setScannableToMove(Scannable).
  • Add position to move scannable to at end of a spectrum using addPositionForSpectrum(Integer, Object).
  • The spectrum number - position Map is maintained in order of ascending spectrum number and has one position per spectrum. (i.e. adding a new position with same spectrum number as already in the map will overwrite it).

    • Constructor Details

      • MonitorZebraAndMoveScannable

        public MonitorZebraAndMoveScannable()
    • Method Details

      • atScanLineStart

        public void atScanLineStart()
        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
        See Also:
      • setNumReadoutsPerSpectrum

        public void setNumReadoutsPerSpectrum(int numReadoutsPerSpectrum)
      • startRunning

        public void startRunning()
        Loop over positionForSpectrumMap and for each entry wait for required number of spectra (pulses) to be captured on Zebra, then move the scannable to the requested position.
      • 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
      • getScannableToMove

        public Scannable getScannableToMove()
      • setScannableToMove

        public void setScannableToMove(Scannable scannableToMove)
      • getPositionForSpectrumMap

        public SortedMap<Integer,Object> getPositionForSpectrumMap()
      • setPositionForSpectrumMap

        public void setPositionForSpectrumMap(SortedMap<Integer,Object> positionForSpectrumMap)
      • addPositionForSpectrum

        public void addPositionForSpectrum(Integer spectrum, Object position)
        Add a position to be moved to at end of a spectrum.
        Parameters:
        spectrum -
        position -
      • getZebra

        public Zebra getZebra()
      • setZebra

        public void setZebra(Zebra zebra)
      • getTimeOutSeconds

        public int getTimeOutSeconds()
      • setTimeOutSeconds

        public void setTimeOutSeconds(int timeOutSeconds)