31 "The \"SOLENOID\" element defines a Solenoid.") {
33 (
"KS",
"Normalised solenoid strength in m**(-1)");
35 (
"DKS",
"Normalised solenoid strength error in m**(-1)");
37 (
"FMAPFN",
"Solenoid field map filename ");
39 (
"FAST",
"Faster but less accurate",
true);
OpalSolenoid()
Exemplar constructor.
virtual void update()
Update the embedded CLASSIC solenoid.
static AttCell * registerStringAttribute(const std::string &name)
Register a ``string'' element attribute.
Interface for basic beam line object.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
double getP0() const
Return value of global reference momentum.
ValueFlag
Switch for value desired on ATTLIST command.
virtual void setBz(double Bz)
Set field.
virtual ElementBase * removeWrappers()
Return the design element.
virtual void setElementLength(double length)
Set design length.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual OpalSolenoid * clone(const std::string &name)
Make clone.
virtual double getElementLength() const override
Get design length.
bool getBool(const Attribute &attr)
Return logical value.
Tepresentation for a solenoid magnet.
static OpalData * getInstance()
static std::map< std::string, OwnPtr< AttCell > > attributeRegistry
The registry for named attributes.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
constexpr double c
The velocity of light in m/s.
Base class for all beam line elements.
void setElement(ElementBase *)
Assign new CLASSIC element.
void registerOwnership() const
virtual void update()
Update the embedded CLASSIC element.
void setFieldMapFN(std::string fn)
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
ElementBase * getElement() const
Return the embedded CLASSIC element.
virtual double getBz() const
Get field.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
static AttCell * registerRealAttribute(const std::string &name)
Register a ``real'' element attribute.
std::string getString(const Attribute &attr)
Get string value.