Package gda.data.scan.nexus.device
Class ConfiguredScannableNexusDevice<N extends NXobject>
java.lang.Object
gda.data.scan.nexus.device.AbstractNexusDeviceAdapter<N>
gda.data.scan.nexus.device.AbstractScannableNexusDevice<N>
gda.data.scan.nexus.device.ConfiguredScannableNexusDevice<N>
- Type Parameters:
N- the type of nexus device created
- All Implemented Interfaces:
IGDAScannableNexusDevice<N>,INexusDevice<N>,IWritableNexusDevice<N>
public class ConfiguredScannableNexusDevice<N extends NXobject>
extends AbstractScannableNexusDevice<N>
An instance of this class is created to implement
INexusDevice for a scannable for which
a ScannableNexusDeviceConfiguration bean with the same name exist. The type of nexus object
created, the names of its fields are created as specified in the configuration bean, which is normally
configured in spring.-
Field Summary
Fields inherited from class gda.data.scan.nexus.device.AbstractScannableNexusDevice
nexusRoleFields inherited from class gda.data.scan.nexus.device.AbstractNexusDeviceAdapter
DOUBLE_DATA_BYTE_SIZEFields inherited from interface org.eclipse.dawnsci.nexus.IWritableNexusDevice
SCALAR_DATASET_SHAPE -
Constructor Summary
ConstructorsConstructorDescriptionConfiguredScannableNexusDevice(Scannable scannable, ScannableNexusDeviceConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureNexusWrapper(NexusObjectWrapper<N> nexusWrapper, NexusScanInfo info) Configure the nexus wrapper, an object that contains the nexus object and contains additional information describing how the nexus object should be added to the nexus tree - in particular toNXdatagroups.protected StringgetFieldUnits(int fieldIndex) protected NexusBaseClassprotected NexusBaseClassReturns the object providers required for writing correct NeXus files.protected StringMethods inherited from class gda.data.scan.nexus.device.AbstractScannableNexusDevice
addFields, createDataNodes, createLazyWritableDataset, createNexusObject, getFieldDataNode, getFieldNames, getNexusProvider, getPrimaryDataFieldIndex, getScannable, isNexusObjectCreated, scanEnd, setScanObject, toString, writeControllerRecordName, writePosition, writePositionMethods inherited from class gda.data.scan.nexus.device.AbstractNexusDeviceAdapter
addAttributesToDataNode, createNexusProvider, getDevice, getFillValue, getName, registerAttributesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.dawnsci.nexus.INexusDevice
getCustomNexusModification, register
-
Constructor Details
-
ConfiguredScannableNexusDevice
public ConfiguredScannableNexusDevice(Scannable scannable, ScannableNexusDeviceConfiguration config)
-
-
Method Details
-
getNexusProviders
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.- 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
-
configureNexusWrapper
protected void configureNexusWrapper(NexusObjectWrapper<N> nexusWrapper, NexusScanInfo info) throws NexusException Description copied from class:AbstractNexusDeviceAdapterConfigure the nexus wrapper, an object that contains the nexus object and contains additional information describing how the nexus object should be added to the nexus tree - in particular toNXdatagroups.- Overrides:
configureNexusWrapperin classAbstractNexusDeviceAdapter<N extends NXobject>- Parameters:
nexusWrapper-info-- Throws:
NexusException
-
getPrimaryDataFieldName
- Overrides:
getPrimaryDataFieldNamein classAbstractScannableNexusDevice<N extends NXobject>
-
getNexusCategory
- Overrides:
getNexusCategoryin classAbstractScannableNexusDevice<N extends NXobject>- Throws:
NexusException
-
getNexusBaseClass
- Overrides:
getNexusBaseClassin classAbstractScannableNexusDevice<N extends NXobject>- Throws:
NexusException
-
getFieldUnits
- Overrides:
getFieldUnitsin classAbstractScannableNexusDevice<N extends NXobject>
-