Class ETLDetector

All Implemented Interfaces:
Detector, Device, EtlDetector, Scannable, Configurable, Findable, gda.observable.IObservable, Serializable

public class ETLDetector extends DetectorBase implements EtlDetector
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:
  • Constructor Details

    • ETLDetector

      public ETLDetector()
      The Constructor.
  • Method Details

    • getFastshutter

      public EpicsSimpleMbbinary getFastshutter()
    • setFastshutter

      public void setFastshutter(EpicsSimpleMbbinary fastshutter)
    • isShutterOpened

      public boolean isShutterOpened()
    • setShutterOpened

      public void setShutterOpened(boolean shutterOpened)
    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • atScanStart

      public void atScanStart() throws DeviceException
      Description copied from class: ScannableBase
      Called 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:
      atScanStart in interface Scannable
      Overrides:
      atScanStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • openShutter

      public void openShutter() throws DeviceException
      Throws:
      DeviceException
    • atScanEnd

      public void atScanEnd() throws DeviceException
      Description copied from class: ScannableBase
      Called 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:
      atScanEnd in interface Scannable
      Overrides:
      atScanEnd in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • closeShutter

      public void closeShutter() throws DeviceException
      Throws:
      DeviceException
    • stop

      public void stop() throws DeviceException
      Description copied from class: ScannableBase
      Stop 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:
      stop in interface Scannable
      Overrides:
      stop in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • setCollectionTime

      public void setCollectionTime(double time)
      Sets the collection time for the scalers
      Specified by:
      setCollectionTime in interface Detector
      Overrides:
      setCollectionTime in class DetectorBase
      Parameters:
      time - period to count
    • collectData

      public void collectData() throws DeviceException
      Description copied from interface: Detector
      Tells 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:
      collectData in interface Detector
      Throws:
      DeviceException
    • getStatus

      public int getStatus() throws DeviceException
      Description copied from interface: Detector
      Returns the current collecting state of the device.
      Specified by:
      getStatus in interface Detector
      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

      public Object readout() throws DeviceException
      Description copied from interface: Detector
      Returns 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_CONCURRENTLY is true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. See Detector.waitWhileBusy() and ConcurrentScan. Readout must block until the detector is ready to respond quickly to Detector.collectData() again.

      Specified by:
      readout in interface Detector
      Returns:
      the data collected
      Throws:
      DeviceException
    • getDataDimensions

      public int[] getDataDimensions() throws DeviceException
      Description copied from class: DetectorBase
      Default which should be overridden by subclasses.
      Specified by:
      getDataDimensions in interface Detector
      Overrides:
      getDataDimensions in class DetectorBase
      Returns:
      the dimensions of the data object returned by the Detector.readout() method
      Throws:
      DeviceException
      See Also:
    • prepareForCollection

      public void prepareForCollection() throws DeviceException
      Description copied from class: DetectorBase
      Default which should be overridden by subclasses.
      Specified by:
      prepareForCollection in interface Detector
      Overrides:
      prepareForCollection in class DetectorBase
      Throws:
      DeviceException
      See Also:
    • setHV

      public void setHV(int mv) throws DeviceException
      Sets the high voltage input in millivolt for the detector.
      Specified by:
      setHV in interface EtlDetector
      Parameters:
      mv -
      Throws:
      DeviceException
    • getActualHV

      public int getActualHV() throws DeviceException
      Gets the actual output high voltage at the detector.
      Specified by:
      getActualHV in interface EtlDetector
      Returns:
      actual output high voltage at the detector
      Throws:
      DeviceException
    • getHV

      public int getHV() throws DeviceException
      Gets the requested High Voltage from the detector register.
      Specified by:
      getHV in interface EtlDetector
      Returns:
      requested High Voltage from the detector register
      Throws:
      DeviceException
    • setUpperThreshold

      public void setUpperThreshold(int ulim) throws DeviceException
      Sets the window's upper threshold for the detector.
      Specified by:
      setUpperThreshold in interface EtlDetector
      Parameters:
      ulim -
      Throws:
      DeviceException
    • getUpperThreshold

      public int getUpperThreshold() throws DeviceException
      Gets the window's upper threshold from the detector.
      Specified by:
      getUpperThreshold in interface EtlDetector
      Returns:
      window's upper threshold from the detector
      Throws:
      DeviceException
    • setLowerThreshold

      public void setLowerThreshold(int llim) throws DeviceException
      Sets the window's lower threshold of the detector.
      Specified by:
      setLowerThreshold in interface EtlDetector
      Parameters:
      llim -
      Throws:
      DeviceException
    • getLowerThreshold

      public int getLowerThreshold() throws DeviceException
      Gets window's lower threshold from the detector.
      Specified by:
      getLowerThreshold in interface EtlDetector
      Returns:
      window's lower threshold from the detector
      Throws:
      DeviceException
    • toString

      public String toString()
      Overrides:
      toString in class ScannableBase
    • formatPosition

      public String 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. 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 use
      number - the number to format
      Returns:
      a formatted string
    • update

      public void update(Object theObserved, Object changeCode)
      Parameters:
      theObserved -
      changeCode -
    • addMonitor

      public void addMonitor(int channel, gov.aps.jca.event.MonitorListener l) throws DeviceException
      Parameters:
      channel -
      l -
      Throws:
      DeviceException
    • getScalerChannelIndex

      public int getScalerChannelIndex()
      Returns:
      scaler channel index
    • setScalerChannelIndex

      public void setScalerChannelIndex(int scalerChannelIndex)
      Parameters:
      scalerChannelIndex -
    • setName

      public void setName(String name)
      Description copied from class: DeviceBase
      Set the name of the device
      Specified by:
      setName in interface Findable
      Overrides:
      setName in class DeviceBase
      Parameters:
      name - The name to set.
    • getName

      public String getName()
      Description copied from class: DeviceBase
      Get the name of the device
      Specified by:
      getName in interface Findable
      Overrides:
      getName in class DeviceBase
      Returns:
      Returns the name.
    • getScalerName

      public String getScalerName()
      Returns:
      Returns the memoryName.
    • setScalerName

      public void setScalerName(String scalerName)
      Sets the scaler name.
      Parameters:
      scalerName - The scaler name
    • getDetectorName

      public String getDetectorName()
      Gets the detector name.
      Returns:
      The detector name
    • setDetectorName

      public void setDetectorName(String detectorName)
      Sets the detector name.
      Parameters:
      detectorName - The detector name
    • getScaler

      public EpicsScaler getScaler()
      gets the scaler object
      Returns:
      the scaler object
    • setScaler

      public void setScaler(EpicsScaler scaler)
      sets the scaler object
      Parameters:
      scaler -
    • getDetector

      public EpicsETLController getDetector()
      gets the detector object
      Returns:
      the detector object
    • setDetector

      public void setDetector(EpicsETLController detector)
      sets the detector object
      Parameters:
      detector -
    • createsOwnFiles

      public boolean createsOwnFiles() throws DeviceException
      Description copied from interface: Detector
      Returns 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:
      createsOwnFiles in interface Detector
      Returns:
      true if readout() returns filenames
      Throws:
      DeviceException
    • getDescription

      public String getDescription() throws DeviceException
      Specified by:
      getDescription in interface Detector
      Overrides:
      getDescription in class DetectorBase
      Returns:
      A description of the detector.
      Throws:
      DeviceException
    • getDetectorID

      public String getDetectorID() throws DeviceException
      Specified by:
      getDetectorID in interface Detector
      Overrides:
      getDetectorID in class DetectorBase
      Returns:
      A identifier for this detector.
      Throws:
      DeviceException
    • getDetectorType

      public String getDetectorType() throws DeviceException
      Specified by:
      getDetectorType in interface Detector
      Overrides:
      getDetectorType in class DetectorBase
      Returns:
      The type of detector.
      Throws:
      DeviceException