Package cern.accsoft.steering.jmad.io
Class ApertureReaderImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.io.ApertureReaderImpl
-
- All Implemented Interfaces:
ApertureReader
public class ApertureReaderImpl extends java.lang.Object implements ApertureReader
this is the implementation of the loader for aperture data
-
-
Constructor Summary
Constructors Constructor Description ApertureReaderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
loadApertureFile(java.io.File file)
Load in (full) ApertureInformation from the specified TFS-FileAperture
loadApertureIndexFile(java.io.File indexFile)
Read in the correct Name/Position relation from an ApertureIndexFilevoid
loadAperturePartFile(java.io.File file, Aperture aperture)
loads the aperture information from the given file into the data object.Aperture
readIndex(java.io.File file)
loads the aperture data from the filevoid
readValues(java.io.File file, Aperture aperture)
updates the given aperture with the values from the file.
-
-
-
Method Detail
-
readIndex
public Aperture readIndex(java.io.File file)
Description copied from interface:ApertureReader
loads the aperture data from the file- Specified by:
readIndex
in interfaceApertureReader
- Parameters:
file
- the file from which to load the data- Returns:
- a newly instance of the Aperture-data
-
readValues
public void readValues(java.io.File file, Aperture aperture)
Description copied from interface:ApertureReader
updates the given aperture with the values from the file.- Specified by:
readValues
in interfaceApertureReader
- Parameters:
file
- the file from which to read the valuesaperture
- the aperture sobject to update
-
loadApertureIndexFile
public Aperture loadApertureIndexFile(java.io.File indexFile)
Read in the correct Name/Position relation from an ApertureIndexFilewhich also contains APERTYPE and the ON_AP/ON_ELEM flags... such that we initialize the Sequence of ApertureElements with the right positions according to the machine we are using...
All VacuumMarkers are skipped --> ElementNames starts with V
- Parameters:
indexFile
- The file from which to read the aperture-index- Returns:
- an object containing all the aperture information
-
loadApertureFile
public void loadApertureFile(java.io.File file)
Load in (full) ApertureInformation from the specified TFS-FileIf ApertureIndex was read before, only ApertureInformation are updated for the specified Sequence, otherwise ApertureIndex is generated if TFS-File contains ALL Information (apertype, on_ap, on_elem, name, s)
- Parameters:
file
- the file from which to load the information
-
loadAperturePartFile
public void loadAperturePartFile(java.io.File file, Aperture aperture)
loads the aperture information from the given file into the data object.- Parameters:
file
- The file from which to load the dataaperture
- the object to update with the information
-
-