38 namespace OpalOffset {
 
   41     std::string(
"The \"LOCAL_CARTESIAN_OFFSET\" element defines an offset")+
 
   42     std::string(
"in cartesian coordinates, relative to the last placed ")+
 
   43     std::string(
"element.");
 
   47                      "LOCAL_CARTESIAN_OFFSET",
 
   50              "x component of position of end of the offset in coordinate system of the end of the upstream element [m].");
 
   52              "y component of position of end of the offset in coordinate system of the end of the upstream element [m].");
 
   54              "x component of normal of end of the offset in coordinate system of the end of the upstream element [m].");
 
   56              "y component of normal of end of the offset in coordinate system of the end of the upstream element [m].");
 
   90     const Offset* offset = 
dynamic_cast<const Offset*
>(&base);
 
   92         throw OpalException(
"OpalVariableRFCavity::fillRegisteredAttributes",
 
   93                             "Failed to cast ElementBase to a VariableRFCavity");
 
   98     attributeRegistry[
"END_POSITION_X"]->setReal(trans.
getVector()(2));
 
   99     attributeRegistry[
"END_POSITION_Y"]->setReal(trans.
getVector()(0));
 
  100     attributeRegistry[
"END_NORMAL_X"]->setReal(
cos(rot));
 
  101     attributeRegistry[
"END_NORMAL_Y"]->setReal(
sin(rot));
 
virtual ~OpalLocalCartesianOffset()
Interface for basic beam line object. 
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes. 
OpalLocalCartesianOffset()
ValueFlag
Switch for value desired on ATTLIST command. 
virtual void print(std::ostream &) const 
The base class for all OPAL exceptions. 
Tps< T > sin(const Tps< T > &x)
Sine. 
virtual ElementBase * removeWrappers()
Return the design element. 
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh). 
Euclid3DGeometry & getGeometry() override
Get geometry. 
const std::string & getOpalName() const 
Return object name. 
Displacement and rotation in space. 
virtual OpalLocalCartesianOffset * clone()
Base class for all beam line elements. 
void setElement(ElementBase *)
Assign new CLASSIC element. 
void registerOwnership() const 
const Rotation3D & getRotation() const 
Get rotation. 
static Offset localCartesianOffset(std::string name, Vector_t end_position, Vector_t end_direction)
ElementBase * getElement() const 
Return the embedded CLASSIC element. 
static const std::string doc_string
Tps< T > cos(const Tps< T > &x)
Cosine. 
virtual ElementBase * makeAlignWrapper()
Allow misalignment. 
void fillRegisteredAttributes(const ElementBase &base, ValueFlag flag)
virtual Euclid3D getTotalTransform() const 
Get total transform from beginning to end. 
double getReal(const Attribute &attr)
Return real value. 
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. 
Vector3D getAxis() const 
Get axis vector. 
const Vector3D & getVector() const 
Get displacement. 
virtual void print(std::ostream &) const 
Print the object.