OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
SeptumRep.h
Go to the documentation of this file.
1 #ifndef CLASSIC_SeptumRep_HH
2 #define CLASSIC_SeptumRep_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: SeptumRep.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: SeptumRep
13 //
14 // ------------------------------------------------------------------------
15 // Class category: BeamlineCore
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2009/09/21 10:21:06 $
19 // $Author: bi $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "AbsBeamline/Septum.h"
25 #include "Fields/NullField.h"
26 
27 // Class SeptumRep
28 // ------------------------------------------------------------------------
30 
31 class SeptumRep: public Septum {
32 
33 public:
34 
36  explicit SeptumRep(const std::string &name);
37 
38  SeptumRep();
39  SeptumRep(const SeptumRep &);
40  virtual ~SeptumRep();
41 
43  // Return an identical deep copy of the element.
44  virtual ElementBase *clone() const;
45 
47  // This method constructs a Channel permitting read/write access to
48  // the attribute [b]aKey[/b] and returns it.
49  // If the attribute does not exist, it returns NULL.
50  virtual Channel *getChannel(const std::string &aKey, bool = false);
51 
53  // Version for non-constant object.
54  virtual NullField &getField();
55 
57  // Version for constant object.
58  virtual const NullField &getField() const;
59 
61  // Return the element geometry.
62  // Version for non-constant object.
64  // Return the element geometry.
65  // Version for non-constant object.
66  virtual StraightGeometry &getGeometry();
67 
69  // Return the element geometry
70  // Version for constant object.
71  virtual const StraightGeometry &getGeometry() const;
72 
74  // Return the image of the element, containing the name and type string
75  // of the element, and a copy of the user-defined attributes.
76  virtual ElementImage *getImage() const;
77 
79  virtual void setActive(bool = true);
80 
81 protected:
82 
85 
88 
90  bool active;
91 
92 private:
93 
94  // Not implemented.
95  void operator=(const SeptumRep &);
96 
97 
98 
99 };
100 
101 #endif // CLASSIC_SeptumRep_HH
virtual ElementBase * clone() const
Return clone.
Definition: SeptumRep.cpp:69
StraightGeometry geometry
The septa's geometry.
Definition: SeptumRep.h:87
Interface for basic beam line object.
Definition: ElementBase.h:128
Interface for septum magnet.
Definition: Septum.h:11
virtual void setActive(bool=true)
Set active flag.
Definition: SeptumRep.cpp:111
void operator=(const SeptumRep &)
A zero electromagnetic field.
Definition: NullField.h:30
NullField field
The zero magnetic field.
Definition: SeptumRep.h:84
virtual ~SeptumRep()
Definition: SeptumRep.cpp:65
virtual StraightGeometry & getGeometry()
Get geometry.
Definition: SeptumRep.cpp:92
virtual ElementImage * getImage() const
Construct an image.
Definition: SeptumRep.cpp:101
An image of an element.
Definition: ElementImage.h:35
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: SeptumRep.cpp:74
Representation for Septum.
Definition: SeptumRep.h:31
const std::string name
bool active
The active/inactive flag.
Definition: SeptumRep.h:90
virtual NullField & getField()
Get field.
Definition: SeptumRep.cpp:84