Class YaspFileReader
- java.lang.Object
-
- cern.accsoft.steering.util.meas.read.yasp.YaspFileReader
-
- All Implemented Interfaces:
ReadingDataReader
- Direct Known Subclasses:
YaspCorrectorKickDataReader
public class YaspFileReader extends java.lang.Object implements ReadingDataReader
this is the base class for readers, which read yasp-output files.
-
-
Constructor Summary
Constructors Constructor Description YaspFileReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CorrectorValueparseCorrectorLine(java.lang.String line)parses a line and puts the values into a corrector-object.protected MonitorValueparseMonitorLine(java.lang.String line)parses a line and puts the values into a monitor-object.ReadingDataread(java.io.File file)reads the data and returns a new instance of anReadingDataobject.ReadingDataread(java.io.File file, ReadSelectionFilter selection)reads the data and returns a new instance of anReadingDataobject.protected voidread(java.io.File file, ReadSelectionFilter filter, ReadingDataImpl readingData)reads the data from a file using the given selection filter and puts the data into the giving reading data.
-
-
-
Method Detail
-
read
public ReadingData read(java.io.File file) throws ReaderException
Description copied from interface:ReadingDataReaderreads the data and returns a new instance of anReadingDataobject. Values for all correctors and monitors are loaded.- Specified by:
readin interfaceReadingDataReader- Parameters:
file- the file from which to load the data- Returns:
- the newly loaded data
- Throws:
ReaderException
-
read
public ReadingData read(java.io.File file, ReadSelectionFilter selection) throws ReaderException
Description copied from interface:ReadingDataReaderreads the data and returns a new instance of anReadingDataobject.- Specified by:
readin interfaceReadingDataReader- Parameters:
file- The file from which to read the dataselection- a filter which allows to only load values for certain elements- Returns:
- the
ReadingData - Throws:
ReaderException- if an error occures during reading
-
read
protected final void read(java.io.File file, ReadSelectionFilter filter, ReadingDataImpl readingData) throws YaspReaderExceptionreads the data from a file using the given selection filter and puts the data into the giving reading data. This method might be called by subclasses, which want to to setup the object beforehand.- Parameters:
file- the file from which to read the datafilter- the filter to use for loading the datareadingData- the data object into which to put the data- Throws:
YaspReaderException- if reading returns errors
-
parseCorrectorLine
protected CorrectorValue parseCorrectorLine(java.lang.String line) throws InconsistentYaspFileException
parses a line and puts the values into a corrector-object.- Parameters:
line- the line to parse- Returns:
- the corrector.
- Throws:
InconsistentYaspFileException
-
parseMonitorLine
protected MonitorValue parseMonitorLine(java.lang.String line) throws InconsistentYaspFileException
parses a line and puts the values into a monitor-object.- Parameters:
line- the line to parse- Returns:
- the monitor.
- Throws:
InconsistentYaspFileException
-
-