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 void
addCorrectorInvertFilter(NameFilter filter)
adds a filter, which defines that some correctors shall be inverted.void
addMonitorInvertFilter(NameFilter filter)
adds a filter which defines that some monitors shall be invertedvoid
addPostUseFile(ModelFile postUseFile)
adds a file that shall be executed after the use-command.RangeDefinitionImpl
clone()
boolean
equals(java.lang.Object obj)
ApertureDefinition
getApertureDefinition()
java.util.List<NameFilter>
getCorrectorInvertFilters()
MadxRange
getMadxRange()
java.util.List<NameFilter>
getMonitorInvertFilters()
java.lang.String
getName()
java.util.List<ModelFile>
getPostUseFiles()
java.util.Collection<ModelFile>
getRequiredFiles()
SequenceDefinition
getSequenceDefinition()
java.lang.String
getStartElementName()
If this is non-null, then the sequence is rotated to start at the element of the given name before use.TwissInitialConditionsImpl
getTwiss()
int
hashCode()
void
setApertureDefinition(ApertureDefinition apertureDefinition)
void
setMadxRange(MadxRange madxRange)
void
setSequenceDefinition(SequenceDefinition sequenceDefinition)
void
setStartElementName(java.lang.String startElementName)
java.lang.String
toString()
java.lang.String
toStringFull()
-
-
-
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:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
getTwiss
public final TwissInitialConditionsImpl getTwiss()
- Specified by:
getTwiss
in interfaceRangeDefinition
- Returns:
- the twiss
-
getName
public java.lang.String getName()
- Specified by:
getName
in 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:
getMonitorInvertFilters
in 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:
getCorrectorInvertFilters
in 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:
getPostUseFiles
in interfaceRangeDefinition
- Returns:
- the postUseFiles
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getSequenceDefinition
public SequenceDefinition getSequenceDefinition()
- Specified by:
getSequenceDefinition
in interfaceRangeDefinition
- Returns:
- the sequenceDefinition this range belongs to
-
setSequenceDefinition
public void setSequenceDefinition(SequenceDefinition sequenceDefinition)
-
getApertureDefinition
public ApertureDefinition getApertureDefinition()
- Specified by:
getApertureDefinition
in interfaceRangeDefinition
- Returns:
- the aperture-definition of this range
-
setApertureDefinition
public void setApertureDefinition(ApertureDefinition apertureDefinition)
-
getRequiredFiles
public java.util.Collection<ModelFile> getRequiredFiles()
- Specified by:
getRequiredFiles
in interfaceModelFileDependant
- Returns:
- all the
ModelFile
s that are required by this definition-component.
-
setMadxRange
public void setMadxRange(MadxRange madxRange)
-
getMadxRange
public MadxRange getMadxRange()
- Specified by:
getMadxRange
in interfaceRangeDefinition
- Returns:
- the range for madx
-
getStartElementName
public java.lang.String getStartElementName()
Description copied from interface:RangeDefinition
If this is non-null, then the sequence is rotated to start at the element of the given name before use.- Specified by:
getStartElementName
in interfaceRangeDefinition
- Returns:
- the name of an element or
null
.
-
setStartElementName
public void setStartElementName(java.lang.String startElementName)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toStringFull
public java.lang.String toStringFull()
-
-