37 std::string(
"The \"POLYNOMIAL_TIME_DEPENDENCE\" element defines ")+\
38 std::string(
"polynomial coefficients for time dependent RF phase, ")+\
39 std::string(
"frequency, amplitude, etc, given by ")+\
40 std::string(
"f(t) = P0+P1*t+P2*t^2+P3*t^3 where t is the time in ns");
46 "POLYNOMIAL_TIME_DEPENDENCE",
49 "Constant term in the polynomial expansion.");
51 "First order (linear) term in the polynomial expansion.");
53 "Second order (quadratic) term in the polynomial expansion.");
55 "Third order (cubic) term in the polynomial expansion.");
85 std::vector<double> polynomial_coefficients;
92 std::make_shared<PolynomialTimeDependence>(polynomial_coefficients));
static const std::string doc_string
Interface for basic beam line object.
virtual void print(std::ostream &) const
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
ValueFlag
Switch for value desired on ATTLIST command.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
static void setTimeDependence(std::string name, std::shared_ptr< AbstractTimeDependence > time_dep)
const std::string & getOpalName() const
Return object name.
virtual ~OpalPolynomialTimeDependence()
Base class for all beam line elements.
void fillRegisteredAttributes(const ElementBase &base, ValueFlag flag)
void registerOwnership() const
virtual OpalPolynomialTimeDependence * clone(const std::string &name)
double getReal(const Attribute &attr)
Return real value.
OpalPolynomialTimeDependence()
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.
virtual void print(std::ostream &) const
Print the object.