Class RangeDefinitionImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.machine.RangeDefinitionImpl
-
- All Implemented Interfaces:
ModelFileDependant,RangeDefinition,java.lang.Cloneable
public class RangeDefinitionImpl extends java.lang.Object implements RangeDefinition, java.lang.Cloneable
this class defines a range in a sequence, by defining the first and the last element.
-
-
Constructor Summary
Constructors Constructor Description RangeDefinitionImpl()default constructor.RangeDefinitionImpl(SequenceDefinition sequenceDefinition, java.lang.String name, MadxRange madxRange, TwissInitialConditionsImpl twiss)an alternative constructor, with the possibility to provide the name of the first and the last element.RangeDefinitionImpl(SequenceDefinition sequenceDefinition, java.lang.String name, TwissInitialConditionsImpl twiss)The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCorrectorInvertFilter(NameFilter filter)adds a filter, which defines that some correctors shall be inverted.voidaddMonitorInvertFilter(NameFilter filter)adds a filter which defines that some monitors shall be invertedvoidaddPostUseFile(ModelFile postUseFile)adds a file that shall be executed after the use-command.RangeDefinitionImplclone()booleanequals(java.lang.Object obj)ApertureDefinitiongetApertureDefinition()java.util.List<NameFilter>getCorrectorInvertFilters()MadxRangegetMadxRange()java.util.List<NameFilter>getMonitorInvertFilters()java.lang.StringgetName()java.util.List<ModelFile>getPostUseFiles()java.util.Collection<ModelFile>getRequiredFiles()SequenceDefinitiongetSequenceDefinition()java.lang.StringgetStartElementName()If this is non-null, then the sequence is rotated to start at the element of the given name before use.TwissInitialConditionsImplgetTwiss()inthashCode()voidsetApertureDefinition(ApertureDefinition apertureDefinition)voidsetMadxRange(MadxRange madxRange)voidsetSequenceDefinition(SequenceDefinition sequenceDefinition)voidsetStartElementName(java.lang.String startElementName)java.lang.StringtoString()java.lang.StringtoStringFull()
-
-
-
Constructor Detail
-
RangeDefinitionImpl
public RangeDefinitionImpl()
default constructor. Necessary for xstream
-
RangeDefinitionImpl
public RangeDefinitionImpl(SequenceDefinition sequenceDefinition, java.lang.String name, TwissInitialConditionsImpl twiss)
The default constructor. creates a range, which covers the whole Sequence.- Parameters:
sequenceDefinition- The sequence definition to which this range belongs toname- the name of this rangetwiss- the initial conditions for the twiss-command in this range
-
RangeDefinitionImpl
public RangeDefinitionImpl(SequenceDefinition sequenceDefinition, java.lang.String name, MadxRange madxRange, TwissInitialConditionsImpl twiss)
an alternative constructor, with the possibility to provide the name of the first and the last element.- Parameters:
sequenceDefinition- The sequence definition to which this range belongs toname- a verbose name for the rangemadxRange- the range as it has to be defined for MadXtwiss- the initial conditions for the twiss command in this range
-
-
Method Detail
-
clone
public RangeDefinitionImpl clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
getTwiss
public final TwissInitialConditionsImpl getTwiss()
- Specified by:
getTwissin interfaceRangeDefinition- Returns:
- the twiss
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceRangeDefinition- Returns:
- the name
-
addMonitorInvertFilter
public void addMonitorInvertFilter(NameFilter filter)
adds a filter which defines that some monitors shall be inverted- Parameters:
filter- the filter to add
-
getMonitorInvertFilters
public final java.util.List<NameFilter> getMonitorInvertFilters()
- Specified by:
getMonitorInvertFiltersin interfaceRangeDefinition- Returns:
- the monitorInvertFilters
-
addCorrectorInvertFilter
public void addCorrectorInvertFilter(NameFilter filter)
adds a filter, which defines that some correctors shall be inverted.- Parameters:
filter- the filter to add
-
getCorrectorInvertFilters
public final java.util.List<NameFilter> getCorrectorInvertFilters()
- Specified by:
getCorrectorInvertFiltersin interfaceRangeDefinition- Returns:
- the correctorInvertFilters
-
addPostUseFile
public void addPostUseFile(ModelFile postUseFile)
adds a file that shall be executed after the use-command.- Parameters:
postUseFile- the postUseFile to add
-
getPostUseFiles
public java.util.List<ModelFile> getPostUseFiles()
- Specified by:
getPostUseFilesin interfaceRangeDefinition- Returns:
- the postUseFiles
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getSequenceDefinition
public SequenceDefinition getSequenceDefinition()
- Specified by:
getSequenceDefinitionin interfaceRangeDefinition- Returns:
- the sequenceDefinition this range belongs to
-
setSequenceDefinition
public void setSequenceDefinition(SequenceDefinition sequenceDefinition)
-
getApertureDefinition
public ApertureDefinition getApertureDefinition()
- Specified by:
getApertureDefinitionin interfaceRangeDefinition- Returns:
- the aperture-definition of this range
-
setApertureDefinition
public void setApertureDefinition(ApertureDefinition apertureDefinition)
-
getRequiredFiles
public java.util.Collection<ModelFile> getRequiredFiles()
- Specified by:
getRequiredFilesin interfaceModelFileDependant- Returns:
- all the
ModelFiles that are required by this definition-component.
-
setMadxRange
public void setMadxRange(MadxRange madxRange)
-
getMadxRange
public MadxRange getMadxRange()
- Specified by:
getMadxRangein interfaceRangeDefinition- Returns:
- the range for madx
-
getStartElementName
public java.lang.String getStartElementName()
Description copied from interface:RangeDefinitionIf this is non-null, then the sequence is rotated to start at the element of the given name before use.- Specified by:
getStartElementNamein interfaceRangeDefinition- Returns:
- the name of an element or
null.
-
setStartElementName
public void setStartElementName(java.lang.String startElementName)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toStringFull
public java.lang.String toStringFull()
-
-