Package gda.device.detector.xmap
Class DummyHardwareTriggeredNexusXmap
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.hardwaretriggerable.HardwareTriggerableDetectorBase
gda.device.detector.xmap.DummyHardwareTriggeredNexusXmap
- All Implemented Interfaces:
SimulatedTriggerObserver,Detector,HardwareTriggerableDetector,HardwareTriggeredDetector,NexusDetector,HardwareTriggeredNexusXmap,Device,Scannable,PositionCallableProvider<NexusTreeProvider>,XmapDetector,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver,Serializable
public class DummyHardwareTriggeredNexusXmap
extends HardwareTriggerableDetectorBase
implements HardwareTriggeredNexusXmap
- See Also:
-
Field Summary
Fields 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 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 every scanvoidclear()Clear all MCA'svoidClears all MCAs and starts data collectionvoidTells the detector to begin to collect a set of data, then returns immediately.booleanReturns a value which indicates whether the detector creates its own files.doubleReturns the time for which the detector is set to acquire dataLightly to be only implemented on the server.int[][]getData()Returns the data array of all the MCAsint[]getData(int mcaNumber) Returns the data array of the specified MCAint[]Default which should be overridden by subclasses.String[]Additional names for extra values that returned by getPosition().intReturns current number of Bins/channels for spectrum acquisition in each MCAintReturns the number of MCAs currently connected to the XMap detectorintReturns the total number of ROIs currently setdoubleReturns the current rate at which data is read in the Epics interfacedoubleReturns the elapsed real time after a read status operationdouble[]getROICounts(int iRoi) Gets the count for each mca for a given ROI.double[]Returns the sum of the corresponding ROIs of all the MCA.intReturns the status of the detectordoubleReturns the current set rate at which status is read in the Epics interfacegetXmap()booleanDetectors that sample some value at the time of a trigger should return False.booleanbooleanreadout()Returns the latest data collected.doubleReads out the scaler data of the roi counts, corrects for deadtime and returns the sum.voidsetAcquisitionTime(double time) Tells the detector for how many seconds to acquire datavoidsetBufferMode(boolean bufferMode) voidsetFileNames(List<String> fileNames) voidsetNthROI(double[][] rois, int roiIndex) Sets a ROI for all of the MCAsvoidsetNumberOfBins(int numberOfBins) Sets maximum numbers of bins/channels to use for spectrum acquisition in each MCAvoidsetReadRate(double readRate) Sets the rate at which data is read in the Epics interfacevoidsetROIs(double[][] rois) Sets the ROIs of all the MCA.voidsetStatusRate(double statusRate) Sets the rate at which status is read in the Epics interfacevoidvoidstart()Start data acquisition in all MCA'svoidvoidvoidwaitForFile(String fileName) Methods inherited from class gda.device.detector.hardwaretriggerable.HardwareTriggerableDetectorBase
getHardwareTriggerProvider, getNumberImagesToCollect, isHardwareTriggering, setHardwareTriggering, setHardwareTriggerProvider, setNumberImagesToCollectMethods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, getCollectionTime, getPosition, isBusy, prepareForCollection, setCollectionTime, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanStart, externalToInternal, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, 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
endCollection, getCollectionTime, getFileStructure, prepareForCollection, setCollectionTime, waitWhileBusyMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.device.detector.hardwaretriggerable.HardwareTriggerableDetector
isHardwareTriggering, setHardwareTriggeringMethods inherited from interface gda.device.detector.hardwaretriggerable.HardwareTriggeredDetector
getHardwareTriggerProvider, setNumberImagesToCollectMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanStart, checkPositionValid, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedStringMethods inherited from interface gda.device.XmapDetector
stop
-
Constructor Details
-
DummyHardwareTriggeredNexusXmap
public DummyHardwareTriggeredNexusXmap()
-
-
Method Details
-
getFileNames
-
setFileNames
-
setBufferMode
public void setBufferMode(boolean bufferMode) -
integratesBetweenPoints
public boolean integratesBetweenPoints()Description copied from interface:HardwareTriggeredDetectorDetectors that sample some value at the time of a trigger should return False. Detectors such as counter timers should return True. If true ,TrajectoryScanLine will generate a trigger half a point before the motor reaches a demanded point such that the resulting bin of data is centred on the demand position. Area detectors that will be triggered by the first pulse should also return true.- Specified by:
integratesBetweenPointsin interfaceHardwareTriggeredDetector- Returns:
- true for detectors that integrates b
-
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- Throws:
DeviceException
-
getStatus
Description copied from interface:XmapDetectorReturns the status of the detector- Specified by:
getStatusin interfaceDetector- Specified by:
getStatusin interfaceXmapDetector- Returns:
- Detector.IDLE/BUSY
- 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- Returns:
- the data collected
- Throws:
DeviceException
-
createsOwnFiles
Description copied from interface:DetectorReturns a value which indicates whether the detector creates its own files. If it does (return true) the readout() method returns the name of the latest file created as a string. If it does not (return false) the readout() method will return the data directly.- Specified by:
createsOwnFilesin interfaceDetector- Returns:
- true if readout() returns filenames
- Throws:
DeviceException
-
getDescription
- Specified by:
getDescriptionin interfaceDetector- Overrides:
getDescriptionin classDetectorBase- Returns:
- A description of the detector.
- Throws:
DeviceException
-
getDetectorID
- Specified by:
getDetectorIDin interfaceDetector- Overrides:
getDetectorIDin classDetectorBase- Returns:
- A identifier for this detector.
- Throws:
DeviceException
-
getDetectorType
- Specified by:
getDetectorTypein interfaceDetector- Overrides:
getDetectorTypein classDetectorBase- Returns:
- The type of detector.
- Throws:
DeviceException
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-
getXmap
- Specified by:
getXmapin interfaceHardwareTriggeredNexusXmap
-
setXmap
-
getPositionCallable
- Specified by:
getPositionCallablein interfacePositionCallableProvider<NexusTreeProvider>- Throws:
DeviceException
-
atScanLineStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineStartin interfaceScannable- Overrides:
atScanLineStartin classScannableBase- Throws:
DeviceException- See Also:
-
clearAndStart
Description copied from interface:XmapDetectorClears all MCAs and starts data collection- Specified by:
clearAndStartin interfaceXmapDetector- Throws:
DeviceException
-
clear
Description copied from interface:XmapDetectorClear all MCA's- Specified by:
clearin interfaceXmapDetector- Throws:
DeviceException
-
start
Description copied from interface:XmapDetectorStart data acquisition in all MCA's- Specified by:
startin interfaceXmapDetector- Throws:
DeviceException
-
setNumberOfBins
Description copied from interface:XmapDetectorSets maximum numbers of bins/channels to use for spectrum acquisition in each MCA- Specified by:
setNumberOfBinsin interfaceXmapDetector- Parameters:
numberOfBins-- Throws:
DeviceException
-
getNumberOfBins
Description copied from interface:XmapDetectorReturns current number of Bins/channels for spectrum acquisition in each MCA- Specified by:
getNumberOfBinsin interfaceXmapDetector- Returns:
- numberOfBins
- Throws:
DeviceException
-
setStatusRate
Description copied from interface:XmapDetectorSets the rate at which status is read in the Epics interface- Specified by:
setStatusRatein interfaceXmapDetector- Parameters:
statusRate-- Throws:
DeviceException
-
getStatusRate
Description copied from interface:XmapDetectorReturns the current set rate at which status is read in the Epics interface- Specified by:
getStatusRatein interfaceXmapDetector- Returns:
- status rate
- Throws:
DeviceException
-
setReadRate
Description copied from interface:XmapDetectorSets the rate at which data is read in the Epics interface- Specified by:
setReadRatein interfaceXmapDetector- Parameters:
readRate-- Throws:
DeviceException
-
getReadRate
Description copied from interface:XmapDetectorReturns the current rate at which data is read in the Epics interface- Specified by:
getReadRatein interfaceXmapDetector- Returns:
- readRate
- Throws:
DeviceException
-
getRealTime
Description copied from interface:XmapDetectorReturns the elapsed real time after a read status operation- Specified by:
getRealTimein interfaceXmapDetector- Returns:
- real time
- Throws:
DeviceException
-
setAcquisitionTime
Description copied from interface:XmapDetectorTells the detector for how many seconds to acquire data- Specified by:
setAcquisitionTimein interfaceXmapDetector- Parameters:
time-- Throws:
DeviceException
-
getAcquisitionTime
Description copied from interface:XmapDetectorReturns the time for which the detector is set to acquire data- Specified by:
getAcquisitionTimein interfaceXmapDetector- Returns:
- time
- Throws:
DeviceException
-
getData
Description copied from interface:XmapDetectorReturns the data array of the specified MCA- Specified by:
getDatain interfaceXmapDetector- Parameters:
mcaNumber-- Returns:
- data array
- Throws:
DeviceException
-
getData
Description copied from interface:XmapDetectorReturns the data array of all the MCAs- Specified by:
getDatain interfaceXmapDetector- Returns:
- array of data arrays
- Throws:
DeviceException
-
getROIsSum
Description copied from interface:XmapDetectorReturns the sum of the corresponding ROIs of all the MCA. For e.g if the MCAs have three ROIs each say R0, R1 and R2. This method sums up the R0 of all the MCA R1 of all the MCAs and so on- Specified by:
getROIsSumin interfaceXmapDetector- Returns:
- ROI sum array
- Throws:
DeviceException
-
setROIs
Description copied from interface:XmapDetectorSets the ROIs of all the MCA. Use this method only if you want to set all the MCA with the same ROIs.To set different ROI for each of the MCA use setNthROI method.- Specified by:
setROIsin interfaceXmapDetector- Parameters:
rois- array. Each roi should have a low and high value.- Throws:
DeviceException
-
getNumberOfROIs
Description copied from interface:XmapDetectorReturns the total number of ROIs currently set- Specified by:
getNumberOfROIsin interfaceXmapDetector- Returns:
- number of ROIs
- Throws:
DeviceException
-
getNumberOfMca
Description copied from interface:XmapDetectorReturns the number of MCAs currently connected to the XMap detector- Specified by:
getNumberOfMcain interfaceXmapDetector- Returns:
- number of MCA
- Throws:
DeviceException
-
setNthROI
Description copied from interface:XmapDetectorSets a ROI for all of the MCAs- Specified by:
setNthROIin interfaceXmapDetector- Parameters:
rois- This array length should be same as the number of MCAsroiIndex-- Throws:
DeviceException
-
getChannelLabels
Description copied from interface:XmapDetectorLightly to be only implemented on the server.- Specified by:
getChannelLabelsin interfaceXmapDetector- Returns:
- the labels for the channels defined by the user.
-
getROICounts
Description copied from interface:XmapDetectorGets the count for each mca for a given ROI.- Specified by:
getROICountsin interfaceXmapDetector- Parameters:
iRoi-- Returns:
- double[] of counts per mca for this roi
- Throws:
DeviceException
-
readoutScalerData
Description copied from interface:XmapDetectorReads out the scaler data of the roi counts, corrects for deadtime and returns the sum.- Specified by:
readoutScalerDatain interfaceXmapDetector- Returns:
- The FF data
- Throws:
DeviceException
-
getHDFFileName
- Specified by:
getHDFFileNamein interfaceHardwareTriggeredNexusXmap- Throws:
DeviceException
-
waitForFile
- Specified by:
waitForFilein interfaceHardwareTriggeredNexusXmap- Throws:
DeviceExceptionInterruptedException
-
isStillWriting
public boolean isStillWriting() -
isInBufferMode
- Specified by:
isInBufferModein interfaceHardwareTriggeredNexusXmap- Throws:
Exception
-
getExtraNames
Description copied from interface:ScannableAdditional names for extra values that returned by getPosition().- Specified by:
getExtraNamesin interfaceScannable- Overrides:
getExtraNamesin classScannableBase- Returns:
- array of names of the extra elements if the array returned by getPosition is larger than the array required by moveTo
-
getDataDimensions
Description copied from class:DetectorBaseDefault which should be overridden by subclasses.- Specified by:
getDataDimensionsin interfaceDetector- Overrides:
getDataDimensionsin classDetectorBase- Returns:
- the dimensions of the data object returned by the
Detector.readout()method - Throws:
DeviceException- See Also:
-
waitForCurrentScanFile
- Specified by:
waitForCurrentScanFilein interfaceHardwareTriggeredNexusXmap- Throws:
DeviceExceptionInterruptedException
-