Package gda.data.scan.datawriter
Class SrsDataFile
java.lang.Object
gda.data.scan.datawriter.DataWriterBase
gda.data.scan.datawriter.IncrementalFile
gda.data.scan.datawriter.SrsDataFile
- All Implemented Interfaces:
DataWriter,IDataWriterExtender
An extension of IncrementalFile class which produces files in the SRS ascii format. It uses the reference of the scan
which created this datahandler to determine which columns to have in the output. The header information is passed as
an ArrayList with: element 0 is title element 1 is condition1 element 2 is condition2 element 3 is
condition3 element 4 - n are comments
&SRS SRSRUN=129283,SRSDAT=040910,SRSTIM=181147, SRSSTN='W164',SRSPRJ='POWDERDF',SRSEXP='12345432', SRSTLE='k733a ', SRSCN1='k733 aft',SRSCN2='room tem',SRSCN3='drot 3 s', &END Calib A with error 0.0000 0.0000 Detector 2 Angle 0 Calib B with error 1.000000 0.000000 SPECTRUM 1 Accumulation Time for Data = 120.000 Seconds Current Temp 0.0000 Set Point 0.0000 Active segment 0.0000 Active program 0.0000 Program Elapsed time 0.0000 Time parameters read TEMP/TIME DISABLED DEDS time stamp Fri Sep 10 18:13:49 2004 119. 70. 51. 49. 42. 29. 47. 45. etc...
The columns may be automatically aligned to the headers by setting the java property gda.data.scan.datawriter.dataFormat.SrsDataFile.aligncolumns to true
-
Field Summary
Fields inherited from class gda.data.scan.datawriter.IncrementalFile
currentFileName, dataDir, file, fileExtension, fileName, fileNumberConfigured, filePrefix, fileUrl, firstData, thisFileNumberFields inherited from class gda.data.scan.datawriter.DataWriterBase
delimiter, header, terminalPrinter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddData(IScanDataPoint dataPoint) for incremental addition of data.voidSets the header of the datahandlervoidThis should be extended by inheriting classes.voidThis should be extended by inheriting classes.voidThis should be extended by inheriting classes.Methods inherited from class gda.data.scan.datawriter.IncrementalFile
completeCollection, configureScanNumber, createNextFile, destroy, getCurrentFileName, getCurrentScanIdentifier, getDataDir, getDelimiter, getFileNumber, prepareForCollection, releaseFile, setDelimiter, setFilePrefixMethods inherited from class gda.data.scan.datawriter.DataWriterBase
addData, addDataWriterExtender, completeCollection, getDetectorData, getDetectorData, getHeader, removeDataWriterExtender, setHeaderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.data.scan.datawriter.DataWriter
scanStart
-
Constructor Details
-
SrsDataFile
public SrsDataFile()Constructor
-
-
Method Details
-
addData
for incremental addition of data.data should be in the form of a double array. This data will be tab separated, terminated with an "\n", and appended to the open file.
- Specified by:
addDatain interfaceDataWriter- Overrides:
addDatain classDataWriterBase- Parameters:
dataPoint- Object- Throws:
Exception
-
setHeader
Description copied from interface:DataWriterSets the header of the datahandler- Parameters:
header- String
-
writeHeader
public void writeHeader()Description copied from class:IncrementalFileThis should be extended by inheriting classes.- Specified by:
writeHeaderin classIncrementalFile
-
writeColumnHeadings
public void writeColumnHeadings()Description copied from class:IncrementalFileThis should be extended by inheriting classes.- Specified by:
writeColumnHeadingsin classIncrementalFile
-