OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
The TWISSTRACK command. More...
#include <Insertion.h>
Public Member Functions | |
Insertion () | |
Exemplar construction. More... | |
virtual | ~Insertion () |
virtual Insertion * | clone (const std::string &name) |
Make clone. More... | |
virtual void | fill () |
Fill the buffer using the defined algorithm. More... | |
virtual void | printTable (std::ostream &, const CellArray &) const |
Print the table on an ASCII stream. More... | |
![]() | |
virtual | ~Twiss () |
TLine::const_iterator | begin () const |
Access to first row. More... | |
TLine::iterator | begin () |
Access to first row. More... | |
TLine::const_iterator | end () const |
Access to last row. More... | |
TLine::iterator | end () |
Access to last row. More... | |
virtual void | execute () |
Check validity of the table definition. More... | |
virtual double | getCell (const PlaceRep &row, const std::string &col) |
Return a selected value in a selected row. More... | |
virtual CellArray | getDefault () const |
Return the default print columns. More... | |
virtual std::vector< double > | getColumn (const RangeRep &range, const std::string &col) |
Return column [b]col[/b] of this table, limited by [b]range[/b]. More... | |
const Row & | getCurrent () const |
Return current table row in iteration. More... | |
double | getEX () const |
Return emittance for mode 1. More... | |
double | getEY () const |
Return emittance for mode 2. More... | |
double | getET () const |
Return emittance for mode 3. More... | |
virtual double | getLength () |
Return the length of the table. More... | |
virtual const Beamline * | getLine () const |
Return embedded CLASSIC beamline. More... | |
virtual std::vector< double > | getRow (const PlaceRep &, const std::vector< std::string > &) |
Return a table row, possible user-defined. More... | |
virtual bool | isDependent (const std::string &name) const |
Check dependency. More... | |
virtual Expressions::PtrToScalar < double > | makeColumnExpression (const std::string &colName) const |
Return column expression. More... | |
virtual bool | matches (Table *rhs) const |
Check compatibility. More... | |
void | printTableBody (std::ostream &, const CellArray &) const |
Print the body to this TWISS table. More... | |
void | printTableTitle (std::ostream &, const char *title) const |
Print standard information about the TWISS table. More... | |
FMatrix< double, 6, 6 > | getCurlyA () const |
Return initial curly A matrix. More... | |
FMatrix< double, 6, 6 > | getCurlyA (const Row &) const |
Curly A map for given row. More... | |
FMatrix< double, 6, 6 > | getMatrix (const Row &) const |
Accumulated transfer map. More... | |
FVector< double, 6 > | getOrbit () const |
Return initial closed orbit. More... | |
FVector< double, 6 > | getOrbit (const Row &) const |
Get orbit in given row. More... | |
FMatrix< double, 6, 6 > | getSigma () const |
Initial envelope (Sigma) matrix. More... | |
FMatrix< double, 6, 6 > | getSigma (const Row &) const |
Envelope (Sigma) matrix for given row. More... | |
double | getS (const Row &, int=0, int=0) const |
Arc length for given row. More... | |
double | getMUi (const Row &, int i1, int=0) const |
Three modes, "naive" Twiss functions. More... | |
double | getBETi (const Row &, int i1, int=0) const |
double | getALFi (const Row &, int i1, int=0) const |
double | getBETik (const Row &, int i1, int i2) const |
Mais-Ripken beta functions. More... | |
double | getALFik (const Row &, int i1, int i2) const |
Mais-Ripken alpha functions. More... | |
double | getGAMik (const Row &, int i1, int i2) const |
Mais-Ripken gamma functions. More... | |
double | getCO (const Row &, int i1, int=0) const |
Closed orbit. More... | |
double | getDisp (const Row &, int i1, int=0) const |
Dispersion. More... | |
double | getEigen (const Row &, int i1, int i2) const |
Eigenvectors. More... | |
double | getSigma (const Row &, int i1, int i2) const |
Sigma matrix. More... | |
double | getMatrix (const Row &, int i1, int i2) const |
Transfer matrix. More... | |
![]() | |
virtual | ~Table () |
virtual bool | canReplaceBy (Object *newObject) |
Test if object can be replaced. More... | |
virtual const std::string | getCategory () const |
Return the object category as a string. More... | |
virtual bool | shouldTrace () const |
Trace flag. More... | |
virtual bool | shouldUpdate () const |
Update flag. More... | |
virtual void | invalidate () |
Mark this table as invalid, if it is dynamic. More... | |
![]() | |
virtual | ~Object () |
void | copyAttributes (const Object &) |
Copy attributes from another object. More... | |
virtual Attribute * | findAttribute (const std::string &name) |
Find an attribute by name. More... | |
virtual const Attribute * | findAttribute (const std::string &name) const |
Find an attribute by name. More... | |
virtual Object * | makeTemplate (const std::string &, TokenStream &, Statement &) |
Macro handler function. More... | |
virtual Object * | makeInstance (const std::string &name, Statement &, const Parser *) |
Macro handler function. More... | |
virtual void | parse (Statement &) |
Parse the object. More... | |
virtual void | parseShortcut (Statement &) |
Parser for single-attribute commands. More... | |
virtual void | print (std::ostream &) const |
Print the object. More... | |
virtual void | printValue (std::ostream &) const |
virtual void | printHelp (std::ostream &) const |
Print help. More... | |
virtual void | replace (Object *oldObject, Object *newObject) |
Replace references. More... | |
virtual void | update () |
Update this object. More... | |
bool | isBuiltin () const |
True, if [b]this[/b] is a built-in object. More... | |
virtual bool | isShared () const |
Shared flag. More... | |
virtual void | setShared (bool) |
Set/reset shared flag. More... | |
void | setDirty (bool) |
Set/reset the [b]modified[/b] flag. More... | |
bool | isDirty () const |
True, if the [b]modified[/b] flag is set. More... | |
void | setFlag (bool) |
Flag/unflag this object, e. g. to control output of objects for. More... | |
bool | isFlagged () const |
True, if [b]this[/b] is flagged by setFlag(true). More... | |
const Object * | getBaseObject () const |
Return the object's base type object. More... | |
const std::string & | getOpalName () const |
Return object name. More... | |
Object * | getParent () const |
Return parent pointer. More... | |
bool | isTreeMember (const Object *subTree) const |
Test for tree membership. More... | |
void | setOpalName (const std::string &name) |
Set object name. More... | |
void | setParent (Object *) |
Set parent object. More... | |
void | clear () |
Clear the occurrence counter. More... | |
int | increment () |
Increment and return the occurrence counter. More... | |
int | occurrenceCount () |
Return the occurrence counter. More... | |
void | registerReference (Invalidator *a) |
Register a reference to this object. More... | |
void | unregisterReference (Invalidator *a) |
Unegister a reference to this object. More... | |
void | registerOwnership (const AttributeHandler::OwnerType &itsClass) const |
![]() | |
int | addReference () const |
Increment reference count. More... | |
int | removeReference () const |
Decrement the reference count. More... | |
bool | isShared () const |
Test for sharing. More... | |
Private Types | |
enum | { INIT = Twiss::SIZE, BETX, ALFX, BETY, ALFY, DX, DPX, DY, DPY, XC, PXC, YC, PYC, TC, PTC, LENGTH, MU1, MU2, MU3, DELTAP, SIZE } |
Private Member Functions | |
Insertion (const Insertion &) | |
void | operator= (const Insertion &) |
Insertion (const std::string &name, Insertion *parent) | |
Additional Inherited Members | |
![]() | |
typedef TBeamline< Row > | TLine |
![]() | |
typedef std::vector< Cell > | CellArray |
An array of cell descriptors. More... | |
![]() | |
static Table * | find (const std::string &name) |
Find named Table. More... | |
![]() | |
std::vector< Attribute > | itsAttr |
The object attributes (see Attribute.hh). More... | |
![]() | |
enum | { LINE, BEAM, RANGE, ORDER, STATIC, METHOD, REVBEAM, REVTRACK, BETXMAX, BETYMAX, XCMAX, YCMAX, XCRMS, YCRMS, DXMAX, DYMAX, DXRMS, DYRMS, SIZE } |
The common attributes for all objects having the "TWISS" interface. More... | |
![]() | |
Twiss (int size, const char *name, const char *help) | |
Exemplar constructor. More... | |
Twiss (const std::string &name, Twiss *parent) | |
Clone constructor. More... | |
![]() | |
Table (int size, const char *name, const char *help) | |
Constructor for exemplars. More... | |
Table (const std::string &name, Table *parent) | |
Constructor for clones. More... | |
![]() | |
Object (int size, const char *name, const char *help) | |
Constructor for exemplars. More... | |
Object (const std::string &name, Object *parent) | |
Constructor for clones. More... | |
![]() | |
RCObject () | |
Default constructor. More... | |
RCObject (const RCObject &) | |
Copy constructor. More... | |
virtual | ~RCObject ()=0 |
RCObject & | operator= (const RCObject &right) |
![]() | |
FVector< double, 6 > | orbit |
The initial closed orbit. More... | |
FMatrix< double, 6, 6 > | curly_A |
The initial curly A matrix. More... | |
![]() | |
bool | dynamic |
Flag dynamic table. More... | |
bool | refill |
Refill flag. More... | |
![]() | |
bool | builtin |
Built-in flag. More... | |
bool | modified |
Dirty flag. More... | |
bool | flagged |
Object flag. More... | |
![]() | |
static const int | numColumns = 11 |
Number of table columns. More... | |
The TWISSTRACK command.
Definition at line 28 of file Insertion.h.
|
private |
Enumerator | |
---|---|
INIT | |
BETX | |
ALFX | |
BETY | |
ALFY | |
DX | |
DPX | |
DY | |
DPY | |
XC | |
PXC | |
YC | |
PYC | |
TC | |
PTC | |
LENGTH | |
MU1 | |
MU2 | |
MU3 | |
DELTAP | |
SIZE |
Definition at line 56 of file Insertion.h.
Insertion::Insertion | ( | ) |
Exemplar construction.
Definition at line 40 of file Insertion.cpp.
References ALFX, ALFY, BETX, BETY, AttributeHandler::COMMAND, DELTAP, DPX, DPY, DX, DY, INIT, Object::itsAttr, LENGTH, Attributes::makeReal(), Attributes::makeTableRow(), MU1, MU2, MU3, PTC, PXC, PYC, Object::registerOwnership(), TC, XC, and YC.
Referenced by clone().
|
virtual |
Definition at line 106 of file Insertion.cpp.
|
private |
|
private |
Definition at line 101 of file Insertion.cpp.
|
virtual |
Make clone.
Implements Object.
Definition at line 110 of file Insertion.cpp.
References Insertion().
|
virtual |
Fill the buffer using the defined algorithm.
Implements Table.
Definition at line 115 of file Insertion.cpp.
References ALFX, ALFY, BETX, BETY, Twiss::curly_A, DPX, DPY, DX, DY, Table::fill(), Table::find(), Twiss::findRow(), Twiss::getCurlyA(), Twiss::getMUi(), Object::getOpalName(), Twiss::getOrbit(), TableRowRep::getPosition(), Attributes::getReal(), Twiss::getS(), Attributes::getTableRow(), TableRowRep::getTabName(), INIT, Object::itsAttr, Twiss::itsMapper, Twiss::itsTable, LENGTH, Twiss::matches(), MU1, MU2, MU3, Twiss::orbit, Twiss::order, PTC, Twiss::put(), PXC, PYC, Table::refill, FTps< T, N >::setGlobalTruncOrder(), AbstractMapper::setMap(), Attributes::setReal(), sqrt(), TC, XC, and YC.
|
private |
|
virtual |
Print the table on an ASCII stream.
Implements Table.
Definition at line 187 of file Insertion.cpp.
References Twiss::BETXMAX, Twiss::BETYMAX, Twiss::DXMAX, Twiss::DXRMS, Twiss::DYMAX, Twiss::DYRMS, Twiss::getMUi(), Attributes::getReal(), Twiss::getS(), Object::itsAttr, Twiss::itsTable, Twiss::printTableBody(), Twiss::printTableTitle(), Twiss::XCMAX, Twiss::XCRMS, Twiss::YCMAX, and Twiss::YCRMS.