OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
CorrectionBase Class Reference

Abstract base class for all orbit correction commands. More...

#include <CorrectionBase.h>

Inheritance diagram for CorrectionBase:
Inheritance graph
[legend]
Collaboration diagram for CorrectionBase:
Collaboration graph
[legend]

Classes

struct  Row
 Structure for a row of the Twiss table. More...
 

Public Member Functions

virtual ~CorrectionBase ()
 
- Public Member Functions inherited from Action
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...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
virtual Objectclone (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 AttributefindAttribute (const std::string &name)
 Find an attribute by name. More...
 
virtual const AttributefindAttribute (const std::string &name) const
 Find an attribute by name. More...
 
virtual ObjectmakeTemplate (const std::string &, TokenStream &, Statement &)
 Macro handler function. More...
 
virtual ObjectmakeInstance (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 ObjectgetBaseObject () const
 Return the object's base type object. More...
 
const std::string & getOpalName () const
 Return object name. More...
 
ObjectgetParent () 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
 
- Public Member Functions inherited from RCObject
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< RowTLine
 
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...
 
- Protected Member Functions inherited from Action
 Action (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Action (const std::string &name, Action *parent)
 Constructor for cloning. More...
 
- Protected Member Functions inherited from Object
 Object (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Object (const std::string &name, Object *parent)
 Constructor for clones. More...
 
- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (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]
 
- Protected Attributes inherited from Object
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

- Public Attributes inherited from Object
std::vector< AttributeitsAttr
 The object attributes (see Attribute.hh). More...
 

Detailed Description

Abstract base class for all orbit correction commands.

Definition at line 45 of file CorrectionBase.h.

Member Typedef Documentation

typedef LocalList::iterator CorrectionBase::LocalIter
protected

Definition at line 131 of file CorrectionBase.h.

typedef std::list<Row *> CorrectionBase::LocalList
protected

Definition at line 130 of file CorrectionBase.h.

typedef TBeamline<Row> CorrectionBase::TLine
protected

Definition at line 83 of file CorrectionBase.h.

Member Enumeration Documentation

anonymous enum
protected

The comon attributes for orbit correction commands.

Enumerator
LINE 
BEAM 
RANGE 
SIZE 

Definition at line 54 of file CorrectionBase.h.

Constructor & Destructor Documentation

CorrectionBase::~CorrectionBase ( )
virtual

Definition at line 75 of file CorrectionBase.cpp.

CorrectionBase::CorrectionBase ( int  size,
const char *  name,
const char *  help 
)
protected

Exemplar constructor.

Definition at line 59 of file CorrectionBase.cpp.

References BEAM, Object::itsAttr, LINE, Attributes::makeRange(), Attributes::makeString(), and RANGE.

Here is the call graph for this function:

CorrectionBase::CorrectionBase ( const std::string &  name,
CorrectionBase parent 
)
protected

Clone constructor.

Definition at line 70 of file CorrectionBase.cpp.

CorrectionBase::CorrectionBase ( )
private
CorrectionBase::CorrectionBase ( const CorrectionBase )
private

Member Function Documentation

void CorrectionBase::addKick ( int  plane,
Row row,
double  kick 
)
protected
void CorrectionBase::listCorrectors ( bool  list,
int  plane 
)
protected
void CorrectionBase::listMonitors ( bool  list,
int  plane 
)
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().

Here is the call graph for this function:

void CorrectionBase::operator= ( const CorrectionBase )
private
void CorrectionBase::setupTables ( )
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().

Here is the call graph for this function:

void CorrectionBase::test ( ElementBase base)
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().

Here is the call graph for this function:

Member Data Documentation

LocalList CorrectionBase::correctorTable[2]
protected
bool CorrectionBase::isCorr[2]
protected

Flags telling wether a corrector exists.

Definition at line 124 of file CorrectionBase.h.

Referenced by ThreadBpm::correct(), ThreadAll::correct(), setupTables(), and test().

bool CorrectionBase::isMoni[2]
protected

Flag telling wether a monitor exists.

Definition at line 127 of file CorrectionBase.h.

Referenced by ThreadBpm::execute(), setupTables(), and test().

TLine CorrectionBase::itsLine
protected
LocalList CorrectionBase::monitorTable[2]
protected
FVector<double, 6> CorrectionBase::orbitGuess
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().

PartData CorrectionBase::reference
protected

The particle reference data.

Definition at line 118 of file CorrectionBase.h.

Referenced by ThreadBpm::execute(), ThreadAll::execute(), Micado::execute(), and setupTables().


The documentation for this class was generated from the following files: