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

#include <Split.h>

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

Classes

class  A_row
 
struct  Data
 

Public Types

typedef TBeamline< A_rowA_Tline
 
- Public Types inherited from Table
typedef std::vector< CellCellArray
 An array of cell descriptors. More...
 

Public Member Functions

 MSplit ()
 
 MSplit (const std::string &name, MSplit *parent)
 
virtual ~MSplit ()
 
double getBETXMAX (const A_row &, int i1=0, int i2=0) const
 
double getBETYMAX (const A_row &, int i1=0, int i2=0) const
 
virtual double getLength ()
 Return the length of the table. More...
 
virtual double getCell (const PlaceRep &place, const std::string &colName)
 Return value in selected table cell. More...
 
virtual const BeamlinegetLine () const
 Return embedded CLASSIC beamline. More...
 
virtual CellArray getDefault () const
 Return the default print columns. More...
 
virtual std::vector< double > getColumn (const RangeRep &rng, const std::string &colName)
 Return column [b]col[/b] of this table, limited by [b]range[/b]. More...
 
virtual std::vector< double > getRow (const PlaceRep &pos, const std::vector< std::string > &cols)
 Return a table row. More...
 
virtual bool isDependent (const std::string &name) const
 Find out if table depends on the object identified by [b]name[/b]. More...
 
virtual bool matches (Table *rhs) const
 Check that [b]rhs[/b] is of same type as [b]this[/b]. More...
 
virtual
Expressions::PtrToScalar
< double > 
makeColumnExpression (const std::string &colname) const
 
virtual Objectclone (const std::string &name)
 Return a clone. More...
 
virtual void printTable (std::ostream &, const CellArray &) const
 Print list for the table. More...
 
virtual void fill ()
 Refill the buffer. More...
 
A_Tline::const_iterator begin () const
 
A_Tline::iterator begin ()
 
A_Tline::const_iterator end () const
 
A_Tline::iterator end ()
 
const A_rowgetCurrent () const
 
virtual void visitMultipole (const Multipole &)
 Apply the algorithm to a multipole. More...
 
