38 std::string(
"The \"POLYNOMIAL_TIME_DEPENDENCE\" element defines ")
39 + std::string(
"polynomial coefficients for time dependent RF phase, ")
40 + std::string(
"frequency, amplitude, etc, given by ")
41 + std::string(
"f(t) = P0+P1*t+P2*t^2+P3*t^3 where t is the time in ns");
54 "COEFFICIENTS",
"Polynomial coefficients as an array with arbitrary length.");
79 "Use P0..P3 or COEFFICIENTS to specify the coefficients, not both.");
82 if (polynomial_coefficients.empty()) {
89 getOpalName(), std::make_shared<PolynomialTimeDependence>(polynomial_coefficients));
double getReal(const Attribute &attr)
Return real value.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
const std::string & getOpalName() const
Return object name.
std::vector< Attribute > itsAttr
The object attributes.
static void setTimeDependence(std::string name, std::shared_ptr< AbstractTimeDependence > time_dep)
virtual void print(std::ostream &) const
Print the object.
OpalElement(int size, const char *name, const char *help)
Exemplar constructor.
void registerOwnership() const
OpalPolynomialTimeDependence()
static const std::string doc_string
virtual ~OpalPolynomialTimeDependence()
virtual OpalPolynomialTimeDependence * clone(const std::string &name)
virtual void print(std::ostream &) const
The base class for all OPAL exceptions.