Class AbstractWriteRegionsImmediatelyNXDetector
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.NXDetector
org.opengda.detector.electronanalyser.nxdetector.AbstractWriteRegionsImmediatelyNXDetector
- All Implemented Interfaces:
Detector,NexusDetector,NXPluginDetector,Device,Scannable,PositionCallableProvider<NexusTreeProvider>,Configurable,Findable,gda.observable.IObservable,Serializable,INexusDevice<NXdetector>,IWritableNexusDevice<NXdetector>,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
SpecsPhoibosSolsticeAnalyser,VGScientaAnalyserNXDetector
public abstract class AbstractWriteRegionsImmediatelyNXDetector
extends NXDetector
implements IWritableNexusDevice<NXdetector>
- See Also:
-
Field Summary
Fields inherited from class gda.device.detector.NXDetector
lastReadoutValue, UNSUPPORTED_PART_OF_SCANNABLE_INTERFACE, UNSUPPORTED_SET_FUNCTIONFields inherited from class gda.device.detector.DetectorBase
collectionTimeFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface org.eclipse.dawnsci.nexus.IWritableNexusDevice
SCALAR_DATASET_SHAPEFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)protected abstract voidvoidTells the detector to begin to collect a set of data, then returns immediately.abstract doubleReturns the time, in seconds, the detector collects for during the next call to collectData()protected NXdetectorAndSliceIteratorStorageReturns the object providers required for writing correct NeXus files.protected abstract NexusObjectWrapper<NXdetector> initialiseAdditionalNXdetectorData(NXdetector detector, NexusScanInfo info) voidscanEnd()Called at the end of a scan.voidsetClientFileAnnouncer(ClientFileAnnouncer clientFileAnnouncer) voidsetCollectionStrategy(NXCollectionStrategyPlugin nxCollectionStrategyPlugin) voidsetCollectionTime(double value) Sets the collection time, in seconds, to be used during the next call of collectData.protected voidsetDataStorage(NXdetectorAndSliceIteratorStorage dataStorage) voidsetDescription(String description) voidsetDetectorID(String detectorID) abstract voidsetSequenceFile(String sequenceFilename) protected abstract voidsetupAdditionalDataAxisFields(NexusObjectWrapper<?> nexusWrapper, int scanRank) Setup the axis fields for the datasets that will be added to NXData groups.Methods inherited from class gda.device.detector.NXDetector
__getattr__, __str__, afterPropertiesSet, asynchronousMoveTo, atCommandFailure, atScanEnd, atScanLineEnd, atScanLineStart, createsOwnFiles, endCollection, getAdditionalPluginList, getCollectionStrategy, getExtraNames, getFileStructure, getInputNames, getOutputFormat, getPlugin, getPluginList, getPluginMap, getPosition, getPositionCallable, getStatus, isAddCollectTimeMs, isBusy, prepareCollectionStrategyAtScanStart, prepareForCollection, readout, setAddCollectTimeMs, setAdditionalPluginList, setExtraNames, setInputNames, setOutputFormat, stop, waitWhileBusyMethods inherited from class gda.device.detector.DetectorBase
checkPositionValid, getDataDimensions, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, externalToInternal, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setLevel, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigured, reconfigure, setConfiguredMethods 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
getDataDimensionsMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface org.eclipse.dawnsci.nexus.INexusDevice
getCustomNexusModification, getName, getNexusProvider, registerMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface org.eclipse.dawnsci.nexus.IWritableNexusDevice
writePositionMethods inherited from interface gda.device.Scannable
atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, checkPositionValid, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setLevel, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Constructor Details
-
AbstractWriteRegionsImmediatelyNXDetector
public AbstractWriteRegionsImmediatelyNXDetector()
-
-
Method Details
-
setCollectionStrategy
- Specified by:
setCollectionStrategyin interfaceNXPluginDetector- Overrides:
setCollectionStrategyin classNXDetector
-
setSequenceFile
public abstract void setSequenceFile(String sequenceFilename) throws DeviceException, FileNotFoundException - Throws:
DeviceExceptionFileNotFoundException
-
initialiseAdditionalNXdetectorData
protected abstract NexusObjectWrapper<NXdetector> initialiseAdditionalNXdetectorData(NXdetector detector, NexusScanInfo info) -
getNexusProviders
public List<NexusObjectProvider<NXdetector>> getNexusProviders(NexusScanInfo info) throws NexusException Description copied from interface:INexusDeviceReturns the object providers required for writing correct NeXus files. Implement this method if your device needs to create multiple nexus objects. These can implementNexusObjectProviderThe default implementation of this method calls
INexusDevice.getNexusProvider(NexusScanInfo)and returns aListwhose sole element is theNexusObjectProviderreturned from that method. One of either this method orINexusDevice.getNexusProviders(NexusScanInfo)must be overridden to create and return the nexus object(s) for thisINexusDevice.- Specified by:
getNexusProvidersin interfaceINexusDevice<NXdetector>- Parameters:
info- information about the scan which can be useful when creating datasets e.g.info.getRank()- Returns:
- The
NXobjectcreated using thenodeFactoryto represent this device - Throws:
NexusException- if the nexus object could not be created for any reason
-
setupAdditionalDataAxisFields
protected abstract void setupAdditionalDataAxisFields(NexusObjectWrapper<?> nexusWrapper, int scanRank) Setup the axis fields for the datasets that will be added to NXData groups. Come under_indicies. Important so that datasets correctly plot and won't crop an axis. - Parameters:
nexusWrapper- to add the axis fields tooscanRank- information about the scan dimensions
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classNXDetector- Throws:
DeviceException- See Also:
-
beforeCollectData
- Throws:
DeviceException
-
collectData
Description copied from interface:DetectorTells the detector to begin to collect a set of data, then returns immediately. Should cause the hardware to start collecting immediately: if there is any delay then detectors used in the same scan would collect over different times when beam conditions may differ.- Specified by:
collectDatain interfaceDetector- Overrides:
collectDatain classNXDetector- Throws:
DeviceException
-
scanEnd
public void scanEnd()Description copied from interface:IWritableNexusDeviceCalled at the end of a scan. The implementation should use this to clear up any state, such as closing any files and releasing any cached datasets so that this device can be used in subsequent scans.- Specified by:
scanEndin interfaceIWritableNexusDevice<NXdetector>
-
setClientFileAnnouncer
-
getDataStorage
-
setDataStorage
-
getCollectionTime
Description copied from interface:DetectorReturns the time, in seconds, the detector collects for during the next call to collectData()- Specified by:
getCollectionTimein interfaceDetector- Overrides:
getCollectionTimein classDetectorBase- Returns:
- double
- Throws:
DeviceException
-
setCollectionTime
Description copied from interface:DetectorSets the collection time, in seconds, to be used during the next call of collectData.- Specified by:
setCollectionTimein interfaceDetector- Overrides:
setCollectionTimein classDetectorBase- Parameters:
value- the collection time in seconds- Throws:
DeviceException
-
getDetectorType
- Specified by:
getDetectorTypein interfaceDetector- Overrides:
getDetectorTypein classDetectorBase- Returns:
- The type of detector.
- Throws:
DeviceException
-
getDescription
- Specified by:
getDescriptionin interfaceDetector- Overrides:
getDescriptionin classDetectorBase- Returns:
- A description of the detector.
- Throws:
DeviceException
-
setDescription
-
getDetectorID
- Specified by:
getDetectorIDin interfaceDetector- Overrides:
getDetectorIDin classDetectorBase- Returns:
- A identifier for this detector.
- Throws:
DeviceException
-
setDetectorID
-