Package uk.ac.gda.server.ncd.subdetector
Class NcdSubDetector
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
uk.ac.gda.server.ncd.subdetector.NcdSubDetector
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable,INcdSubDetector
- Direct Known Subclasses:
NcdEigerDetector,NcdPilatusAD,NcdPressureCell,NcdScalerDetector,NcdTetrammDetector,NcdWireDetector,NcdXmapDetector
@ServiceInterface(INcdSubDetector.class)
public class NcdSubDetector
extends DeviceBase
implements INcdSubDetector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.commons.configuration.FileConfigurationprotected Stringprotected Detectorprotected Stringprotected Stringprotected org.eclipse.january.dataset.DoubleDatasetprotected Collection<INcdMetaProvider> protected doubleFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface uk.ac.gda.server.ncd.subdetector.INcdSubDetector
descriptionLabel, SERIAL_NUMBER_LABEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMetadata(NXDetectorData nxdata) voidaddPostScanAction(NcdAction action) voidaddPreScanAction(NcdAction action) voidvoidvoidatScanStart(ScanInformation info) voidclear()voidclose()Close and unconfigure the device.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.getAttribute(String attributeName) Get the value of the specified attributeint[]org.eclipse.january.dataset.DatasetgetMask()intdoubleGet the size of pixels in x (for 1d detectors) or x and y (for 2d detectors)A unique identifier for this sub-detectorThe supported dimensions are obtained firstly from the XML Spring configuration and if not there will try a detector attribute "DataDimensions" else it will fallback to the currently selected data dimensions.voidRe-initialisation of values and states.voidremovePostScanAction(NcdAction action) voidremovePreScanAction(NcdAction action) protected voidvoidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetCollectionTime(double time) voidsetDataDimensions(int[] detectorSize) voidsetDetector(Detector detector) voidsetDetectorType(String detectorType) voidsetInterpretation(String interpretation) voidsetMask(org.eclipse.january.dataset.DoubleDataset mask) voidvoidsetPixelSize(double pixelSize) voidsetPostScanActions(Collection<NcdAction> actions) voidsetPreScanActions(Collection<NcdAction> actions) voidsetSerialNumber(String serial) voidvoidstart()voidstop()toString()voidwriteout(int frames, NXDetectorData dataTree) add detector data for frames to the returned data typeMethods inherited from class gda.device.DeviceBase
addIObserver, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfiguredMethods inherited from interface gda.device.Device
getProtectionLevel, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
detector
-
detectorType
-
pixelSize
protected double pixelSize -
attributeMap
-
description
-
mask
protected org.eclipse.january.dataset.DoubleDataset mask -
interpretation
-
configuration
protected org.apache.commons.configuration.FileConfiguration configuration -
metaProviders
-
-
Constructor Details
-
NcdSubDetector
public NcdSubDetector()
-
-
Method Details
-
restoreAttributeMap
protected void restoreAttributeMap() -
getDetector
-
setDetector
-
getTreeName
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase- Throws:
FactoryException
-
clear
- Specified by:
clearin interfaceINcdSubDetector- Throws:
DeviceException
-
close
Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Overrides:
closein classDeviceBase- Throws:
DeviceException
-
getDataDimensions
- Specified by:
getDataDimensionsin interfaceINcdSubDetector- Throws:
DeviceException
-
getDetectorType
- Specified by:
getDetectorTypein interfaceINcdSubDetector
-
getMemorySize
- Specified by:
getMemorySizein interfaceINcdSubDetector- Throws:
DeviceException
-
getSupportedDimensions
The supported dimensions are obtained firstly from the XML Spring configuration and if not there will try a detector attribute "DataDimensions" else it will fallback to the currently selected data dimensions.- Specified by:
getSupportedDimensionsin interfaceINcdSubDetector- Throws:
DeviceException
-
setDataDimensions
- Specified by:
setDataDimensionsin interfaceINcdSubDetector- Throws:
DeviceException
-
setDetectorType
- Parameters:
detectorType- the detectorType to set
-
start
- Specified by:
startin interfaceINcdSubDetector- Throws:
DeviceException
-
stop
- Specified by:
stopin interfaceINcdSubDetector- Throws:
DeviceException
-
setCollectionTime
- Throws:
DeviceException
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classDeviceBase- Parameters:
attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- if an attribute cannot be retrieved
-
writeout
Description copied from interface:INcdSubDetectoradd detector data for frames to the returned data type- Specified by:
writeoutin interfaceINcdSubDetector- Parameters:
frames-dataTree-- Throws:
DeviceException
-
addMetadata
- Throws:
DeviceException
-
getPixelSize
Description copied from interface:INcdSubDetectorGet the size of pixels in x (for 1d detectors) or x and y (for 2d detectors)- Specified by:
getPixelSizein interfaceINcdSubDetector- Returns:
- pixel size in metres
- Throws:
DeviceException
-
setPixelSize
- Throws:
DeviceException
-
getMask
public org.eclipse.january.dataset.Dataset getMask() -
setMask
public void setMask(org.eclipse.january.dataset.DoubleDataset mask) -
atScanStart
- Specified by:
atScanStartin interfaceINcdSubDetector- Throws:
DeviceException
-
setTimer
- Specified by:
setTimerin interfaceINcdSubDetector- Throws:
DeviceException
-
atScanStart
- Specified by:
atScanStartin interfaceINcdSubDetector- Throws:
DeviceException
-
atScanEnd
- Specified by:
atScanEndin interfaceINcdSubDetector- Throws:
DeviceException
-
getInterpretation
-
setInterpretation
-
getDetectorProperties
- Specified by:
getDetectorPropertiesin interfaceINcdSubDetector- Throws:
DeviceException
-
setMetaProviders
-
getSerialNumber
Description copied from interface:INcdSubDetectorA unique identifier for this sub-detector- Specified by:
getSerialNumberin interfaceINcdSubDetector- Returns:
- String serial number
-
setSerialNumber
-
toString
-
getPreScanActions
-
setPreScanActions
-
addPreScanAction
-
removePreScanAction
-
getPostScanActions
-
setPostScanActions
-
addPostScanAction
-
removePostScanAction
-