Class TfgXmap

All Implemented Interfaces:
CounterTimer, Detector, Device, Scannable, Configurable, Findable, gda.observable.IObservable, Serializable
Direct Known Subclasses:
CallableTfgXmap

public class TfgXmap extends TFGCounterTimer
Represents a Tfg and XMap combination. Since the Tfg will generally also be part of a TfgScaler combination there is a slave mode. In this mode methods which set things on the Tfg do nothing.
See Also:
  • Constructor Details

    • TfgXmap

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

      public void setXmapName(String xspressSystemName)
      Set the Xspress system name
      Parameters:
      xspressSystemName - the Xspress system name
    • getXmapName

      public String getXmapName()
      Get the Xspress system name
      Returns:
      the Xspress system name.
    • getXmap

      public XmapDetector getXmap()
      Returns:
      Returns the xmap.
    • setXmap

      public void setXmap(XmapDetector xmap)
      Parameters:
      xmap - The xmap to set.
    • readout

      public double[] readout() throws DeviceException
      Description copied from interface: Detector
      Returns the latest data collected. The size of the Object returned must be consistent with the values returned by getDataDimensions and getExtraNames.

      If LocalProperties.GDA_SCAN_CONCURRENTSCAN_READOUT_CONCURRENTLY is true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. See Detector.waitWhileBusy() and ConcurrentScan. Readout must block until the detector is ready to respond quickly to Detector.collectData() again.

      Returns:
      the data collected
      Throws:
      DeviceException
    • getDataDimensions

      public int[] getDataDimensions() throws DeviceException
      Description copied from class: DetectorBase
      Default which should be overridden by subclasses.
      Specified by:
      getDataDimensions in interface Detector
      Overrides:
      getDataDimensions in class DetectorBase
      Returns:
      the dimensions of the data object returned by the Detector.readout() method
      Throws:
      DeviceException
      See Also:
    • collectData

      public void collectData() throws DeviceException
      Description copied from interface: Detector
      Tells the detector to begin to collect a set of data, then returns immediately. Should cause the hardware to start collecting immediately: if there is any delay then detectors used in the same scan would collect over different times when beam conditions may differ.
      Throws:
      DeviceException
    • 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:
    • readChannel

      public double[] readChannel(int startFrame, int frameCount, int channel) throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer read out a specified channel, beginning from the specified start frame number using the requested frame count.
      Parameters:
      startFrame - starting frame number (1st=0)
      frameCount - number of frames to read the counter data out from
      channel - read this channel
      Returns:
      array of requested readout counter-timer data
      Throws:
      DeviceException
    • readFrame

      public double[] readFrame(int startChannel, int channelCount, int frame) throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer read out a specified frame, beginning from the specified start channel number using the requested channel count.
      Parameters:
      startChannel - starting channel number (1st=0)
      channelCount - number of channels to read the counter data out from
      frame - read this frame
      Returns:
      array of requested readout counter-timer data
      Throws:
      DeviceException
    • 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:
    • start

      public void start() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer this initiates framing.
      Specified by:
      start in interface CounterTimer
      Overrides:
      start in class CounterTimerBase
      Throws:
      DeviceException
    • createsOwnFiles

      public boolean createsOwnFiles() throws DeviceException
      Description copied from interface: Detector
      Returns a value which indicates whether the detector creates its own files. If it does (return true) the readout() method returns the name of the latest file created as a string. If it does not (return false) the readout() method will return the data directly.
      Returns:
      true if readout() returns filenames
      Throws:
      DeviceException
    • getPosition

      public Object getPosition() throws DeviceException
      Override DetectorBase to work within scans
      Specified by:
      getPosition in interface Scannable
      Overrides:
      getPosition in class DetectorBase
      Returns:
      Current position with an element for each input and extra field. null if their are no fields.
      Throws:
      DeviceException
      See Also:
    • getInputNames

      public String[] getInputNames()
      Override ScannableBase to work within scans
      Specified by:
      getInputNames in interface Scannable
      Overrides:
      getInputNames in class ScannableBase
      Returns:
      array of the names of the elements of the object returned by getPosition
    • getDescription

      public String getDescription() throws DeviceException
      Specified by:
      getDescription in interface Detector
      Overrides:
      getDescription in class DetectorBase
      Returns:
      A description of the detector.
      Throws:
      DeviceException
    • getDetectorID

      public String getDetectorID() throws DeviceException
      Specified by:
      getDetectorID in interface Detector
      Overrides:
      getDetectorID in class DetectorBase
      Returns:
      A identifier for this detector.
      Throws:
      DeviceException
    • getDetectorType

      public String getDetectorType() throws DeviceException
      Specified by:
      getDetectorType in interface Detector
      Overrides:
      getDetectorType in class DetectorBase
      Returns:
      The type of detector.
      Throws:
      DeviceException
    • getMinimumReadoutDelay

      public int getMinimumReadoutDelay()
    • setMinimumReadoutDelay

      public void setMinimumReadoutDelay(int minimumReadoutDelay)
    • getCollectionModePV

      public String getCollectionModePV()
    • setCollectionModePV

      public void setCollectionModePV(String collectionModePV)