Class NXDetectorSnappingDecorator
- All Implemented Interfaces:
Detector,NexusDetector,NXPluginDetector,DetectorSnapper,Device,Scannable,PositionCallableProvider<NexusTreeProvider>,Configurable,Findable,gda.observable.IObservable
Uses a separate plugin list and collection strategy for use in the pos command and delegates to the decorated detector when used in a scan.
<bean id="detector" class="NXDetectorSnappingDecorator">
<constructor-arg ref="_original_nxdetector_to_extend" />
<property name="snapperCollectionStrategy">
<bean class="SingleExposureStandard"> ... </bean>
</property>
<property name="snapperPluginList">
<list>
<bean class="SingleImagePerFileWriterWithNumTracker">
...
</bean>
</list>
</property>
</bean>
-
Field Summary
Fields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Method Summary
Modifier and TypeMethodDescriptionorg.python.core.PyString__repr__()org.python.core.PyString__str__()String[]acquire()Trigger an acquisition and block until complete.voidHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.voidCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)doubleReturn the acquisition period resulting from the last configured collection time.doubleReturn the acquisition time resulting from the last configured collection time.String[]Additional names for extra values that returned by getPosition().getName()Get the object name.Returns the current position of the Scannable.voidprepareForAcquisition(double collectionTime) Sets the collection time for the next collection (implicitly a single image collection).readout()Returns the latest data collected.voidsetAdditionalPluginList(List<NXPluginBase> additionalPluginList) voidsetCollectionStrategy(NXCollectionStrategyPlugin collectionStrategy) voidSet or change the name of the object (as defined in XML).voidsetSnapperPluginList(List<NXPluginBase> pluginList) voidsetSnappingCollectionStrategy(NXCollectionStrategyPlugin collectionStrategy) voidstop()Stop the current move/operation.Methods inherited from class gda.device.detector.PassthroughDetectorWrapper
addIObserver, asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanLineEnd, atScanLineStart, checkPositionValid, close, collectData, configure, createsOwnFiles, deleteIObserver, deleteIObservers, endCollection, getAttribute, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, getInputNames, getLevel, getOutputFormat, getProtectionLevel, getStatus, isAt, isBusy, isConfigureAtStartup, isConfigured, moveTo, prepareForCollection, reconfigure, setAttribute, setCollectionTime, setExtraNames, setInputNames, setLevel, setOutputFormat, setProtectionLevel, toFormattedString, toString, waitWhileBusyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Detector
collectData, createsOwnFiles, endCollection, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, getFileStructure, getStatus, prepareForCollection, setCollectionTime, waitWhileBusyMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanLineEnd, atScanLineStart, checkPositionValid, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Method Details
-
setSnappingCollectionStrategy
-
setSnapperPluginList
-
getSnapperCollectionStrategy
-
getSnapperPluginList
-
getDelegate
- Overrides:
getDelegatein classPassthroughDetectorWrapper
-
prepareForAcquisition
Description copied from interface:DetectorSnapperSets the collection time for the next collection (implicitly a single image collection).- Specified by:
prepareForAcquisitionin interfaceDetectorSnapper- Parameters:
collectionTime-- Throws:
Exception
-
getAcquireTime
Description copied from interface:DetectorSnapperReturn the acquisition time resulting from the last configured collection time. This will depend on the collection strategy.- Specified by:
getAcquireTimein interfaceDetectorSnapper- Returns:
- acquisition time in seconds
- Throws:
Exception
-
getAcquirePeriod
Description copied from interface:DetectorSnapperReturn the acquisition period resulting from the last configured collection time. This will depend on the collection strategy.- Specified by:
getAcquirePeriodin interfaceDetectorSnapper- Returns:
- acquisition time in seconds
- Throws:
Exception
-
acquire
Description copied from interface:DetectorSnapperTrigger an acquisition and block until complete.- Specified by:
acquirein interfaceDetectorSnapper- Returns:
- list of all resulting files.
- Throws:
InterruptedExceptionIllegalStateException- if the detector was already acquiringException
-
getPosition
Description copied from interface:ScannableReturns the current position of the Scannable. Called by ConcurentScan at the end of the point.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classPassthroughDetectorWrapper- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
setName
Description copied from interface:FindableSet or change the name of the object (as defined in XML).- Specified by:
setNamein interfaceFindable- Overrides:
setNamein classPassthroughDetectorWrapper- Parameters:
name- the object name
-
getName
Description copied from interface:FindableGet the object name. Used by Castor to check if the object name has been set before calling theFindable.setName(String)method.- Specified by:
getNamein interfaceFindable- Overrides:
getNamein classPassthroughDetectorWrapper- Returns:
- a String containing the object name.
-
getExtraNames
Description copied from interface:ScannableAdditional names for extra values that returned by getPosition().- Specified by:
getExtraNamesin interfaceScannable- Overrides:
getExtraNamesin classPassthroughDetectorWrapper- Returns:
- array of names of the extra elements if the array returned by getPosition is larger than the array required by moveTo
-
atScanStart
Description copied from interface:ScannableCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classPassthroughDetectorWrapper- Throws:
DeviceException
-
atScanEnd
Description copied from interface:ScannableCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See
Scannable.atCommandFailure()- Specified by:
atScanEndin interfaceScannable- Overrides:
atScanEndin classPassthroughDetectorWrapper- Throws:
DeviceException
-
atCommandFailure
Description copied from interface:ScannableHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then onlyScannable.stop()will be called by the Scan or pos command.Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook.
- Specified by:
atCommandFailurein interfaceScannable- Overrides:
atCommandFailurein classPassthroughDetectorWrapper- Throws:
DeviceException
-
stop
Description copied from interface:ScannableStop the current move/operation.- Specified by:
stopin interfaceScannable- Overrides:
stopin classPassthroughDetectorWrapper- Throws:
DeviceException
-
readout
Description copied from interface:DetectorReturns the latest data collected. The size of the Object returned must be consistent with the values returned by getDataDimensions and getExtraNames.If
LocalProperties.GDA_SCAN_CONCURRENTSCAN_READOUT_CONCURRENTLYis true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. SeeDetector.waitWhileBusy()andConcurrentScan. Readout must block until the detector is ready to respond quickly toDetector.collectData()again.- Specified by:
readoutin interfaceDetector- Specified by:
readoutin interfaceNexusDetector- Overrides:
readoutin classPassthroughDetectorWrapper- Returns:
- the data collected
- Throws:
DeviceException
-
getPositionCallable
- Specified by:
getPositionCallablein interfacePositionCallableProvider<NexusTreeProvider>- Throws:
DeviceException
-
getPluginList
- Specified by:
getPluginListin interfaceNXPluginDetector
-
getPluginMap
- Specified by:
getPluginMapin interfaceNXPluginDetector
-
setAdditionalPluginList
- Specified by:
setAdditionalPluginListin interfaceNXPluginDetector
-
getAdditionalPluginList
- Specified by:
getAdditionalPluginListin interfaceNXPluginDetector
-
setCollectionStrategy
- Specified by:
setCollectionStrategyin interfaceNXPluginDetector
-
getCollectionStrategy
- Specified by:
getCollectionStrategyin interfaceNXPluginDetector
-
__str__
public org.python.core.PyString __str__() -
__repr__
public org.python.core.PyString __repr__()
-