Class SingleScannableWriter
java.lang.Object
gda.data.scan.datawriter.scannablewriter.SingleScannableWriter
- All Implemented Interfaces:
ScannableWriter
- Direct Known Subclasses:
EnergyScannableWriter,TransformationWriter
At the moment this class should handle well formed scannables returning Doubles or Strings with multiple input or
extra names
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ComponentWritergetComponentWriter(String componentName, Object object, int index) protected Map<String, ComponentWriter> String[]getPaths()Retrieve a set of other Scannables that need to have their position recorded in order for this Scannable position to be valid.String[]getUnits()Collection<? extends SelfCreatingLink> makeScannable(NexusFile file, GroupNode group, Scannable s, Object position, int[] dim, boolean primary) This is the call to generate the structure in the file If onlyprotected voidfinal voidfinal voidsetPrerequisiteScannableNames(Collection<String> prerequisiteScannableNames) final voidvoidwriteScannable(NexusFile file, GroupNode group, Scannable s, Object position, int[] start)
-
Constructor Details
-
SingleScannableWriter
public SingleScannableWriter()
-
-
Method Details
-
getComponentWriter
-
resetComponentWriters
protected void resetComponentWriters() -
makeScannable
public Collection<? extends SelfCreatingLink> makeScannable(NexusFile file, GroupNode group, Scannable s, Object position, int[] dim, boolean primary) throws NexusException Description copied from interface:ScannableWriterThis is the call to generate the structure in the file If only- Specified by:
makeScannablein interfaceScannableWriter- Parameters:
file- reference to the NeXusfile with the pointer being in the current NXentrys- the scannable to writeposition- the scannable data to write (do NOT call s.getPosition() to get it!)dim- number of dimensions in the scan (or {1} for metadata only)primary- Is this scannable primary, will add primary=1 attribute to the scannables dataset- Throws:
NexusException
-
writeScannable
public void writeScannable(NexusFile file, GroupNode group, Scannable s, Object position, int[] start) throws NexusException - Specified by:
writeScannablein interfaceScannableWriter- Parameters:
file-s-position-- Throws:
NexusException
-
getPaths
-
setPaths
-
getUnits
-
setUnits
-
setPrerequisiteScannableNames
-
getPrerequisiteScannableNames
Description copied from interface:ScannableWriterRetrieve a set of other Scannables that need to have their position recorded in order for this Scannable position to be valid. This is mostly the case for motion dependencies, like in diffractometers where the location of an axis depends on other prior motors.- Specified by:
getPrerequisiteScannableNamesin interfaceScannableWriter- Returns:
- set of prequisites scannable names, never
null
-
getCwriter
-