Package org.eclipse.scanning.device
Class CommonBeamlineDevicesConfiguration
java.lang.Object
gda.factory.FindableBase
org.eclipse.scanning.device.CommonBeamlineDevicesConfiguration
- All Implemented Interfaces:
Findable
A bean specifying the names of common device types present on most beamlines. This is
used to add metadata for these devices to the nexus tree for all scans on the beamline
when using NexusScanDataWriter or new scanning. Typically, each device will
be an instance of some class implementing
INexusDevice and be registered
with the INexusDeviceService.-
Constructor Summary
ConstructorsConstructorDescriptionDo not call this constructor directly except in test code. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalDeviceName(String deviceName) voidaddAdditionalDeviceNames(Collection<String> deviceNames) voiddisableDevice(String deviceName) voiddisableDevices(String... deviceNames) voidenableDevice(String deviceName) voidenableDevices(String... deviceNames) Returns the set of additional metadata device names (i.e.Returns the name of theINexusDevicethat will contribute theNXbeamgroup to the nexus file.Returns the name of theINexusDevicethat will contribute theNXbending_magnetgroup to the nexus file.Returns the name of theINexusDevicethat will contribute theNXinsertion_devicegroup to the nexus file.Returns the configuredCommonBeamlineDevicesConfigurationinstance if one has been configured.Returns the name of theINexusDevicethat will contribute theNXbending_magnetgroup to the nexus file.Returns the name of theINexusDevicethat will contribute theNXsourcegroup to the nexus file.booleanbooleanbooleanbooleanisMandatoryDeviceName(String deviceName) voidremoveAdditionalDeviceName(String deviceName) voidsetAdditionalDeviceNames(Set<String> additionalDeviceNames) voidsetBeamName(String beamName) voidsetBendingMagnetName(String bendingMagnetName) voidsetDisabledDeviceNames(Set<String> disabledDeviceNames) voidsetEnabled(boolean enabled) voidsetEnforceMandatoryDeviceNames(boolean enforceMandatoryDeviceNames) voidsetInsertionDeviceName(String insertionDeviceName) static voidsetInstance(CommonBeamlineDevicesConfiguration newInstance) Sets theCommonBeamlineDevicesConfiguration.voidsetLaboratoryConfig(boolean laboratoryConfig) voidsetMandatoryDeviceNames(Set<String> mandatoryDeviceNames) voidsetMonochromatorName(String monochromatorName) voidsetSourceName(String sourceName) voidsetUserDeviceName(String userDeviceName) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
CommonBeamlineDevicesConfiguration
public CommonBeamlineDevicesConfiguration()Do not call this constructor directly except in test code. It should declared in spring and accessed viagetInstance(). For use in test code only!
-
-
Method Details
-
getInstance
Returns the configuredCommonBeamlineDevicesConfigurationinstance if one has been configured. In GDA this will normally be configured via spring. Test code should callsetInstance(CommonBeamlineDevicesConfiguration). Not thread-safe.- Returns:
- the instance of this bean class
-
setInstance
Sets theCommonBeamlineDevicesConfiguration. Note: For use in test code only! Not thread-safe -
isEnforceMandatoryDeviceNames
public boolean isEnforceMandatoryDeviceNames() -
setEnforceMandatoryDeviceNames
public void setEnforceMandatoryDeviceNames(boolean enforceMandatoryDeviceNames) -
getSourceName
Returns the name of theINexusDevicethat will contribute theNXsourcegroup to the nexus file. The classSourceNexusDeviceis provided for this purpose.- Returns:
- name of source nexus device
-
setSourceName
-
getInsertionDeviceName
Returns the name of theINexusDevicethat will contribute theNXinsertion_devicegroup to the nexus file. The classInsertionDeviceNexusDeviceis provided for this purpose. Note that only this field orgetBendingMagnetName()should be set.- Returns:
- name of insertion device nexus device
-
setInsertionDeviceName
-
getBendingMagnetName
Returns the name of theINexusDevicethat will contribute theNXbending_magnetgroup to the nexus file. Note that only this field orgetInsertionDeviceName()should be set.- Returns:
- name of the bending magnet nexus device
-
setBendingMagnetName
-
getMonochromatorName
Returns the name of theINexusDevicethat will contribute theNXbending_magnetgroup to the nexus file. The classMonochromatorNexusDeviceis provided for this purpose.- Returns:
- name of monochromator nexus device
-
setMonochromatorName
-
getBeamName
Returns the name of theINexusDevicethat will contribute theNXbeamgroup to the nexus file. The classBeamNexusDeviceis provided for this purpose.- Returns:
- name of beam nexus device
-
setBeamName
-
getUserDeviceName
-
setUserDeviceName
-
setAdditionalDeviceNames
-
getAdditionalDeviceNames
Returns the set of additional metadata device names (i.e. additional to those with specific fields in this class) to be added to all scans.- Returns:
- additional device names
-
addAdditionalDeviceName
-
addAdditionalDeviceNames
-
removeAdditionalDeviceName
-
setDisabledDeviceNames
-
getMandatoryDeviceNames
-
setMandatoryDeviceNames
-
isMandatoryDeviceName
-
getDisabledDeviceNames
-
enableDevice
-
enableDevices
-
disableDevice
-
disableDevices
-
getCommonDeviceNames
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
isLaboratoryConfig
public boolean isLaboratoryConfig() -
setLaboratoryConfig
public void setLaboratoryConfig(boolean laboratoryConfig)
-