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

The SURVEY command. More...

#include <Survey.h>

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

Classes

class  Row
 The class for one row of the survey table. More...
 

Public Member Functions

 Survey ()
 Exemplar constructor. More...
 
virtual ~Survey ()
 
virtual Surveyclone (const std::string &name)
 Make clone. More...
 
virtual void execute ()
 Check validity of survey definition. More...
 
virtual void fill ()
 Fill the buffer using the survey algorithm. 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 RowgetCurrent () const
 Return current row of table. More...
 
virtual double getLength ()
 Return the length of the table. More...
 
virtual const BeamlinegetLine () 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...
 
double getS (const Row &, int=0, int=0) const
 Arc length for given row. More...
 
const Euclid3DgetMap (const Row &) const
 Position and orientation of local system. More...
 
double getX (const Row &, int=0, int=0) const
 X component of displacement. More...
 
double getY (const Row &, int=0, int=0) const
 Y component of displacement. More...
 
double getZ (const Row &, int=0, int=0) const
 Z component of displacement. More...
 
double getPhi (const Row &, int=0, int=0) const
 Rotation about X. More...
 
double getTheta (const Row &, int=0, int=0) const
 Rotation about Y. More...
 
double getPsi (const Row &, int=0, int=0) const
 Rotation about Z. More...
 
double getW (const Row &, int i1, int i2) const
 Local axis vectors. More...
 
virtual bool isDependent (const std::string &name) const
 Find dependency. More...
 
virtual
Expressions::PtrToScalar
< double > 
makeColumnExpression (const std::string &colName) const
 Return column. More...
 
virtual bool matches (Table *rhs) const
 Check compatibility. More...
 
virtual void printTable (std::ostream &, const CellArray &) const
 Print list for the table. More...
 
- Public Member Functions inherited from Table
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...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
void copyAttributes (const Object &)
 Copy attributes from another object. 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...
 

Private Types

typedef TBeamline< RowTLine
 

Private Member Functions

 Survey (const Survey &)
 
void operator= (const Survey &)
 
 Survey (const std::string &name, Survey *parent)
 
const RowfindRow (const PlaceRep &row)
 

Private Attributes

TLine::const_iterator current
 
TLineitsTable
 
SurveyoritsVisitor
 
double s
 
std::string itsLine
 

Static Private Attributes

static const int numColumns = 7
 Number of table columns. More...
 

Additional Inherited Members

- Public Types inherited from Table
typedef std::vector< CellCellArray
 An array of cell descriptors. More...
 
- Static Public Member Functions inherited from Table
static Tablefind (const std::string &name)
 Find named Table. More...
 
- Public Attributes inherited from Object
std::vector< AttributeitsAttr
 The object attributes (see Attribute.hh). More...
 