virtual void visitRBend (const RBend &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitSBend (const SBend &)
 Apply the algorithm to a sector bend. More...
 
virtual void visitCyclotron (const Cyclotron &)
 Apply the algorithm to an cyclotron. More...
 
virtual void applyDefault (const ElementBase &)
 
void execute ()
 Apply the algorithm to the top-level beamline. More...
 
void run ()
 
void calcul (Twiss::TLine::iterator i, A_row &a, int order, Twiss *tp)
 
- Public Member Functions inherited from DefaultVisitor
 DefaultVisitor (const Beamline &beamline, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~DefaultVisitor ()=0
 
virtual void visitBeamBeam (const BeamBeam &)
 Apply the algorithm to a beam-beam. More...
 
virtual void visitBeamStripping (const BeamStripping &)
 Apply the algorithm to a beam stripping. More...
 
virtual void visitCCollimator (const CCollimator &)
 Apply the algorithm to a collimator. More...
 
virtual void visitComponent (const Component &)
 Apply the algorithm to an arbitrary component. More...
 
virtual void visitRing (const Ring &)
 Apply the algorithm to an opal ring.. More...
 
virtual void visitCorrector (const Corrector &)
 Apply the algorithm to a corrector. More...
 
virtual void visitDegrader (const Degrader &)
 Apply the algorithm to a drift. More...
 
virtual void visitDiagnostic (const Diagnostic &)
 Apply the algorithm to a diagnostic. More...
 
virtual void visitDrift (const Drift &)
 Apply the algorithm to a drift. More...
 
virtual void visitFlexibleCollimator (const FlexibleCollimator &)
 Apply the algorithm to a flexible collimator. More...
 
virtual void visitLambertson (const Lambertson &)
 Apply the algorithm to a Lambertson. More...
 
virtual void visitMarker (const Marker &)
 Apply the algorithm to a marker. More...
 
virtual void visitMonitor (const Monitor &)
 Apply the algorithm to a monitor. More...
 
virtual void visitMultipoleT (const MultipoleT &)
 Apply the algorithm to a multipoleT. More...
 
virtual void visitMultipoleTStraight (const MultipoleTStraight &)
 Apply the algorithm to a multipoleTStraight. More...
 
virtual void visitMultipoleTCurvedConstRadius (const MultipoleTCurvedConstRadius &)
 Apply the algorithm to a multipoleTCurvedConstRadius. More...
 
virtual void visitMultipoleTCurvedVarRadius (const MultipoleTCurvedVarRadius &)
 Apply the algorithm to a multipoleTCurvedVarRadius. More...
 
virtual void visitOffset (const Offset &)
 Apply the algorithm to an Offset. More...
 
virtual void visitPatch (const Patch &pat)
 Apply the algorithm to a patch. More...
 
virtual void visitProbe (const Probe &prob)
 Apply the algorithm to a probe. More...
 
virtual void visitRBend3D (const RBend3D &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitVariableRFCavity (const VariableRFCavity &vcav)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitVariableRFCavityFringeField (const VariableRFCavityFringeField &vcav)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitRFCavity (const RFCavity &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitTravelingWave (const TravelingWave &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitRFQuadrupole (const RFQuadrupole &)
 Apply the algorithm to a RF quadrupole. More...
 
virtual void visitSBend3D (const SBend3D &)
 Apply the algorithm to a sector bend. More...
 
virtual void visitScalingFFAMagnet (const ScalingFFAMagnet &)
 Apply the algorithm to a scaling FFA magnet. More...
 
virtual void visitVerticalFFAMagnet (const VerticalFFAMagnet &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitSeparator (const Separator &)
 Apply the algorithm to a separator. More...
 
virtual void visitSeptum (const Septum &)
 Apply the algorithm to a septum. More...
 
virtual void visitSolenoid (const Solenoid &)
 Apply the algorithm to a solenoid. More...
 
virtual void visitSource (const Source &)
 Apply the algorithm to a source. More...
 
virtual void visitParallelPlate (const ParallelPlate &)
 Apply the algorithm to a ParallelPlate. More...
 
virtual void visitCyclotronValley (const CyclotronValley &)
 Apply the algorithm to a CyclotronValley. More...
 
virtual void visitStripper (const Stripper &)
 Apply the algorithm to a charge stripper. More...
 
virtual void visitBeamline (const Beamline &)
 Apply the algorithm to a beam line. More...
 
virtual void visitFlaggedElmPtr (const FlaggedElmPtr &)
 Apply the algorithm to a FlaggedElmPtr. More...
 
virtual void visitAlignWrapper (const AlignWrapper &)
 Apply the algorithm to an align wrapper.. More...
 
virtual void visitCorrectorWrapper (const CorrectorWrapper &)
 Apply the algorithm to an corrector wrapper.. More...
 
virtual void visitCyclotronWrapper (const CyclotronWrapper &)
 Apply the algorithm to an cyclotron wrapper.. More...
 
virtual void visitMultipoleWrapper (const MultipoleWrapper &)
 Apply the algorithm to an multipole wrapper.. More...
 
virtual void visitRBendWrapper (const RBendWrapper &)
 Apply the algorithm to an RBend wrapper.. More...
 
virtual void visitSBendWrapper (const SBendWrapper &)
 Apply the algorithm to an SBend wrapper.. More...
 
virtual void visitIntegrator (const Integrator &)
 Apply the algorithm to a generic integrator. More...
 
virtual void visitMapIntegrator (const MapIntegrator &)
 Apply the algorithm to an integrator capable of mapping. More...
 
virtual void visitTrackIntegrator (const TrackIntegrator &)
 Apply the algorithm to an integrator capable of tracking. More...
 
- Public Member Functions inherited from BeamlineVisitor
 BeamlineVisitor ()
 
virtual ~BeamlineVisitor ()
 
- 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...
 

Protected Types

enum  {
  LINE, BEAM, NSLICE, STATIC,
  FILE, SIZE
}
 

Protected Attributes

struct MSplit::Data data
 
A_Tline itsTable
 
A_Tline::iterator n
 
const Beambeam
 
Twisstp
 
Twiss::TLine::iterator i
 
FMatrix< double, 6, 6 > Transf_mat
 
FVector< double, 3 > Euler_x
 
FVector< double, 3 > Euler_y
 
FVector< double, 2 > Dispx
 
FVector< double, 2 > Dispy
 
- Protected Attributes inherited from DefaultVisitor
const BeamlineitsLine
 
bool back_beam
 
bool back_track
 
bool back_path
 
double flip_B
 
double flip_s
 
- 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...
 

Private Member Functions

A_rowfindRow (const PlaceRep &row)
 

Private Attributes

A_Tline::const_iterator current
 
std::string itsLine
 

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 16 of file Split.h.

Member Typedef Documentation

Definition at line 63 of file Split.h.

Member Enumeration Documentation

anonymous enum
protected
Enumerator
LINE 
BEAM 
NSLICE 
STATIC 
FILE 
SIZE 

Definition at line 116 of file Split.h.

Constructor & Destructor Documentation

MSplit::MSplit ( )

Definition at line 174 of file Split.cpp.

References BEAM, FILE, Object::itsAttr, LINE, Attributes::makeBool(), Attributes::makeReal(), Attributes::makeString(), NSLICE, Object::registerOwnership(), AttributeHandler::STATEMENT, and STATIC.

Referenced by clone().

Here is the call graph for this function:

MSplit::MSplit ( const std::string &  name,
MSplit parent 
)

Definition at line 190 of file Split.cpp.

virtual MSplit::~MSplit ( )
inlinevirtual

Definition at line 67 of file Split.h.

Member Function Documentation

void MSplit::applyDefault ( const ElementBase eb)
virtual

Reimplemented from DefaultVisitor.

Definition at line 322 of file Split.cpp.

References MSplit::Data::courb, data, ElementBase::getElementLength(), MSplit::Data::k0s, MSplit::Data::kq, MSplit::Data::l, MSplit::Data::phi, and MSplit::Data::type.

Here is the call graph for this function:

MSplit::A_Tline::const_iterator MSplit::begin ( ) const

Definition at line 226 of file Split.cpp.

References itsTable.

Referenced by findRow(), getColumn(), and isDependent().

MSplit::A_Tline::iterator MSplit::begin ( )

Definition at line 223 of file Split.cpp.

References itsTable.

void MSplit::calcul ( Twiss::TLine::iterator  i,
A_row a,
int  order,
Twiss tp 
)
Object * MSplit::clone ( const std::string &  name)
virtual

Return a clone.

Implements Object.

Definition at line 756 of file Split.cpp.

References MSplit().

Here is the call graph for this function:

MSplit::A_Tline::const_iterator MSplit::end ( ) const

Definition at line 232 of file Split.cpp.

References itsTable.

Referenced by findRow(), getColumn(), and isDependent().

MSplit::A_Tline::iterator MSplit::end ( )

Definition at line 229 of file Split.cpp.

References itsTable.

void MSplit::execute ( )
virtual

Apply the algorithm to the top-level beamline.

Reimplemented from DefaultVisitor.

Definition at line 612 of file Split.cpp.

References BEAM, beam, Table::dynamic, fill(), Beam::find(), Attributes::getBool(), Attributes::getString(), Object::itsAttr, and STATIC.

Here is the call graph for this function:

void MSplit::fill ( )
virtual

Refill the buffer.

Implements Table.

Definition at line 619 of file Split.cpp.

References Table::refill, and run().

Referenced by execute().

Here is the call graph for this function:

MSplit::A_row & MSplit::findRow ( const PlaceRep row)
private

Definition at line 762 of file Split.cpp.

References begin(), end(), PlaceRep::enter(), Object::getOpalName(), i, PlaceRep::initialize(), PlaceRep::isActive(), and PlaceRep::leave().

Referenced by getCell(), and getRow().

Here is the call graph for this function:

double MSplit::getBETXMAX ( const A_row row,
int  i1 = 0,
int  i2 = 0 
) const

Definition at line 236 of file Split.cpp.

References Attributes::getReal(), i, MSplit::A_row::Interpol, Object::itsAttr, max(), and NSLICE.

Here is the call graph for this function:

double MSplit::getBETYMAX ( const A_row row,
int  i1 = 0,
int  i2 = 0 
) const

Definition at line 246 of file Split.cpp.

References Attributes::getReal(), i, MSplit::A_row::Interpol, Object::itsAttr, max(), and NSLICE.

Here is the call graph for this function:

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

Return value in selected table cell.

Implements Table.

Definition at line 684 of file Split.cpp.

References findRow().

Here is the call graph for this function:

std::vector< double > MSplit::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 701 of file Split.cpp.

References begin(), end(), RangeRep::enter(), RangeRep::initialize(), RangeRep::isActive(), and RangeRep::leave().

Here is the call graph for this function:

const MSplit::A_row & MSplit::getCurrent ( ) const

Definition at line 676 of file Split.cpp.

References current.

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

Return the default print columns.

Implements Table.

Definition at line 692 of file Split.cpp.

double MSplit::getLength ( )
virtual

Return the length of the table.

Implements Table.

Definition at line 680 of file Split.cpp.

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

Here is the call graph for this function:

const Beamline * MSplit::getLine ( ) const
virtual

Return embedded CLASSIC beamline.

Implements Table.

Definition at line 689 of file Split.cpp.

References itsTable.

std::vector< double > MSplit::getRow ( const PlaceRep ,
const std::vector< std::string > &   
)
virtual

Return a table row.

Implements Table.

Definition at line 718 of file Split.cpp.

References findRow().

Here is the call graph for this function:

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

Find out if table depends on the object identified by [b]name[/b].

Implements Table.

Definition at line 739 of file Split.cpp.

References begin(), end(), itsLine, and name.

Here is the call graph for this function:

Expressions::PtrToScalar< double > MSplit::makeColumnExpression ( const std::string &  colname) const
virtual

Implements Table.

Definition at line 752 of file Split.cpp.

bool MSplit::matches ( Table rhs) const
virtual

Check that [b]rhs[/b] is of same type as [b]this[/b].

Implements Table.

Definition at line 751 of file Split.cpp.

void MSplit::printTable ( std::ostream &  ,
const CellArray  
) const
virtual

Print list for the table.

Implements Table.

Definition at line 760 of file Split.cpp.

void MSplit::run ( )
void MSplit::visitCyclotron ( const Cyclotron cyc)
virtual

Apply the algorithm to an cyclotron.

Reimplemented from DefaultVisitor.

Definition at line 297 of file Split.cpp.

References ERRORMSG.

void MSplit::visitMultipole ( const Multipole mult)
virtual

Apply the algorithm to a multipole.

Reimplemented from DefaultVisitor.

Definition at line 257 of file Split.cpp.

References beam, MSplit::Data::courb, data, ElementBase::getElementLength(), Multipole::getField(), PartData::getP(), Beam::getReference(), K, MSplit::Data::k0s, MSplit::Data::kq, MSplit::Data::l, BMultipoleField::normal(), MSplit::Data::phi, and MSplit::Data::type.

Here is the call graph for this function:

void MSplit::visitRBend ( const RBend bend)
virtual
void MSplit::visitSBend ( const SBend bend)
virtual

Member Data Documentation

const Beam* MSplit::beam
protected

Definition at line 127 of file Split.h.

Referenced by execute(), visitMultipole(), visitRBend(), and visitSBend().

A_Tline::const_iterator MSplit::current
mutableprivate

Definition at line 144 of file Split.h.

Referenced by getCurrent().

struct MSplit::Data MSplit::data
protected
FVector<double, 2> MSplit::Dispx
protected

Definition at line 139 of file Split.h.

Referenced by calcul().

FVector<double, 2> MSplit::Dispy
protected

Definition at line 140 of file Split.h.

Referenced by calcul().

FVector<double, 3> MSplit::Euler_x
protected

Definition at line 135 of file Split.h.

Referenced by calcul().

FVector<double, 3> MSplit::Euler_y
protected

Definition at line 136 of file Split.h.

Referenced by calcul().

Twiss::TLine::iterator MSplit::i
protected

Definition at line 129 of file Split.h.

Referenced by findRow(), getBETXMAX(), getBETYMAX(), and run().

std::string MSplit::itsLine
private

Definition at line 146 of file Split.h.

Referenced by isDependent(), and run().

A_Tline MSplit::itsTable
protected

Definition at line 125 of file Split.h.

Referenced by begin(), end(), getLength(), getLine(), and run().

A_Tline::iterator MSplit::n
protected

Definition at line 126 of file Split.h.

Twiss* MSplit::tp
protected

Definition at line 128 of file Split.h.

Referenced by run().

FMatrix<double, 6, 6> MSplit::Transf_mat
protected

Definition at line 132 of file Split.h.

Referenced by calcul().


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