Package gda.device.detector
Class DetectorBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
- All Implemented Interfaces:
Detector,Device,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable
- Direct Known Subclasses:
ADCameraDetector,ADCMonitor,ADDetector,AnalyserBase,AsciiReaderDetector,BufferedEdeDetector,BufferedNXDetector,BufferedPandaDetector,BufferedScannablePositions,CoboldTDC,CounterTimerBase,DatasetNexusDetector,DataSocketDetector,DummyBufferedDetector,DummyDetector,DummyEtlDetector,DummyImageCreator,DummyMandelbrotMappingDetector,DummyPilatus,DummyScalarChannelDetector,DummyXmapBufferedDetector,DummyXspress3Detector,EdeDetectorBase,EDXD,EDXDController,EDXDElement,EpicsBekhoffAdc,EpicsDetector,EpicsFemtoWithBekhoffAdc,EpicsMCA2,EpicsMCACounterTimer,EpicsMultiChannelScaler,EpicsPilatus,EpicsScaler,EpicsScalerSimple,EpicsScanData,ETLDetector,GeFanuc110BLADC,HardwareTriggerableDetectorBase,I21Detector,IPPserver,MerlinDetector,MirrorCommissioningDetector,MjpegDetector,MythenDetectorImpl,NcdDetectorSystem,NXDetector,ODCCDController,OdinDetector,PandaDetector,PCO4000,PCODetector,PulseTube,QexafsFFoverIO,QexafsGMSDOverI0,RoiExtractor,SesoXbpmDetector,StepScanEdeDetector,TfgFFoverI0,TfgXMapFFoverI0,TimeResolvedTFGDetector,VGScientaAnalyserTotalOnly,VortexDetector,VortexQexafsFFIO,XesIf,Xmap,XmapBufferedDetector,XmapDetectorFromEpicsMca,Xspress2BufferedDetector,Xspress3BufferedDetector,Xspress3Detector,Xspress3FFoverI0BufferedDetector,Xspress3FFoverI0Detector,Xspress3QexafsDetector,Xspress4BufferedDetector,Xspress4Detector,XspressSystem,ZebraExternallyTriggeredDetector
Base class for all Detectors.
- See Also:
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidasynchronousMoveTo(Object collectionTime) Default implementation is to set the collection time and to call the collectData methodcheckPositionValid(Object position) By default, the position will be the collection time.voidDefault which should be overridden by subclasses.doubleReturns the time, in seconds, the detector collects for during the next call to collectData()int[]Default which should be overridden by subclasses.Returns the current position of the Scannable.booleanisBusy()Check if the Scannable is moving/operating.voidDefault which should be overridden by subclasses.voidsetCollectionTime(double collectionTime) Sets the collection time, in seconds, to be used during the next call of collectData.Returns a string representation of the Scannable and its current position/value/statusMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, externalToInternal, getExtraNames, 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
collectData, createsOwnFiles, getFileStructure, getStatus, readout, 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
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop
-
Field Details
-
collectionTime
protected double collectionTime
-
-
Constructor Details
-
DetectorBase
public DetectorBase()
-
-
Method Details
-
getCollectionTime
Description copied from interface:DetectorReturns the time, in seconds, the detector collects for during the next call to collectData()- Specified by:
getCollectionTimein interfaceDetector- 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- Parameters:
collectionTime- the collection time in seconds- Throws:
DeviceException
-
getDataDimensions
Default which should be overridden by subclasses.- Specified by:
getDataDimensionsin interfaceDetector- Returns:
- the dimensions of the data object returned by the
Detector.readout()method - Throws:
DeviceException- See Also:
-
checkPositionValid
By default, the position will be the collection time. So test to see if the supplied object can be converted to a double.- Specified by:
checkPositionValidin interfaceScannable- Overrides:
checkPositionValidin classScannableBase- Parameters:
position-- Returns:
- null if position is valid, or returns a description if not.
- See Also:
-
endCollection
Default which should be overridden by subclasses.- Specified by:
endCollectionin interfaceDetector- Throws:
DeviceException- See Also:
-
prepareForCollection
Default which should be overridden by subclasses.- Specified by:
prepareForCollectionin interfaceDetector- Throws:
DeviceException- See Also:
-
asynchronousMoveTo
Default implementation is to set the collection time and to call the collectData method- Specified by:
asynchronousMoveToin interfaceScannable- Overrides:
asynchronousMoveToin classScannableBase- Parameters:
collectionTime- Position to move to should have an element for each input field.- Throws:
DeviceException- See Also:
-
getPosition
Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it. Also, if createsOwnFiles attempts to register the file with all FileRegistrars (primarily for data archiving). Note that this method will be called if the detector is triggered from a 'pos' command but not if the detector is triggered by the scan command (which ignores the detector's scannable interface).- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException- See Also:
-
isBusy
Check if the Scannable is moving/operating. default implementation is to call the getStatus method- Specified by:
isBusyin interfaceScannable- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException- See Also:
-
toFormattedString
Description copied from interface:ScannableReturns a string representation of the Scannable and its current position/value/statusTypically should return:
name : position
or for detectors, name : status
If the position/status cannot be determined, the function should return
Scannable.VALUE_UNAVAILABLEin its place.- Specified by:
toFormattedStringin interfaceScannable- Overrides:
toFormattedStringin classScannableBase- Returns:
- string as defined above
-
getDescription
- Specified by:
getDescriptionin interfaceDetector- Returns:
- A description of the detector.
- Throws:
DeviceException
-
getDetectorID
- Specified by:
getDetectorIDin interfaceDetector- Returns:
- A identifier for this detector.
- Throws:
DeviceException
-
getDetectorType
- Specified by:
getDetectorTypein interfaceDetector- Returns:
- The type of detector.
- Throws:
DeviceException
-