Package gda.device.scannable
Class MotorOffsetStore
java.lang.Object
gda.factory.FindableBase
gda.device.scannable.MotorOffsetStore
- All Implemented Interfaces:
Findable
Class used to manipulate Epics motor record offsets for XES spectrometer.
The current set of motor offsets for all motors in an The current set of motor records offsets can be retrieved using The latest offsets values can be saved to an XML file using A previously saved XML file can be reloaded and the the offsets applied to the motor records using
XESEnergyScannable object along
with additional information can be saved and loaded from XML file
(using Apache Common(XMLConfiguration).
getEpicsOffsets()
saveOffsets(String, String);
loadOffsets(String, String).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate mao containing additional information (key = information type) e.g.getEpicsOffsets(List<Scannable> scannables) voidloadOffsets(String directory, String fileName) Load a previously saved XML and apply the offsets to the Epics motor records.voidsaveOffsets(String directory, String fileName) Save the current Epics motor records offsets and metadata to an XML filevoidsetExtraInformation(String extraInformation) voidsetXesEnergyScannable(XESEnergyScannable xesEnergyScannable) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
MotorOffsetStore
public MotorOffsetStore()
-
-
Method Details
-
saveOffsets
public void saveOffsets(String directory, String fileName) throws org.apache.commons.configuration.ConfigurationException, IOException, DeviceException Save the current Epics motor records offsets and metadata to an XML file- Parameters:
directory- where the file should be savedfileName- name of the file to save to (without .xml suffix)- Throws:
org.apache.commons.configuration.ConfigurationExceptionIOExceptionDeviceException
-
loadOffsets
Load a previously saved XML and apply the offsets to the Epics motor records.- Parameters:
directory- containing the filefileName- of the file to be loaded- Throws:
Exception
-
createExtraProperties
Create mao containing additional information (key = information type) e.g. name of spectrometer scannable, crystal type and cut etc.- Returns:
- map
- Throws:
DeviceException
-
getEpicsOffsets
- Throws:
MotorException
-
getEpicsOffsets
- Throws:
MotorException
-
getXesEnergyScannable
-
setXesEnergyScannable
-
getExtraInformation
-
setExtraInformation
-