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
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckForCacheFile(String folder, String filename) intgetAutoRunNumber(String folder, String prefix) Get the next run number that can be used without causing a file writing clashprotected StringgetCacheFileName(String prefix) intgetLastRunNumber(String folder, String prefix) intgetManualRunNumber(String parentFolder, String prefix, int requested, int startImage, int endImage) protected intreadCacheFile(String folder, String cacheFilename) protected intscanDirForRunNumber(File[] files, String prefix) protected booleanscanForImageClashes(String prefix, int run, File[] files, int startImage, int endImage) protected voidwriteCacheFile(String folder, String filename, int run) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Field Details
-
OVERLAP_ERROR
- See Also:
-
OVERLAP_WARN
- See Also:
-
FOLDER_IS_FILE_FORMAT
- See Also:
-
-
Constructor Details
-
AutoRunNumberUtils
-
-
Method Details
-
getAutoRunNumber
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
-
checkForCacheFile
-
getCacheFileName
-
readCacheFile
- Throws:
IOException
-
writeCacheFile
- Throws:
IOException
-
scanDirForRunNumber
-
getLastRunNumber
- Returns:
- run number of last data collection or 0
- Throws:
IOException
-