#include <moment.h>
Public Member Functions | |
MomentState (const Config &c) | |
virtual void | assign (const StateBase &other) |
virtual void | show (std::ostream &strm, int level) const |
virtual bool | getArray (unsigned idx, ArrayInfo &Info) |
Introspect named parameter of the derived class. More... | |
virtual MomentState * | clone () const |
void | recalc () |
void | calc_rms () |
size_t | size () const |
of charge states | |
Public Attributes | |
Particle | ref |
std::vector< Particle > | real |
std::vector< vector_t > | moment0 |
std::vector< matrix_t > | moment1 |
vector_t | moment0_env |
vector_t | moment0_rms |
matrix_t | moment1_env |
Public Attributes inherited from StateBase | |
size_t | next_elem |
double | pos |
absolute longitudinal position at end of Element | |
Protected Member Functions | |
MomentState (const MomentState &o, clone_tag) | |
Protected Member Functions inherited from StateBase | |
StateBase (const Config &c) | |
StateBase (const StateBase &c, clone_tag) | |
For use in clone() | |
|
virtual |
virtual equivalent to operator=() Should only be used with another State originating from the same Machine from Machine::allocState() or clone().
Implements StateBase.
Definition at line 233 of file moment.cpp.
|
inlinevirtual |
|
virtual |
Introspect named parameter of the derived class.
idx | The index of the parameter |
Info | mailbox to be filled with information about this paramter |
To introspect call this with index increasing from zero until false is returned.
Sub-classes are required to maintain a fixed number of parameters. The same ArrayInfo::name should alwaysbe returned for a given index. Similarly ArrayInfo::ndim and ArrayInfo.type should not change.
ArrayInfo::ptr, ArrayInfo::dim, ArrayInfo::stride are allowed to change when the state is passed to Machine::propagate().
Therefore, if getArray() for an instance has returned true for some index, then a caller may assume that all future calls to getArray() for this instance will also return true. However, the caller must still re-call getArray() in future as the storage and sizes may have changed.
Reimplemented from StateBase.
Definition at line 289 of file moment.cpp.
|
virtual |
Print information about the state. level is a hint as to the verbosity expected by the caller.
Reimplemented from StateBase.
Definition at line 248 of file moment.cpp.