46 itsPosition(0.0), itsSequence(seq), itsStream(os)
69 dynamic_cast<const MPSplitIntegrator *>(&i)) {
72 std::vector<double> itsSlices;
73 mpi->getSlices(itsSlices);
74 int slices = itsSlices.size() - 1;
76 if(slices > 1 && length != 0.0) {
87 for(
int k = 0; k < slices; ++k) {
89 std::ostringstream splitNameStream;
90 splitNameStream << name <<
".." << k + 1 << std::ends ;
91 std::string splitName = splitNameStream.str();
103 member.
setElement(static_cast<Element *>(split)->getElement());
125 member.
setElement(const_cast<ElementBase *>(&elem));
void setReal(Attribute &attr, double val)
Set real value.
virtual void visitDrift(const Drift &)
Override drift operation.
Interface for basic beam line object.
void define(Object *newObject)
Define a new object.
FlatWriter(const Beamline &, Sequence::TLine &seq, std::ostream &os)
virtual Attribute * findAttribute(const std::string &name)
Find an attribute by name.
ElementBase * getElement() const
Return the embedded element.
virtual const std::string & getName() const
Get element name.
Interface for drift space.
double itsPosition
The position attribute ("AT" or "DRIFT").
static OpalData * getInstance()
MemberType itsType
Type word.
Template class for beam lines.
A representation of an Object attribute.
virtual void applyDefault(const ElementBase &)
Apply default.
virtual double getElementLength() const
Get design length.
virtual void visitMapIntegrator(const MapIntegrator &)
Override beamline exit.
An abstract sequence of beam line components.
Sequence::TLine & itsSequence
Object * find(const std::string &name)
Find entry.
The base class for all OPAL objects.
virtual Object * clone(const std::string &name)=0
Return a clone.
const Sequence::TLine & getSequence() const
Return the temporary sequence.
Integrator replacing each multipole by a set of thin lenses.
void setElement(ElementBase *)
Set the element pointer.