class
AlignWrapper
: public ElementBase
(Return to index)
Define the position of a misaligned element.
An AlignWrapper is used to store misalignment errors or deliberate
misalignments. It acts as a wrapper around a component or a complete
beam line. Rotations and translations are defined about the design
local frame, which in turn is specified by the position of the element
on the design geometry. An AlignWrapper is non-sharable by default.
Type: |
Instantiable |
Superclasses: |
public ElementBase |
Include file: |
./AbsBeamline/AlignWrapper.hh |
Inheritance
Synopsis (including inherited members):
Documentation:
- Public members:
-
virtual void accept
(BeamlineVisitor&)const
;
- Apply BeamlineVisitor.
-
virtual AlignWrapper* clone
()const
;
- Return clone.
Return an identical deep copy of the wrapper and its contents.
-
virtual ElementBase* copyStructure
()
;
- Make structural copy.
-
virtual ElementBase* getElement
()const
;
- Return the contained element.
-
virtual Euclid3D getEntranceTransform
()const
;
- Get entrance patch.
Returns the entrance patch (transformation) which is used to
transform the global geometry to the local geometry at entrance
of the misaligned element.
-
virtual Euclid3D getExitTransform
()const
;
- Get exit patch.
Returns the exit patch (transformation) which is used to
transform the local geometry to the global geometry at exit of
the misaligned element.
-
virtual Geometry& getGeometry
()
;
- Get geometry.
Return the element geometry.
Version for non-constant object.
-
virtual const Geometry& getGeometry
()const
;
- Get geometry.
Return the element geometry.
Version for constant object.
-
virtual const string& getType
()const
;
- Get element type string.
Returns the type string for the enclosed item.
-
virtual ElementBase* makeAlignWrapper
()
;
- Disallow misalignment of an already misaligned object.
This method returns this, since "this" is already an
AlignWrapper.
-
virtual ElementBase* makeFieldWrapper
()
;
- Allow field errors.
Wrap the contained element in a field wrapper, unless such a
wrapper already exists.
-
virtual void makeSharable
()
;
- Set sharable flag.
The whole structure depending on this is marked as sharable.
After this call a copyStructure() call reuses the element.
-
Euclid3D& offset
()const
;
- Return the offset.
This method can be used to get or set the offset. The offset is
declared as mutable, so as to allow changing it in a constant
structure.
-
virtual ElementBase* removeAlignWrapper
()
;
- Remove AlignWrapper.
Return the element or field wrapper contained in "this".
Version for non-const object.
-
virtual const ElementBase* removeAlignWrapper
()const
;
- Remove AlignWrapper.
Return the element or field wrapper contained in "this".
Version for const object.
-
virtual ElementBase* removeFieldWrapper
()
;
- Remove field wrapper.
Remove any field wrapper on the contained object.
-
virtual const ElementBase* removeFieldWrapper
()const
;
- Remove field wrapper.
Remove the field wrapper for constant object.
-
virtual ElementBase* removeWrappers
()
;
- Return the design element.
This method removes all wrappers on the contained object.
Version for non-const object.
-
virtual const ElementBase* removeWrappers
()const
;
- Return the design element.
Version for const object.
-
void setElement
(ElementBase*)
;
- Replace the contained element.
- Friends:
-
class ElementBase
;
- Interface for basic beam line object.
This class defines the abstract interface for all objects which can be
contained in a beam line. ElementBase forms the base class for two distinct
but related hierarchies of objects:
-
A set of concrete accelerator element classes, which compose the standard
accelerator component library (SACL).
-
A second hierarchy which parallels the SACL, acting as container or
wrapper-like objects. These latter classes are used to construct
beam-lines composed of referenced ``design'' components, together with
beam-line position dependent extrinsic state (e. g. errors). These wrapper
objects are by default unique.
Also derived from ElementBase there is a class AlignWrapper, which can
be used to store misalignment errors or deliberate displacements.
Any element can have only one AlignWrapper and one FieldWrapper. To be
processed in the correct order, the AlignWrapper must be the outermost.
AlignWrapper --> FieldWrapper --> Element
To ensure this structure, wrapper elements cannot be constructed directly,
one should rather call one of:
- makeAlignWrapper()
- make an align wrapper.
- makeFieldWrapper()
- make a field wrapper.
- makeWrappers()
- make both wrappers.
An existing wrapper can be removed by
- removeAlignWrapper()
- remove align wrapper.
- removeFieldWrapper()
- remove field wrapper.
Instances of the concrete classes for single elements are by default
sharable. Instances of beam lines, wrappers and integrators are by
default non-sharable, but they may be made sharable by a call to
makeSharable().
An ElementBase object can return two lengths, which may be different:
-
The arc length along the geometry.
-
The design length, often measured along a straight line.
Class ElementBase contains a map of name versus value for user-defined
attributes (see file AbsBeamline/AttributeSet.hh). The map is primarily
intended for processes that require algorithm-specific data in the
accelerator model.
The class ElementBase has as base class the abstract class RCObject.
Virtual derivation is used to make multiple inheritance possible for
derived concrete classes. ElementBase implements three copy modes:
-
Copy by reference: Call RCObject::addReference() and use this.
-
Copy structure: use ElementBase::copyStructure().
During copying of the structure, all sharable items are re-used, while
all non-sharable ones are cloned.
-
Copy by cloning: use ElementBase::clone().
This returns a full deep copy.
Documentation generated by fci on Mon Feb 7 11:41:30 2000