Package gda.px.pxgen

Class AutoRunNumberUtils

java.lang.Object
gda.factory.FindableBase
gda.px.pxgen.AutoRunNumberUtils
All Implemented Interfaces:
Findable, Serializable
Direct Known Subclasses:
EigerAutoRunNumberUtils, FluoAutoRunNumberUtils

public class AutoRunNumberUtils extends FindableBase implements Serializable
See Also:
  • Field Details

  • Constructor Details

    • AutoRunNumberUtils

      public AutoRunNumberUtils(String suffix)
  • Method Details

    • getAutoRunNumber

      public int getAutoRunNumber(String folder, String prefix) throws IOException
      Get the next run number that can be used without causing a file writing clash
      Returns:
      automatically determined run number
      Throws:
      IOException
    • getManualRunNumber

      public int getManualRunNumber(String parentFolder, String prefix, int requested, int startImage, int endImage) throws IOException
      Throws:
      IOException
    • scanForImageClashes

      protected boolean scanForImageClashes(String prefix, int run, File[] files, int startImage, int endImage)
    • checkForCacheFile

      protected boolean checkForCacheFile(String folder, String filename)
    • getCacheFileName

      protected String getCacheFileName(String prefix)
    • readCacheFile

      protected int readCacheFile(String folder, String cacheFilename) throws IOException
      Throws:
      IOException
    • writeCacheFile

      protected void writeCacheFile(String folder, String filename, int run) throws IOException
      Throws:
      IOException
    • scanDirForRunNumber

      protected int scanDirForRunNumber(File[] files, String prefix)
    • getLastRunNumber

      public int getLastRunNumber(String folder, String prefix) throws IOException
      Returns:
      run number of last data collection or 0
      Throws:
      IOException