Class Cavity
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
org.scictrl.mp.orbitcorrect.model.optics.Cavity
- All Implemented Interfaces:
Cloneable
,ISimpleElement
Cavity represent cavity.
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ConstantPR_BETRF=9
static final int
ConstantPR_HARMON=8
static final int
ConstantPR_LAG=7
static final int
ConstantPR_PG=10
static final int
ConstantPR_SHUNT=11
static final int
ConstantPR_TFILL=12
static final int
ConstantPR_VOLTAGE=6
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
length, matrices, matrix, PR_LENGTH
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
PR_POSITION, PR_REL_FROM, PR_REL_POSITION
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
lastActionResult, owner, PR_ELEMENT_NAME, PR_VIRTUAL
-
Constructor Summary
ConstructorDescriptionCavity constructor that takes only name as parameter.Cavity
(String name, boolean virtual, double position, double relpos, String relFrom, double length, double voltage, double lag, int harmon, double betRF, double pG, double shunt, double tFill) Constructs theCavity
with specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the descriptor object for this element.int
elType()
Returns the code of element's type.double
getBetRF()
Getter for the fieldbetRF
.int
Getter for the fieldharmon
.double
getLag()
Getter for the fieldlag
.double
getPG()
Getter for the fieldpG
.double
getShunt()
Getter for the fieldshunt
.double
getTFill()
Getter for the fieldtFill
.double
This method return voltage on cavity.void
setBetRF
(double newValue) Setter for the fieldbetRF
.void
setHarmon
(int newValue) Setter for the fieldharmon
.void
setLag
(double newValue) Setter for the fieldlag
.void
setPG
(double newValue) Setter for the fieldpG
.void
setShunt
(double newValue) Setter for the fieldshunt
.void
setTFill
(double newValue) Setter for the fieldtFill
.void
setVoltage
(double newValue) This method set voltage to cavity.void
Sets parameters values of this element to those in parameter array.toString()
Returns the string representation of this element.Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
clone, getAlpha1, getAlpha2, getBeta1, getBeta2, getDispersion1, getDispersion2, getLength, getMatrix, getQ1, getQ2, newMatrix, newMatrix, setLength
Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
getAlpha, getBeta, getDispersion, getIndex, getPosition, getQ, getRelFrom, getRelPosition, setPosition, setRelFrom, setRelPosition
Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
equals, getLastActionResult, getName, getOwner, getVirtual, hashCode, isInitialized, isVirtual, setVirtual, throwISE
-
Field Details
-
PR_VOLTAGE
public static final int PR_VOLTAGEConstantPR_VOLTAGE=6
- See Also:
-
PR_LAG
public static final int PR_LAGConstantPR_LAG=7
- See Also:
-
PR_HARMON
public static final int PR_HARMONConstantPR_HARMON=8
- See Also:
-
PR_BETRF
public static final int PR_BETRFConstantPR_BETRF=9
- See Also:
-
PR_PG
public static final int PR_PGConstantPR_PG=10
- See Also:
-
PR_SHUNT
public static final int PR_SHUNTConstantPR_SHUNT=11
- See Also:
-
PR_TFILL
public static final int PR_TFILLConstantPR_TFILL=12
- See Also:
-
-
Constructor Details
-
Cavity
Cavity constructor that takes only name as parameter.- Parameters:
name
- aString
object
-
Cavity
public Cavity(String name, boolean virtual, double position, double relpos, String relFrom, double length, double voltage, double lag, int harmon, double betRF, double pG, double shunt, double tFill) Constructs theCavity
with specified parameters.
-
-
Method Details
-
descriptor
Returns the descriptor object for this element.DBElementDescriptor
helps manipulating DataBush elements dynamically.descriptor.
- Specified by:
descriptor
in classAbstractDataBushElement
- Returns:
- the descriptor object for this element.
- See Also:
-
elType
public int elType()Returns the code of element's type.elType.
- Specified by:
elType
in classAbstractDataBushElement
- Returns:
- the code of element's type.
- See Also:
-
getBetRF
public double getBetRF()Getter for the field
betRF
.- Returns:
- double
-
getHarmon
public int getHarmon()Getter for the field
harmon
.- Returns:
- int
-
getLag
public double getLag()Getter for the field
lag
.- Returns:
- double
-
getPG
public double getPG()Getter for the field
pG
.- Returns:
- double
-
getShunt
public double getShunt()Getter for the field
shunt
.- Returns:
- double
-
getTFill
public double getTFill()Getter for the field
tFill
.- Returns:
- double
-
getVoltage
public double getVoltage()This method return voltage on cavity.- Returns:
double
voltage value
-
setBetRF
public void setBetRF(double newValue) Setter for the field
betRF
.- Parameters:
newValue
- double
-
setHarmon
public void setHarmon(int newValue) Setter for the field
harmon
.- Parameters:
newValue
- int
-
setLag
public void setLag(double newValue) Setter for the field
lag
.- Parameters:
newValue
- double
-
setPG
public void setPG(double newValue) Setter for the field
pG
.- Parameters:
newValue
- double
-
setShunt
public void setShunt(double newValue) Setter for the field
shunt
.- Parameters:
newValue
- double
-
setTFill
public void setTFill(double newValue) Setter for the field
tFill
.- Parameters:
newValue
- double
-
setVoltage
public void setVoltage(double newValue) This method set voltage to cavity.- Parameters:
newValue
- a double
-
setWith
Sets parameters values of this element to those in parameter array. As parameter must be used such array as for dynamical construction of new instance of this class. Current values are overriden for each notnull
object in array.setWith.
setWith.
setWith.
- Overrides:
setWith
in classAbstractTransferElement
- Parameters:
par
- an array ofObject
objects- Throws:
IllegalStateException
- if element is initialized and inside DataBush.- See Also:
-
toString
Returns the string representation of this element. Returns string describing this element. String is formated in input-file code. Returns a String that represents the value of this object.toString.
toString.
- Specified by:
toString
in interfaceISimpleElement
- Overrides:
toString
in classAbstractTransferElement
- See Also:
-