Class XesSpectrometerCrystal

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

public class XesSpectrometerCrystal extends ScannableGroup
This extension of ScannableGroup is intended to group together scannables relevant for controlling a single crystal in XesSpectrometerScannable.
  • Scannables for the x, y, rotation and pitch are set by calls to setxMotor(Scannable), setyMotor(Scannable), setRotMotor(Scannable) and setPitchMotor(Scannable).
  • The horizontal index of the crystal is set by setHorizontalIndex(int). This defines the crystal position in the spectrometer relative to the central position (i.e. 0 corresponds to the central crystal, +-1 for the crystals either side of the centre etc).
    There is also an 'allowedToMove' flag set by calling setAllowedToMove(boolean). If 'allowedToMove' is set to true, the scannable will behave as a normal ScannableGroup. If it is set to false then :
  • None of the scannables in the group will move when asynchronousMoveTo is called.
  • isBusy() will return false, and stop() will do nothing.
    • Constructor Details

      • XesSpectrometerCrystal

        public XesSpectrometerCrystal()
    • Method Details

      • configure

        public void configure() throws FactoryException
        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 ScannableGroup
        Throws:
        FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
      • asynchronousMoveTo

        public void asynchronousMoveTo(Object position) throws DeviceException
        Description copied from class: ScannableBase
        Trigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.
        Specified by:
        asynchronousMoveTo in interface Scannable
        Overrides:
        asynchronousMoveTo in class ScannableGroup
        Parameters:
        position - Position to move to should have an element for each input field.
        Throws:
        DeviceException
      • isBusy

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

        public void stop() throws DeviceException
        Description copied from class: ScannableBase
        Stop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
        Specified by:
        stop in interface Scannable
        Overrides:
        stop in class ScannableGroup
        Throws:
        DeviceException
        See Also:
      • setAllowedToMove

        public void setAllowedToMove(boolean isAllowedToMove)
      • isAllowedToMove

        public boolean isAllowedToMove()
      • getHorizontalIndex

        public int getHorizontalIndex()
      • setHorizontalIndex

        public void setHorizontalIndex(int horizontalIndex)
      • getxMotor

        public Scannable getxMotor()
      • setxMotor

        public void setxMotor(Scannable xMotor)
      • getyMotor

        public Scannable getyMotor()
      • setyMotor

        public void setyMotor(Scannable yMotor)
      • getPitchMotor

        public Scannable getPitchMotor()
      • setPitchMotor

        public void setPitchMotor(Scannable pitchMotor)
      • getRotMotor

        public Scannable getRotMotor()
      • setRotMotor

        public void setRotMotor(Scannable rotMotor)