Class NexusScanFileManager
java.lang.Object
org.eclipse.scanning.sequencer.nexus.NexusScanFileManager
Builds and manages the NeXus file for a scan given a
ScanModel.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures thisNexusScanFileManagerwith the givenScanModel.createNexusFile(boolean async) Creates the nexus file.protected Map<NexusScanInfo.ScanRole, List<INexusDevice<?>>> extractNexusDevices(ScanModel model) voidFlushes any pending data into the nexus file.static StringThe file paths of all the external files written to during this scan.protected int[]getOuterScanShape(ScanModel scanModel) booleanReturns whether this nexus file manager actually writes a nexus files.voidInforms the manager that the scan has finished.
-
Constructor Details
-
NexusScanFileManager
-
-
Method Details
-
configure
Configures thisNexusScanFileManagerwith the givenScanModel. This determines the structure of the nexus file that will be created whencreateNexusFile(boolean)is called.- Parameters:
scanModel- theScanModeldescribing the scan- Throws:
ScanningException
-
getEntryName
-
getOuterScanShape
- Throws:
ScanningException
-
extractNexusDevices
-
createNexusFile
Creates the nexus file. The structure of the nexus file is determined by the devices contained within theScanModelthatconfigure(ScanModel)was previously called with.- Throws:
ScanningException- if the nexus file could not be created for any reason
-
flushNexusFile
Flushes any pending data into the nexus file.- Throws:
ScanningException
-
scanFinished
Informs the manager that the scan has finished. This will cause the scanFinished dataset to be updated and the nexus file to be closed.- Throws:
ScanningException
-
isNexusWritingEnabled
public boolean isNexusWritingEnabled()Returns whether this nexus file manager actually writes a nexus files.- Returns:
trueif a nexus file is written,falseotherwise
-
getExternalFilePaths
The file paths of all the external files written to during this scan. For example, this may be used to trigger archiving.- Returns:
- file paths of external files written to during this scan, never
null
-