OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Abstract base class for all orbit correction commands. More...
#include <CorrectionBase.h>
Classes | |
struct | Row |
Structure for a row of the Twiss table. More... | |
Public Member Functions | |
virtual | ~CorrectionBase () |
![]() | |
virtual | ~Action () |
virtual bool | canReplaceBy (Object *object) |
Test if replacement is allowed. 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 | ~Object () |
virtual Object * | clone (const std::string &name)=0 |
Return a clone. More... | |
void | copyAttributes (const Object &) |
Copy attributes from another object. More... | |
virtual void | execute () |
Execute the command. 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... | |
Protected Types | |
enum | { LINE, BEAM, RANGE, SIZE } |
The comon attributes for orbit correction commands. More... | |
typedef TBeamline< Row > | TLine |
typedef std::list< Row * > | LocalList |
typedef LocalList::iterator | LocalIter |
Protected Member Functions | |
CorrectionBase (int size, const char *name, const char *help) | |
Exemplar constructor. More... | |
CorrectionBase (const std::string &name, CorrectionBase *parent) | |
Clone constructor. More... | |
void | addKick (int plane, Row &, double kick) |
Add to kicker strength. More... | |
void | listCorrectors (bool list, int plane) |
List correctors before or after correction. More... | |
void | listMonitors (bool list, int plane) |
List monitors before or after correction. More... | |
void | setupTables () |
Set up the corrector and monitor tables. More... | |
void | test (ElementBase *) |
Routine to test for corrector or monitor. More... | |
![]() | |
Action (int size, const char *name, const char *help) | |
Constructor for exemplars. More... | |
Action (const std::string &name, Action *parent) | |
Constructor for cloning. 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) |
Protected Attributes | |
TLine | itsLine |
The flat beam line on which the correction is done. More... | |
PartData | reference |
The particle reference data. More... | |
FVector< double, 6 > | orbitGuess |
The closed orbit guess. More... | |
bool | isCorr [2] |
Flags telling wether a corrector exists. More... | |
bool | isMoni [2] |
Flag telling wether a monitor exists. More... | |
LocalList | correctorTable [2] |
LocalList | monitorTable [2] |
![]() | |
bool | builtin |
Built-in flag. More... | |
bool | modified |
Dirty flag. More... | |
bool | flagged |
Object flag. More... | |
Private Member Functions | |
CorrectionBase () | |
CorrectionBase (const CorrectionBase &) | |
void | operator= (const CorrectionBase &) |
Additional Inherited Members | |
![]() | |
std::vector< Attribute > | itsAttr |
The object attributes (see Attribute.hh). More... | |
Abstract base class for all orbit correction commands.
Definition at line 45 of file CorrectionBase.h.
|
protected |
Definition at line 131 of file CorrectionBase.h.
|
protected |
Definition at line 130 of file CorrectionBase.h.
|
protected |
Definition at line 83 of file CorrectionBase.h.
|
protected |
The comon attributes for orbit correction commands.
Enumerator | |
---|---|
LINE | |
BEAM | |
RANGE | |
SIZE |
Definition at line 54 of file CorrectionBase.h.
|
virtual |
Definition at line 75 of file CorrectionBase.cpp.
|
protected |
Exemplar constructor.
Definition at line 59 of file CorrectionBase.cpp.
References BEAM, Object::itsAttr, LINE, Attributes::makeRange(), Attributes::makeString(), and RANGE.
|
protected |
Clone constructor.
Definition at line 70 of file CorrectionBase.cpp.
|
private |
|
private |
|
protected |
Add to kicker strength.
Definition at line 79 of file CorrectionBase.cpp.
References OpalData::find(), ElmPtr::getElement(), OpalData::getInstance(), ElementBase::getName(), Attributes::getReal(), OpalKicker::HKICK, Object::itsAttr, OpalVKicker::KICK, OpalHKicker::KICK, name, Attributes::setReal(), Object::update(), and OpalKicker::VKICK.
Referenced by ThreadBpm::correct(), ThreadAll::correct(), and Micado::solve().
|
protected |
List correctors before or after correction.
Definition at line 105 of file CorrectionBase.cpp.
References abs(), Physics::c, correctorTable, endl(), BDipoleField::getBx(), BDipoleField::getBy(), Corrector::getField(), OpalData::getInstance(), ElementBase::getName(), OpalData::getP0(), max(), ElementBase::removeWrappers(), and sqrt().
Referenced by ThreadBpm::execute(), ThreadAll::execute(), and Micado::execute().
|
protected |
List monitors before or after correction.
Definition at line 134 of file CorrectionBase.cpp.
References abs(), endl(), max(), monitorTable, and sqrt().
Referenced by ThreadBpm::execute(), ThreadAll::execute(), and Micado::execute().
|
private |
|
protected |
Set up the corrector and monitor tables.
Definition at line 159 of file CorrectionBase.cpp.
References correctorTable, ElementBase::getElementLength(), IdealMapper::getMatrix(), isCorr, isMoni, itsLine, monitorTable, reference, and test().
Referenced by ThreadBpm::execute(), ThreadAll::execute(), and Micado::execute().
|
protected |
Routine to test for corrector or monitor.
Definition at line 185 of file CorrectionBase.cpp.
References isCorr, isMoni, ElementBase::removeWrappers(), Corrector::X, Monitor::X, Corrector::XY, Monitor::XY, Corrector::Y, and Monitor::Y.
Referenced by ThreadBpm::correct(), ThreadAll::correct(), ThreadBpm::execute(), and setupTables().
|
protected |
Definition at line 134 of file CorrectionBase.h.
Referenced by Micado::execute(), listCorrectors(), Micado::setupInfluence(), setupTables(), and Micado::solve().
|
protected |
Flags telling wether a corrector exists.
Definition at line 124 of file CorrectionBase.h.
Referenced by ThreadBpm::correct(), ThreadAll::correct(), setupTables(), and test().
|
protected |
Flag telling wether a monitor exists.
Definition at line 127 of file CorrectionBase.h.
Referenced by ThreadBpm::execute(), setupTables(), and test().
|
protected |
The flat beam line on which the correction is done.
Definition at line 115 of file CorrectionBase.h.
Referenced by ThreadBpm::correct(), ThreadAll::correct(), ThreadBpm::execute(), ThreadAll::execute(), Micado::execute(), Micado::findClosedOrbit(), Micado::setupInfluence(), and setupTables().
|
protected |
Definition at line 137 of file CorrectionBase.h.
Referenced by Micado::execute(), listMonitors(), Micado::setupInfluence(), Micado::setupReadings(), and setupTables().
|
protected |
The closed orbit guess.
Definition at line 121 of file CorrectionBase.h.
Referenced by ThreadBpm::correct(), ThreadAll::correct(), ThreadBpm::execute(), ThreadAll::execute(), and Micado::findClosedOrbit().
|
protected |
The particle reference data.
Definition at line 118 of file CorrectionBase.h.
Referenced by ThreadBpm::execute(), ThreadAll::execute(), Micado::execute(), and setupTables().