- Protected Member Functions inherited from Table
 Table (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Table (const std::string &name, Table *parent)
 Constructor for clones. 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 inherited from Table
bool dynamic
 Flag dynamic table. More...
 
bool refill
 Refill flag. More...
 
- Protected Attributes inherited from Object
bool builtin
 Built-in flag. More...
 
bool modified
 Dirty flag. More...
 
bool flagged
 Object flag. More...
 

Detailed Description

The SURVEY command.

Definition at line 38 of file Survey.h.

Member Typedef Documentation

typedef TBeamline<Row> Survey::TLine
private

Definition at line 167 of file Survey.h.

Constructor & Destructor Documentation

Survey::Survey ( )
Survey::~Survey ( )
virtual

Definition at line 298 of file Survey.cpp.

References itsTable, and itsVisitor.

Survey::Survey ( const Survey )
private
Survey::Survey ( const std::string &  name,
Survey parent 
)
private

Definition at line 293 of file Survey.cpp.

Member Function Documentation

Survey * Survey::clone ( const std::string &  name)
virtual

Make clone.

Implements Object.

Definition at line 304 of file Survey.cpp.

References Survey().

Here is the call graph for this function:

void Survey::execute ( )
virtual
void Survey::fill ( )
virtual
const Survey::Row & Survey::findRow ( const PlaceRep row)
private

Definition at line 399 of file Survey.cpp.

References PlaceRep::enter(), Object::getOpalName(), PlaceRep::initialize(), PlaceRep::isActive(), itsTable, and PlaceRep::leave().

Referenced by fill(), getCell(), and getRow().

Here is the call graph for this function:

double Survey::getCell ( const PlaceRep row,
const std::string &  col 
)
virtual

Return a selected value in a selected row.

Implements Table.

Definition at line 416 of file Survey.cpp.

References findRow().

Here is the call graph for this function:

std::vector< double > Survey::getColumn ( const RangeRep range,
const std::string &  col 
)
virtual

Return column [b]col[/b] of this table, limited by [b]range[/b].

Implements Table.

Definition at line 434 of file Survey.cpp.

References current, RangeRep::enter(), RangeRep::initialize(), RangeRep::isActive(), itsTable, and RangeRep::leave().

Here is the call graph for this function:

const Survey::Row & Survey::getCurrent ( ) const

Return current row of table.

Definition at line 453 of file Survey.cpp.

References current.

Table::CellArray Survey::getDefault ( ) const
virtual

Return the default print columns.

Implements Table.

Definition at line 423 of file Survey.cpp.

Referenced by execute().

double Survey::getLength ( )
virtual

Return the length of the table.

Implements Table.

Definition at line 458 of file Survey.cpp.

References TBeamline< T >::getElementLength(), and itsTable.

Here is the call graph for this function:

const Beamline * Survey::getLine ( ) const
virtual

Return embedded CLASSIC beamline.

Implements Table.

Definition at line 463 of file Survey.cpp.

References itsTable.

const Euclid3D & Survey::getMap ( const Row row) const

Position and orientation of local system.

Definition at line 597 of file Survey.cpp.

References Survey::Row::getMap().

Referenced by fill().

Here is the call graph for this function:

double Survey::getPhi ( const Row row,
int  = 0,
int  = 0 
) const

Rotation about X.

Definition at line 617 of file Survey.cpp.

References atan2(), Survey::Row::getMap(), Euclid3D::getRotation(), and sqrt().

Here is the call graph for this function:

double Survey::getPsi ( const Row row,
int  = 0,
int  = 0 
) const

Rotation about Z.

Definition at line 630 of file Survey.cpp.

References abs(), arg(), atan2(), Physics::e, Survey::Row::getMap(), and Euclid3D::getRotation().

Here is the call graph for this function:

std::vector< double > Survey::getRow ( const PlaceRep pos,
const std::vector< std::string > &  columns 
)
virtual

Return a table row, possible user-defined.

Implements Table.

Definition at line 469 of file Survey.cpp.

References findRow(), and name.

Here is the call graph for this function:

double Survey::getS ( const Row row,
int  = 0,
int  = 0 
) const

Arc length for given row.

Definition at line 592 of file Survey.cpp.

References current.

double Survey::getTheta ( const Row row,
int  = 0,
int  = 0 
) const

Rotation about Y.

Definition at line 623 of file Survey.cpp.

References abs(), arg(), atan2(), Physics::e, Survey::Row::getMap(), and Euclid3D::getRotation().

Here is the call graph for this function:

double Survey::getW ( const Row row,
int  i1,
int  i2 
) const

Local axis vectors.

Definition at line 637 of file Survey.cpp.

References Survey::Row::getMap(), and Euclid3D::M().

Here is the call graph for this function:

double Survey::getX ( const Row row,
int  = 0,
int  = 0 
) const

X component of displacement.

Definition at line 602 of file Survey.cpp.

References Survey::Row::getMap(), and Euclid3D::getX().

Here is the call graph for this function:

double Survey::getY ( const Row row,
int  = 0,
int  = 0 
) const

Y component of displacement.

Definition at line 607 of file Survey.cpp.

References Survey::Row::getMap(), and Euclid3D::getY().

Here is the call graph for this function:

double Survey::getZ ( const Row row,
int  = 0,
int  = 0 
) const

Z component of displacement.

Definition at line 612 of file Survey.cpp.

References Survey::Row::getMap(), and Euclid3D::getZ().

Here is the call graph for this function:

bool Survey::isDependent ( const std::string &  name) const
virtual

Find dependency.

Implements Table.

Definition at line 491 of file Survey.cpp.

References itsLine, itsTable, and name.

Expressions::PtrToScalar< double > Survey::makeColumnExpression ( const std::string &  colName) const
virtual

Return column.

Implements Table.

Definition at line 506 of file Survey.cpp.

bool Survey::matches ( Table rhs) const
virtual

Check compatibility.

Implements Table.

Definition at line 511 of file Survey.cpp.

Referenced by fill().

void Survey::operator= ( const Survey )
private
void Survey::printTable ( std::ostream &  os,
const CellArray cells 
) const
virtual

Print list for the table.

Implements Table.

Definition at line 516 of file Survey.cpp.

References current, OpalData::getInstance(), Object::itsAttr, itsTable, Attrib::Distribution::LINE, name, and OpalData::printTitle().

Referenced by execute().

Here is the call graph for this function:

Member Data Documentation

TLine::const_iterator Survey::current
mutableprivate

Definition at line 170 of file Survey.h.

Referenced by getColumn(), getCurrent(), getS(), and printTable().

std::string Survey::itsLine
private

Definition at line 182 of file Survey.h.

Referenced by execute(), and isDependent().

TLine* Survey::itsTable
private

Definition at line 173 of file Survey.h.

Referenced by execute(), fill(), findRow(), getColumn(), getLength(), getLine(), isDependent(), printTable(), and ~Survey().

Surveyor* Survey::itsVisitor
private

Definition at line 176 of file Survey.h.

Referenced by execute(), fill(), and ~Survey().

const int Survey::numColumns = 7
staticprivate

Number of table columns.

Definition at line 185 of file Survey.h.

double Survey::s
private

Definition at line 179 of file Survey.h.

Referenced by fill(), and Survey::Row::getS().


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