Class NexusXmapFluorescenceDetectorAdapter

java.lang.Object
gda.device.detector.xmap.NexusXmapFluorescenceDetectorAdapter
All Implemented Interfaces:
Findable, gda.observable.IObservable, org.springframework.beans.factory.InitializingBean, FluorescenceDetector

@ServiceInterface(FluorescenceDetector.class) public class NexusXmapFluorescenceDetectorAdapter extends Object implements FluorescenceDetector, org.springframework.beans.factory.InitializingBean, gda.observable.IObservable
This adapter class allows NexusXmap to be used as a FluorescenceDetector and use the same interface as
invalid reference
Xspress2Detector
,
invalid reference
Xspress3Detector
and
invalid reference
Xspress4Detector
. Detectors using this interface can be RMI exported from server to client and used in
invalid reference
FluorescenceDetectorComposite
.
  • Field Details

  • Constructor Details

    • NexusXmapFluorescenceDetectorAdapter

      public NexusXmapFluorescenceDetectorAdapter(NexusXmap xmap, int numberOfElements)
  • Method Details

    • getMCAData

      public double[][] getMCAData(double time) throws DeviceException
      Description copied from interface: FluorescenceDetector
      Perform a 'snapshot' data collection and return the MCA data. No file writing is involved.
      Specified by:
      getMCAData in interface FluorescenceDetector
      Parameters:
      time - The collection time in milliseconds
      Returns:
      the MCA data as a double array: [detector element][MCA channel]
      Throws:
      DeviceException
    • getNumberOfElements

      public int getNumberOfElements()
      Specified by:
      getNumberOfElements in interface FluorescenceDetector
      Returns:
      The number of detector elements (sometimes also called channels but this risks confusion with the channels which make up the MCA)
    • getMCASize

      public int getMCASize()
      Specified by:
      getMCASize in interface FluorescenceDetector
      Returns:
      The number of channels in the MCA (Multi-Channel Analyser)
    • getMaxNumberOfRois

      public int getMaxNumberOfRois()
      Specified by:
      getMaxNumberOfRois in interface FluorescenceDetector
      Returns:
      The maximum number of ROIs per channel
    • applyConfigurationParameters

      public void applyConfigurationParameters(FluorescenceDetectorParameters parameters) throws Exception
      Description copied from interface: FluorescenceDetector
      Configure the detector using the given parameters
      Specified by:
      applyConfigurationParameters in interface FluorescenceDetector
      Parameters:
      parameters -
      Throws:
      Exception
    • getConfigurationParameters

      public FluorescenceDetectorParameters getConfigurationParameters()
      Specified by:
      getConfigurationParameters in interface FluorescenceDetector
      Returns:
      The current detector configuration
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • setName

      public void setName(String name)
      Description copied from interface: Findable
      Set or change the name of the object (as defined in XML).
      Specified by:
      setName in interface Findable
      Parameters:
      name - the object name
    • getName

      public String getName()
      Description copied from interface: Findable
      Get the object name. Used by Castor to check if the object name has been set before calling the Findable.setName(String) method.
      Specified by:
      getName in interface Findable
      Returns:
      a String containing the object name.
    • addIObserver

      public void addIObserver(gda.observable.IObserver observer)
      Specified by:
      addIObserver in interface gda.observable.IObservable
    • deleteIObserver

      public void deleteIObserver(gda.observable.IObserver observer)
      Specified by:
      deleteIObserver in interface gda.observable.IObservable
    • deleteIObservers

      public void deleteIObservers()
      Specified by:
      deleteIObservers in interface gda.observable.IObservable
    • getXmap

      public NexusXmap getXmap()
    • isMcaCollectionUsesTfg

      public boolean isMcaCollectionUsesTfg()
    • setMcaCollectionUsesTfg

      public void setMcaCollectionUsesTfg(boolean mcaDataUsesTfg)
    • isWriteHDF5Files

      public boolean isWriteHDF5Files()
      This class is used for step scans and no HDF file are produced.
      Specified by:
      isWriteHDF5Files in interface FluorescenceDetector
      Returns:
      true if detector creates an HDF5 file during a scan. This is normally created by Epics via the HDF plugin of the area detector.
    • setWriteHDF5Files

      public void setWriteHDF5Files(boolean writeHDF5Files)
      Description copied from interface: FluorescenceDetector
      Set to true to configure the detector to write an HDF5 file during a scan.
      Specified by:
      setWriteHDF5Files in interface FluorescenceDetector
      Parameters:
      writeHDF5Files -
    • getDeadtimeCorrectionFactors

      public double[] getDeadtimeCorrectionFactors() throws DeviceException
      Specified by:
      getDeadtimeCorrectionFactors in interface FluorescenceDetector
      Returns:
      An array of 'deadtime correction' factor values (one for each element of the detector)
      Throws:
      DeviceException