Package org.eclipse.dawnsci.nexus.scan
Interface NexusScanFile
public interface NexusScanFile
An instance of this interface encapsulates a nexus file as defined by a
NexusScanModel.-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateNexusFile(boolean async) Create the structure of the nexus file according to theNexusScanModelthat thisNexusScanFilewas created with and writes it to disk.voidcreateNexusFile(boolean async, boolean useSwmr) Create the structure of the nexus file according to theNexusScanModelthat thisNexusScanFilewas created with and writes it to disk.intflush()Flush the underlying nexus fileReturns the set of file paths of the external file that this scan file links to.Returns the absolute file path of the underlyingNexusFileon diskReturns theNexusObjectProviders for this scan file, grouped byNexusScanInfo.ScanRole.Returns theNexusScanModeldefining the scan for this scan file.voidCall at the end of the scan to write the final timestamps and close the nexus file.
-
Method Details
-
getFilePath
String getFilePath()Returns the absolute file path of the underlyingNexusFileon disk- Returns:
-
getNexusScanModel
NexusScanModel getNexusScanModel()Returns theNexusScanModeldefining the scan for this scan file.- Returns:
-
getNexusObjectProviders
Map<NexusScanInfo.ScanRole,List<NexusObjectProvider<?>>> getNexusObjectProviders()Returns theNexusObjectProviders for this scan file, grouped byNexusScanInfo.ScanRole. These are extracted from theINexusDevices when thisNexusScanFileis created.- Returns:
-
getExternalFilePaths
Returns the set of file paths of the external file that this scan file links to.- Returns:
- external file paths
-
createNexusFile
Create the structure of the nexus file according to theNexusScanModelthat thisNexusScanFilewas created with and writes it to disk. This method always opens the file in SWMR mode. This means that the structure of the file cannot be chaned- Parameters:
async- iftrueall writes to datasets are done asynchronously- Throws:
NexusException- if the nexus file could not be created for any reason
-
createNexusFile
Create the structure of the nexus file according to theNexusScanModelthat thisNexusScanFilewas created with and writes it to disk.- Parameters:
async- iftrueall writes to datasets are done asynchronously- Throws:
NexusException- if the nexus file could not be created for any reason
-
flush
Flush the underlying nexus file- Returns:
- Throws:
NexusException
-
scanFinished
Call at the end of the scan to write the final timestamps and close the nexus file.- Throws:
NexusException
-