Package gda.scan

Interface Scan

All Superinterfaces:
Serializable
All Known Subinterfaces:
EnergyDispersiveExafsScan, IConcurrentScanChild, NestableScan
All Known Implementing Classes:
AbstractContinuousScanLine, AsynchronousTimeScan, CentroidScan, ConcurrentScan, ConcurrentScanChild, ConstantVelocityRasterScan, ConstantVelocityScanLine, ContinuousScan, EdeScan, EdeScanWithTFGTrigger, GridScan, GridScanMoveToOnly, MultiRegionScan, MultiScan, MultiScanRunner, PassthroughScanAdapter, PointsScan, PseudoDeviceTimeScan, ScanBase, StaticScan, TestScan, TimeScan, TrajectoryScanLine, TurboXasScan, UndulatorTuningGridScan

public interface Scan extends Serializable
Interface for all scans
  • Method Details

    • pause

      void pause()
      pause the scans progress
    • resume

      void resume()
      resume the scans progress after a pause has been called
    • run

      void run() throws Exception
      allows the scan in its own thread. This should NOT be called directly otherwise this may cause thread handling issues and instability in the command server. runScan() should be called instead.
      Throws:
      Exception
    • runScan

      void runScan() throws InterruptedException, Exception
      Does the work of creating a new thread and calling the run() method. Inheriting classes may also declare a runScan method with arguments identical to their constructor. The convention would be to create a new scan object, and then call this runScan method.
      Throws:
      InterruptedException
      Exception
    • doCollection

      void doCollection() throws Exception
      The method in which the work of the scan is performed. This method assumes that the data handler has already been created and the baton claimed.
      Throws:
      Exception
    • prepareForCollection

      void prepareForCollection() throws Exception
      Creates a dataHandler, waits until the baton is free and then claims it. This should be performed once in a collection of scans, before any calls to doCollection().
      Throws:
      Exception
    • getScannables

      List<Scannable> getScannables()
      Returns the list of all the Scannable objects which are part of this scan
      Returns:
      Vector of Scannables
    • setScannables

      void setScannables(List<Scannable> allScannables)
      Sets the list of all the Scannable objects. This should only be used for a parent scan giving its list to a child scan and not for setting up a scan (that work is done by ScanBase.setUp).
      Parameters:
      allScannables -
    • getDetectors

      List<Detector> getDetectors()
      Returns the list of Detector objects which form part of the scan.
      Returns:
      Vector of Detectors
    • setDetectors

      void setDetectors(List<Detector> allDetectors)
      Sets the list of Detectors for this scan.
      Parameters:
      allDetectors -
      See Also:
    • isChild

      boolean isChild()
      Returns true if this scan is nested inside another scan.
      Returns:
      if this scan is a child
    • setIsChild

      void setIsChild(boolean child)
      Tells the scan if it is a child.
      Parameters:
      child -
    • getDataWriter

      DataWriter getDataWriter()
      Returns the reference to the DataWriter that this scan is using.
      Returns:
      the DataWriter
    • setDataWriter

      void setDataWriter(DataWriter dh)
      Gives the scan a reference to the DataWriter it should use to record data. This will create a new ScanDataPointPipeline appropriate for the Scannables to be scanned.
      Parameters:
      dh -
    • setScanDataPointPipeline

      void setScanDataPointPipeline(ScanDataPointPipeline scanDataPointPipeline)
      Sets the scan data point pipeline used to populate, write and broadcast ScanDataPoints. Should not normally be set directly except on a child (or sub) scan.
      Parameters:
      scanDataPointPipeline -
    • getScanDataPointPipeline

      ScanDataPointPipeline getScanDataPointPipeline()
      Returns the ScanDataPoint pipeline.
    • getName

      String getName()
      Return a unique identifier for this scan. This is useful for plotting etc. The same id will be included in every ScanDataPoint sent out by the scan and will be the same for all the scans in a multiregion or mulit-dimensional scan.
      Returns:
      String
    • getChild

      Scan getChild()
      Returns:
      The child scan if this scan is nested
    • setChild

      void setChild(Scan child)
      Parameters:
      child - The child of this scan if this scan is nested
    • getStepId

      IScanStepId getStepId()
      Returns:
      The identifier of the current step. This is scan dependent and maybe null
    • setStepId

      void setStepId(IScanStepId scanStepId)
      Parameters:
      scanStepId - The identifier of the current step. This is scan dependent and maybe null
    • setScanPlotSettings

      void setScanPlotSettings(ScanPlotSettings scanPlotSettings)
    • getScanPlotSettings

      ScanPlotSettings getScanPlotSettings()
      Returns:
      Settings for plotting
    • getDimension

      int getDimension()
      Returns:
      the number of points of this scan object - the whole scan execution can be a hierarchy of parent scan objects and layers of child scan objects
    • getTotalNumberOfPoints

      int getTotalNumberOfPoints()
      Returns:
      the total number of nodes at which data will be collected in this scan. This includes all the dimensions in a multi-dimensional scan.
    • getScanNumber

      int getScanNumber()
      Returns:
      The unique id of the scan. Null if not set
    • requestFinishEarly

      void requestFinishEarly()
      Set this scan to complete current scan data point and complete normally without doing any further data points.
    • isFinishEarlyRequested

      boolean isFinishEarlyRequested()
    • getStatus

      Scan.ScanStatus getStatus()
      Returns:
      The Scan.ScanStatus
    • getScanInformation

      ScanInformation getScanInformation()