Class XasAsciiNexusDatapointCompletingDataWriter

java.lang.Object
gda.data.scan.datawriter.XasAsciiNexusDatapointCompletingDataWriter
All Implemented Interfaces:
DataWriter

public class XasAsciiNexusDatapointCompletingDataWriter extends Object implements DataWriter
For use in two-directional raster scans (faster raster or raster-map-return-write).

This 'flips' (changes the data point number) and buffers the data points from the odd numbered rows which run in the returning direction. It then issues the data points in the normal order as if this was a regular two dimensional scan and the data points have the correct numbering.

  • Constructor Details

    • XasAsciiNexusDatapointCompletingDataWriter

      public XasAsciiNexusDatapointCompletingDataWriter()
  • Method Details

    • addData

      public void addData(IScanDataPoint point) throws Exception
      Description copied from interface: DataWriter
      for incremental addition of data
      Specified by:
      addData in interface DataWriter
      Parameters:
      point - Object
      Throws:
      Exception
    • getIndexer

      public TwoDScanRowReverser getIndexer()
    • setIndexer

      public void setIndexer(TwoDScanRowReverser indexer)
    • addDataWriterExtender

      public void addDataWriterExtender(IDataWriterExtender dataWriterExtender)
      Description copied from interface: DataWriter
      Adds an additional IDataWriterExtender to handle DataWriter events
      Specified by:
      addDataWriterExtender in interface DataWriter
      Parameters:
      dataWriterExtender -
    • completeCollection

      public void completeCollection() throws Exception
      Description copied from interface: DataWriter
      Called when data collection has been completed
      Specified by:
      completeCollection in interface DataWriter
      Throws:
      Exception
    • completeCollection

      public void completeCollection(IDataWriterExtender parent)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getCurrentFileName

      public String getCurrentFileName()
      Description copied from interface: DataWriter
      Get the absFilePath for this scan
      Specified by:
      getCurrentFileName in interface DataWriter
      Returns:
      String
    • getCurrentScanIdentifier

      public int getCurrentScanIdentifier()
      Description copied from interface: DataWriter
      Get the current scan identifier (ie scan number)
      Specified by:
      getCurrentScanIdentifier in interface DataWriter
      Returns:
      String
    • getDatawriter

      public DataWriter getDatawriter()
    • getHeader

      public ArrayList<String> getHeader()
      Description copied from interface: DataWriter
      header is a publicly accessible string which will be written to the file (or saved to a database) during the prepareForCollection method. Before this method is called, the header object may be added to using these accessor methods.
      Specified by:
      getHeader in interface DataWriter
      Returns:
      an ArrayList containing header information
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • removeDataWriterExtender

      public void removeDataWriterExtender(IDataWriterExtender dataWriterExtender)
      Description copied from interface: DataWriter
      Remove a IDataWriterExtender to handle DataWriter events.
      Specified by:
      removeDataWriterExtender in interface DataWriter
      Parameters:
      dataWriterExtender -
    • setDatawriter

      public void setDatawriter(DataWriter datawriter)
    • setHeader

      public void setHeader(ArrayList<String> header)
      Description copied from interface: DataWriter
      Sets the header of the datahandler
      Specified by:
      setHeader in interface DataWriter
      Parameters:
      header - ArrayList
    • setHeader

      public void setHeader(String header)
      Description copied from interface: DataWriter
      Sets the header of the datahandler
      Specified by:
      setHeader in interface DataWriter
      Parameters:
      header - String
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getXasDataWriter

      public XasAsciiNexusDataWriter getXasDataWriter()
      The underlying data writer which will create the Nexus and Ascii files. The same used in other scans.

      Access is provided to enable extra settings to be made on this object.

      Returns:
      XasAsciiNexusDataWriter
    • configureScanNumber

      public void configureScanNumber(int scanNumber) throws Exception
      Description copied from interface: DataWriter
      method used to allow filewriter to configure the scanNumber based on the supplied value or internally if null It is called by the ScanBase.prepareScanForCollection
      Specified by:
      configureScanNumber in interface DataWriter
      Parameters:
      scanNumber -
      Throws:
      Exception