Package gda.scan
Interface Scan
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
EnergyDispersiveExafsScan,IConcurrentScanChild,NestableScan
- All Known Implementing Classes:
AbstractContinuousScanLine,AsynchronousTimeScan,CentroidScan,ConcurrentScan,ConcurrentScanChild,ConstantVelocityRasterScan,ConstantVelocityScanLine,ContinuousScan,EdeScan,EdeScanWithTFGTrigger,GridScan,GridScanMoveToOnly,MultiRegionScan,MultiScan,MultiScanRunner,PassthroughScanAdapter,PointsScan,PseudoDeviceTimeScan,ScanBase,StaticScan,TestScan,TimeScan,TrajectoryScanLine,TurboXasScan,UndulatorTuningGridScan
Interface for all scans
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidThe method in which the work of the scan is performed.getChild()Returns the reference to the DataWriter that this scan is using.Returns the list of Detector objects which form part of the scan.intgetName()Return a unique identifier for this scan.Returns the ScanDataPoint pipeline.Returns the list of all the Scannable objects which are part of this scanintintbooleanisChild()Returns true if this scan is nested inside another scan.booleanvoidpause()pause the scans progressvoidCreates a dataHandler, waits until the baton is free and then claims it.voidSet this scan to complete current scan data point and complete normally without doing any further data points.voidresume()resume the scans progress after a pause has been calledvoidrun()allows the scan in its own thread.voidrunScan()Does the work of creating a new thread and calling the run() method.voidvoidGives the scan a reference to the DataWriter it should use to record data.voidsetDetectors(List<Detector> allDetectors) Sets the list of Detectors for this scan.voidsetIsChild(boolean child) Tells the scan if it is a child.voidsetScanDataPointPipeline(ScanDataPointPipeline scanDataPointPipeline) Sets the scan data point pipeline used to populate, write and broadcast ScanDataPoints.voidsetScannables(List<Scannable> allScannables) Sets the list of all the Scannable objects.voidsetScanPlotSettings(ScanPlotSettings scanPlotSettings) voidsetStepId(IScanStepId scanStepId)
-
Method Details
-
pause
void pause()pause the scans progress -
resume
void resume()resume the scans progress after a pause has been called -
run
allows the scan in its own thread. This should NOT be called directly otherwise this may cause thread handling issues and instability in the command server. runScan() should be called instead.- Throws:
Exception
-
runScan
Does the work of creating a new thread and calling the run() method. Inheriting classes may also declare a runScan method with arguments identical to their constructor. The convention would be to create a new scan object, and then call this runScan method.- Throws:
InterruptedExceptionException
-
doCollection
The method in which the work of the scan is performed. This method assumes that the data handler has already been created and the baton claimed.- Throws:
Exception
-
prepareForCollection
Creates a dataHandler, waits until the baton is free and then claims it. This should be performed once in a collection of scans, before any calls to doCollection().- Throws:
Exception
-
getScannables
Returns the list of all the Scannable objects which are part of this scan- Returns:
- Vector of Scannables
-
setScannables
Sets the list of all the Scannable objects. This should only be used for a parent scan giving its list to a child scan and not for setting up a scan (that work is done by ScanBase.setUp).- Parameters:
allScannables-
-
getDetectors
Returns the list of Detector objects which form part of the scan.- Returns:
- Vector of Detectors
-
setDetectors
Sets the list of Detectors for this scan.- Parameters:
allDetectors-- See Also:
-
isChild
boolean isChild()Returns true if this scan is nested inside another scan.- Returns:
- if this scan is a child
-
setIsChild
void setIsChild(boolean child) Tells the scan if it is a child.- Parameters:
child-
-
getDataWriter
DataWriter getDataWriter()Returns the reference to the DataWriter that this scan is using.- Returns:
- the DataWriter
-
setDataWriter
Gives the scan a reference to the DataWriter it should use to record data. This will create a new ScanDataPointPipeline appropriate for the Scannables to be scanned.- Parameters:
dh-
-
setScanDataPointPipeline
Sets the scan data point pipeline used to populate, write and broadcast ScanDataPoints. Should not normally be set directly except on a child (or sub) scan.- Parameters:
scanDataPointPipeline-
-
getScanDataPointPipeline
ScanDataPointPipeline getScanDataPointPipeline()Returns the ScanDataPoint pipeline. -
getName
String getName()Return a unique identifier for this scan. This is useful for plotting etc. The same id will be included in every ScanDataPoint sent out by the scan and will be the same for all the scans in a multiregion or mulit-dimensional scan.- Returns:
- String
-
getChild
Scan getChild()- Returns:
- The child scan if this scan is nested
-
setChild
- Parameters:
child- The child of this scan if this scan is nested
-
getStepId
IScanStepId getStepId()- Returns:
- The identifier of the current step. This is scan dependent and maybe null
-
setStepId
- Parameters:
scanStepId- The identifier of the current step. This is scan dependent and maybe null
-
setScanPlotSettings
-
getScanPlotSettings
ScanPlotSettings getScanPlotSettings()- Returns:
- Settings for plotting
-
getDimension
int getDimension()- Returns:
- the number of points of this scan object - the whole scan execution can be a hierarchy of parent scan objects and layers of child scan objects
-
getTotalNumberOfPoints
int getTotalNumberOfPoints()- Returns:
- the total number of nodes at which data will be collected in this scan. This includes all the dimensions in a multi-dimensional scan.
-
getScanNumber
int getScanNumber()- Returns:
- The unique id of the scan. Null if not set
-
requestFinishEarly
void requestFinishEarly()Set this scan to complete current scan data point and complete normally without doing any further data points. -
isFinishEarlyRequested
boolean isFinishEarlyRequested() -
getStatus
Scan.ScanStatus getStatus()- Returns:
- The
Scan.ScanStatus
-
getScanInformation
ScanInformation getScanInformation()
-