18#ifndef SPECIFICELEMENTVISITOR_H
19#define SPECIFICELEMENTVISITOR_H
63template <
class ELEM1,
class ELEM2>
77 allElements.push_back(
dynamic_cast<const ELEM*
>(&element));
178#ifdef ENABLE_OPAL_FEL
180 virtual void visitUndulator(
const Undulator &);
224 beamline.
iterate(*
this,
false);
269 wrappedElement->
accept(*
this);
382#ifdef ENABLE_OPAL_FEL
414 return allElementsOfTypeE.size();
419 return allElementsOfTypeE.begin();
424 return allElementsOfTypeE.begin();
429 return allElementsOfTypeE.end();
434 return allElementsOfTypeE.end();
439 return allElementsOfTypeE.front();
444 return allElementsOfTypeE.front();
std::string::iterator iterator
Interface for a single beam element.
Interface for general corrector.
Interface for drift space.
virtual void accept(BeamlineVisitor &visitor) const =0
Apply visitor.
Interface for general multipole.
Ring describes a ring type geometry for tracking.
std::list< const ELEM1 * > ElementList_t
static void apply(ElementList_t &, const ELEM2 &)
std::list< const ELEM * > ElementList_t
static void apply(ElementList_t &allElements, const ELEM &element)
virtual void execute()
Execute the algorithm on the attached beam line.
virtual void visitRing(const Ring &)
Apply the algorithm to a ring.
virtual void visitBeamline(const Beamline &)
Apply the algorithm to a beam line.
virtual void visitStripper(const Stripper &)
Apply the algorithm to a particle stripper.
virtual void visitVariableRFCavity(const VariableRFCavity &vcav)
Apply the algorithm to a variable RF cavity.
virtual void visitFlaggedElmPtr(const FlaggedElmPtr &)
Apply the algorithm to a FlaggedElmPtr.
virtual void visitMarker(const Marker &)
Apply the algorithm to a marker.
virtual void visitRFCavity(const RFCavity &)
Apply the algorithm to a RF cavity.
ElementList_t allElementsOfTypeE
virtual void visitVacuum(const Vacuum &)
Apply the algorithm to a vacuum space.
ElementList_t::reference reference_t
virtual void visitVariableRFCavityFringeField(const VariableRFCavityFringeField &vcav)
Apply the algorithm to a variable RF cavity with Fringe Field..
virtual void visitMultipoleTCurvedConstRadius(const MultipoleTCurvedConstRadius &)
Apply the algorithm to an arbitrary curved multipole of constant radius.
virtual void visitSource(const Source &)
Apply the algorithm to a source.
virtual void visitMultipole(const Multipole &)
Apply the algorithm to a multipole.
SpecificElementVisitor(const Beamline &beamline)
virtual void visitMultipoleT(const MultipoleT &)
Apply the algorithm to an arbitrary multipole.
virtual void visitTravelingWave(const TravelingWave &)
Apply the algorithm to a traveling wave.
virtual void visitMultipoleTCurvedVarRadius(const MultipoleTCurvedVarRadius &)
Apply the algorithm to an arbitrary curved multipole of variable radius.
ElementList_t::const_iterator const_iterator_t
virtual void visitDegrader(const Degrader &)
Apply the algorithm to a degrader.
virtual void visitSolenoid(const Solenoid &)
Apply the algorithm to a solenoid.
virtual void visitCorrector(const Corrector &)
Apply the algorithm to a closed orbit corrector.
virtual void visitRBend(const RBend &)
Apply the algorithm to a rectangular bend.
ElementList_t::const_reference const_reference_t
virtual void visitCCollimator(const CCollimator &)
Apply the algorithm to a collimator.
virtual void visitMultipoleTStraight(const MultipoleTStraight &)
Apply the algorithm to an arbitrary straight multipole.
virtual void visitSeptum(const Septum &)
Apply the algorithm to a septum.
virtual void visitScalingFFAMagnet(const ScalingFFAMagnet &)
Apply the algorithm to a scaling FFA magnet.
virtual void visitCyclotron(const Cyclotron &)
Apply the algorithm to an cyclotron.
virtual void visitRBend3D(const RBend3D &)
Apply the algorithm to a rectangular bend.
virtual void visitProbe(const Probe &prob)
Apply the algorithm to a probe.
virtual void visitSBend3D(const SBend3D &)
Apply the algorithm to a sector bend with 3D field map.
ElementList_t::iterator iterator_t
virtual void visitFlexibleCollimator(const FlexibleCollimator &)
Apply the algorithm to a flexible collimator.
virtual void visitMonitor(const Monitor &)
Apply the algorithm to a beam position monitor.
virtual void visitSBend(const SBend &)
Apply the algorithm to a sector bend.
virtual void visitDrift(const Drift &)
Apply the algorithm to a drift.
std::list< const ELEM * > ElementList_t
virtual void visitComponent(const Component &)
Apply the algorithm to an arbitrary component.
virtual void visitVerticalFFAMagnet(const VerticalFFAMagnet &)
Apply the algorithm to a vertical FFA magnet.
virtual void visitOffset(const Offset &)
Apply the algorithm to an offset (placement).
An abstract sequence of beam line components.
virtual void iterate(BeamlineVisitor &, bool reverse) const =0
Apply visitor to all elements of the line.
ElementBase * getElement() const
Get the element pointer.
A section of a beam line.