OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
SeparatorRep.h
Go to the documentation of this file.
1 #ifndef CLASSIC_SeparatorRep_HH
2 #define CLASSIC_SeparatorRep_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: SeparatorRep.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: SeparatorRep
13 //
14 // ------------------------------------------------------------------------
15 // Class category: BeamlineCore
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:34 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "AbsBeamline/Separator.h"
25 #include "Fields/EDipoleField.h"
26 
27 
28 // Class SeparatorRep
29 // ------------------------------------------------------------------------
31 
32 class SeparatorRep: public Separator {
33 
34 public:
35 
37  explicit SeparatorRep(const std::string &name);
38 
39  SeparatorRep();
40  SeparatorRep(const SeparatorRep &);
41  virtual ~SeparatorRep();
42 
44  // Return an identical deep copy of the element.
45  virtual ElementBase *clone() const;
46 
48  // This method constructs a Channel permitting read/write access to
49  // the attribute [b]aKey[/b] and returns it.
50  // If the attribute does not exist, it returns NULL.
51  virtual Channel *getChannel(const std::string &aKey, bool = false);
52 
54  // Version for non-constant object.
55  virtual EDipoleField &getField();
56 
58  // Version for constant object.
59  virtual const EDipoleField &getField() const;
60 
62  // Version for non-constant object.
63  virtual StraightGeometry &getGeometry();
64 
66  // Version for constant object.
67  virtual const StraightGeometry &getGeometry() const;
68 
70  // Return the image of the element, containing the name and type string
71  // of the element, and a copy of the user-defined attributes.
72  virtual ElementImage *getImage() const;
73 
75  // Return the x-component of the electric field in A/m.
76  virtual double getEx() const;
77 
79  // Return the y-component of the electric field in A/m.
80  virtual double getEy() const;
81 
83  // Assign the x-component of the electric field in A/m.
84  virtual void setEx(double Ex);
85 
87  // Assign the y-component of the electric field in A/m.
88  virtual void setEy(double Ey);
89 
90 private:
91 
92  // Not implemented.
93  void operator=(const SeparatorRep &);
94 
97 
100 };
101 
102 #endif // CLASSIC_SeparatorRep_HH
StraightGeometry geometry
The separator geometry.
Definition: SeparatorRep.h:96
A static homogeneous electrostatic field in the (x,y)-plane.
Definition: EDipoleField.h:30
Interface for basic beam line object.
Definition: ElementBase.h:128
Interface for electrostatic separator.
Definition: Separator.h:33
Representation for an electrostatic separator.
Definition: SeparatorRep.h:32
void operator=(const SeparatorRep &)
virtual EDipoleField & getField()
Get field.
EDipoleField field
The separator field.
Definition: SeparatorRep.h:99
virtual ~SeparatorRep()
An image of an element.
Definition: ElementImage.h:35
virtual double getEy() const
Get component.
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
virtual void setEy(double Ey)
Set component.
virtual ElementBase * clone() const
Return clone.
const std::string name
virtual StraightGeometry & getGeometry()
Get geometry.
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
virtual ElementImage * getImage() const
Construct an image.
virtual double getEx() const
Get component.
virtual void setEx(double Ex)
Set component.