Interface DataWriter

All Known Subinterfaces:
ConfigurableAsciiFormat, INexusDataWriter
All Known Implementing Classes:
AsciiDataWriter, DatapointCompletingDataWriter, DataWriterBase, DummyDataWriter, EpicsCVscanDataWriter, IncrementalFile, MacDataWriter, NexusDataWriter, NexusExtraMetadataDataWriter, NexusScanDataWriter, SrsDataFile, XasAsciiDataWriter, XasAsciiNexusDatapointCompletingDataWriter, XasAsciiNexusDataWriter, XasNexusDataWriter

public interface DataWriter
Interface for objects which hold references to data.

The actions of these objects will be beamline dependent. Each DataWriter type is format specific.

The data handler could be used for more then writing data to an ascii file. It could be used to create new folders, determine file names etc. etc.

This class is normally client-side for use during scans. This should be taken into consideration whether to use this class to actually write files, or simply to hold file references.

  • Method Details

    • addData

      void addData(IScanDataPoint newData) throws Exception
      for incremental addition of data
      Parameters:
      newData - Object
      Throws:
      Exception
    • completeCollection

      void completeCollection() throws Exception
      Called when data collection has been completed
      Throws:
      Exception
    • getCurrentFileName

      String getCurrentFileName()
      Get the absFilePath for this scan
      Returns:
      String
    • getCurrentScanIdentifier

      int getCurrentScanIdentifier()
      Get the current scan identifier (ie scan number)
      Returns:
      String
    • getHeader

      ArrayList<String> getHeader()
      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.
      Returns:
      an ArrayList containing header information
    • setHeader

      void setHeader(String header)
      Sets the header of the datahandler
      Parameters:
      header - String
    • setHeader

      void setHeader(ArrayList<String> header)
      Sets the header of the datahandler
      Parameters:
      header - ArrayList
    • removeDataWriterExtender

      void removeDataWriterExtender(IDataWriterExtender dataWriterExtender)
      Remove a IDataWriterExtender to handle DataWriter events.
      Parameters:
      dataWriterExtender -
    • addDataWriterExtender

      void addDataWriterExtender(IDataWriterExtender dataWriterExtender)
      Adds an additional IDataWriterExtender to handle DataWriter events
      Parameters:
      dataWriterExtender -
    • configureScanNumber

      void configureScanNumber(int scanNumber) throws Exception
      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
      Parameters:
      scanNumber -
      Throws:
      Exception
    • scanStart

      default void scanStart(ScanInformation scanInfo, List<Scannable> scannables, List<Detector> detectors) throws Exception
      Called at the start of the scan with a ScanInformation object describing the scan (i.e. detector names, scannable names, scan dimensions) as well as the actual scannable and detector objects themselves
      Parameters:
      scanInfo - describes the scan
      scannables - the scannables in the scan
      detectors - the detectors in the scan
      Throws:
      Exception