Class XmapFileUtils

java.lang.Object
gda.device.detector.xmap.XmapFileUtils

public final class XmapFileUtils extends Object
  • Method Details

    • waitForFileToBeReadable

      public static void waitForFileToBeReadable(String filename) throws DeviceException, InterruptedException
      Test that a file is available to be read and has been released by the Area Detector process writing it.
      Parameters:
      filename -
      Throws:
      DeviceException
      InterruptedException
    • convertPathFromWindows

      public static String convertPathFromWindows(String windowsPrefix, String windowsDir, String beamline)
      Convert path from windows XMap IOC to path to a dls data directory by replacing 'windowsPrefex' with path to data directory. i.e. X:/ with /dls/<beamline>/data. e.g.

      X:/2018/sp1234-5/temp/dir1/ --> /dls/b18/data/2018/sp1234-5/temp/dir1/

      Any backslashes are also replaced with forward slashes.

      Parameters:
      windowsPrefix -
      windowsDir -
      beamline -
      Returns:
      path to dls data directory for beamline
    • convertPathToWindows

      public static String convertPathToWindows(String windowsPrefix, String dlsDir, String beamline)
      Convert dls data directory path to windows path by replacing '/dls/<beamline>/data' with windowsPrefix. e.g.

      /dls/b18/data/2018/sp1234-5/temp/dir1/ --> X:/2018/sp1234-5/temp/dir1/ , (windowsPrefix = X:/) /dls/b18/data/2018/sp1234-5/temp/dir1/ --> X:/data/2018/sp1234-5/temp/dir1/ , (windowsPrefix = X:/data)

      Parameters:
      windowsPrefix -
      dlsDir - path to data directory (i.e. /dls//data/...)
      beamline -
      Returns:
      path to dls data directory for beamline