Package gda.scan
Class PassthroughScanAdapter
java.lang.Object
gda.scan.PassthroughScanAdapter
- All Implemented Interfaces:
NestableScan,Scan,ScanChild,Serializable
- Direct Known Subclasses:
PointsScan
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface gda.scan.Scan
Scan.ScanStatus -
Constructor Summary
Constructors -
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.voidsetParent(NestableScan parent) 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) voidsetStatus(Scan.ScanStatus status) voidsetStepId(IScanStepId scanStepId)
-
Constructor Details
-
PassthroughScanAdapter
-
-
Method Details
-
pause
public void pause()Description copied from interface:Scanpause the scans progress -
resume
public void resume()Description copied from interface:Scanresume the scans progress after a pause has been called -
run
Description copied from interface:Scanallows 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. -
runScan
Description copied from interface:ScanDoes 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.- Specified by:
runScanin interfaceScan- Throws:
InterruptedExceptionException
-
doCollection
Description copied from interface:ScanThe 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.- Specified by:
doCollectionin interfaceScan- Throws:
Exception
-
prepareForCollection
Description copied from interface:ScanCreates 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().- Specified by:
prepareForCollectionin interfaceScan- Throws:
Exception
-
getScannables
Description copied from interface:ScanReturns the list of all the Scannable objects which are part of this scan- Specified by:
getScannablesin interfaceScan- Returns:
- Vector of Scannables
-
setScannables
Description copied from interface:ScanSets 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).- Specified by:
setScannablesin interfaceScan- Parameters:
allScannables-
-
getDetectors
Description copied from interface:ScanReturns the list of Detector objects which form part of the scan.- Specified by:
getDetectorsin interfaceScan- Returns:
- Vector of Detectors
-
setDetectors
Description copied from interface:ScanSets the list of Detectors for this scan.- Specified by:
setDetectorsin interfaceScan- Parameters:
allDetectors-- See Also:
-
isChild
public boolean isChild()Description copied from interface:ScanReturns true if this scan is nested inside another scan. -
setIsChild
public void setIsChild(boolean child) Description copied from interface:ScanTells the scan if it is a child.- Specified by:
setIsChildin interfaceScan- Parameters:
child-
-
getDataWriter
Description copied from interface:ScanReturns the reference to the DataWriter that this scan is using.- Specified by:
getDataWriterin interfaceScan- Returns:
- the DataWriter
-
setDataWriter
Description copied from interface:ScanGives 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.- Specified by:
setDataWriterin interfaceScan- Parameters:
dh-
-
setScanDataPointPipeline
Description copied from interface:ScanSets 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.- Specified by:
setScanDataPointPipelinein interfaceScan- Parameters:
scanDataPointPipeline-
-
getScanDataPointPipeline
Description copied from interface:ScanReturns the ScanDataPoint pipeline.- Specified by:
getScanDataPointPipelinein interfaceScan
-
getName
Description copied from interface:ScanReturn 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. -
getParent
-
setParent
-
getChild
-
setChild
-
getStepId
-
setStepId
-
setScanPlotSettings
- Specified by:
setScanPlotSettingsin interfaceScan
-
getScanPlotSettings
- Specified by:
getScanPlotSettingsin interfaceScan- Returns:
- Settings for plotting
-
getDimension
public int getDimension()- Specified by:
getDimensionin interfaceScan- 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
public int getTotalNumberOfPoints()- Specified by:
getTotalNumberOfPointsin interfaceScan- 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
public int getScanNumber()- Specified by:
getScanNumberin interfaceScan- Returns:
- The unique id of the scan. Null if not set
-
getStatus
- Specified by:
getStatusin interfaceScan- Returns:
- The
Scan.ScanStatus
-
requestFinishEarly
public void requestFinishEarly()Description copied from interface:ScanSet this scan to complete current scan data point and complete normally without doing any further data points.- Specified by:
requestFinishEarlyin interfaceScan
-
isFinishEarlyRequested
public boolean isFinishEarlyRequested()- Specified by:
isFinishEarlyRequestedin interfaceScan
-
setStatus
-
getScanInformation
- Specified by:
getScanInformationin interfaceScan
-