Package gda.device.detector.etldetector
Class ETLDetector
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.etldetector.ETLDetector
- All Implemented Interfaces:
Detector,Device,EtlDetector,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable
A class to represent a single ETL scintillation detector. This detector consists of two components: a sensor and a
counter. The sensor is based on scintillation technology, and the counter is using one channel out of 32 on a Struck
Scaler card.
- 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 TypeMethodDescriptionvoidaddMonitor(int channel, gov.aps.jca.event.MonitorListener l) voidCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)voidvoidTells the detector to begin to collect a set of data, then returns immediately.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.booleanReturns a value which indicates whether the detector creates its own files.formatPosition(int format, double number) Does the same job as the other formatPosition method except rather than using a supplied format string, use the index of the array of formats this object holds.intGets the actual output high voltage at the detector.int[]Default which should be overridden by subclasses.gets the detector objectGets the detector name.intgetHV()Gets the requested High Voltage from the detector register.intGets window's lower threshold from the detector.getName()Get the name of the devicegets the scaler objectintintReturns the current collecting state of the device.intGets the window's upper threshold from the detector.booleanvoidvoidDefault which should be overridden by subclasses.readout()Returns the latest data collected.voidsetCollectionTime(double time) Sets the collection time for the scalersvoidsetDetector(EpicsETLController detector) sets the detector objectvoidsetDetectorName(String detectorName) Sets the detector name.voidsetFastshutter(EpicsSimpleMbbinary fastshutter) voidsetHV(int mv) Sets the high voltage input in millivolt for the detector.voidsetLowerThreshold(int llim) Sets the window's lower threshold of the detector.voidSet the name of the devicevoidsetScaler(EpicsScaler scaler) sets the scaler objectvoidsetScalerChannelIndex(int scalerChannelIndex) voidsetScalerName(String scalerName) Sets the scaler name.voidsetShutterOpened(boolean shutterOpened) voidsetUpperThreshold(int ulim) Sets the window's upper threshold for the detector.voidstop()Stop the current move/operation.toString()voidMethods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, getCollectionTime, getPosition, isBusy, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanLineEnd, atScanLineStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
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
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Detector
endCollection, getCollectionTime, getFileStructure, 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
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanLineEnd, atScanLineStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Constructor Details
-
ETLDetector
public ETLDetector()The Constructor.
-
-
Method Details
-
getFastshutter
-
setFastshutter
-
isShutterOpened
public boolean isShutterOpened() -
setShutterOpened
public void setShutterOpened(boolean shutterOpened) -
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
-
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 classScannableBase- Throws:
DeviceException- See Also:
-
openShutter
- Throws:
DeviceException
-
atScanEnd
Description copied from class:ScannableBaseCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See
Scannable.atCommandFailure()Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanEndin interfaceScannable- Overrides:
atScanEndin classScannableBase- Throws:
DeviceException- See Also:
-
closeShutter
- Throws:
DeviceException
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableBase- Throws:
DeviceException- See Also:
-
setCollectionTime
public void setCollectionTime(double time) Sets the collection time for the scalers- Specified by:
setCollectionTimein interfaceDetector- Overrides:
setCollectionTimein classDetectorBase- Parameters:
time- period to count
-
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:DetectorReturns the current collecting state of the device.- Specified by:
getStatusin interfaceDetector- Returns:
- BUSY if the detector has not finished the requested operation(s), IDLE if in an completely idle state and STANDBY if temporarily suspended.
- 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- Returns:
- the data collected
- Throws:
DeviceException
-
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:
-
prepareForCollection
Description copied from class:DetectorBaseDefault which should be overridden by subclasses.- Specified by:
prepareForCollectionin interfaceDetector- Overrides:
prepareForCollectionin classDetectorBase- Throws:
DeviceException- See Also:
-
setHV
Sets the high voltage input in millivolt for the detector.- Specified by:
setHVin interfaceEtlDetector- Parameters:
mv-- Throws:
DeviceException
-
getActualHV
Gets the actual output high voltage at the detector.- Specified by:
getActualHVin interfaceEtlDetector- Returns:
- actual output high voltage at the detector
- Throws:
DeviceException
-
getHV
Gets the requested High Voltage from the detector register.- Specified by:
getHVin interfaceEtlDetector- Returns:
- requested High Voltage from the detector register
- Throws:
DeviceException
-
setUpperThreshold
Sets the window's upper threshold for the detector.- Specified by:
setUpperThresholdin interfaceEtlDetector- Parameters:
ulim-- Throws:
DeviceException
-
getUpperThreshold
Gets the window's upper threshold from the detector.- Specified by:
getUpperThresholdin interfaceEtlDetector- Returns:
- window's upper threshold from the detector
- Throws:
DeviceException
-
setLowerThreshold
Sets the window's lower threshold of the detector.- Specified by:
setLowerThresholdin interfaceEtlDetector- Parameters:
llim-- Throws:
DeviceException
-
getLowerThreshold
Gets window's lower threshold from the detector.- Specified by:
getLowerThresholdin interfaceEtlDetector- Returns:
- window's lower threshold from the detector
- Throws:
DeviceException
-
toString
- Overrides:
toStringin classScannableBase
-
formatPosition
Does the same job as the other formatPosition method except rather than using a supplied format string, use the index of the array of formats this object holds. This is to be used when an object has multiple elements which descibe its position and those element require different formatting.- Parameters:
format- the index in the array of formats to usenumber- the number to format- Returns:
- a formatted string
-
update
- Parameters:
theObserved-changeCode-
-
addMonitor
- Parameters:
channel-l-- Throws:
DeviceException
-
getScalerChannelIndex
public int getScalerChannelIndex()- Returns:
- scaler channel index
-
setScalerChannelIndex
public void setScalerChannelIndex(int scalerChannelIndex) - Parameters:
scalerChannelIndex-
-
setName
Description copied from class:DeviceBaseSet the name of the device- Specified by:
setNamein interfaceFindable- Overrides:
setNamein classDeviceBase- Parameters:
name- The name to set.
-
getName
Description copied from class:DeviceBaseGet the name of the device- Specified by:
getNamein interfaceFindable- Overrides:
getNamein classDeviceBase- Returns:
- Returns the name.
-
getScalerName
- Returns:
- Returns the memoryName.
-
setScalerName
Sets the scaler name.- Parameters:
scalerName- The scaler name
-
getDetectorName
Gets the detector name.- Returns:
- The detector name
-
setDetectorName
Sets the detector name.- Parameters:
detectorName- The detector name
-
getScaler
gets the scaler object- Returns:
- the scaler object
-
setScaler
sets the scaler object- Parameters:
scaler-
-
getDetector
gets the detector object- Returns:
- the detector object
-
setDetector
sets the detector object- Parameters:
detector-
-
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
-