OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ProbeRep.h
Go to the documentation of this file.
1 #ifndef CLASSIC_ProbeRep_HH
2 #define CLASSIC_ProbeRep_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: ProbeRep.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: ProbeRep
13 //
14 // ------------------------------------------------------------------------
15 // Class category: BeamlineCore
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2009/10/07 10:21:06 $
19 // $Author: bi $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "AbsBeamline/Probe.h"
25 #include "Fields/NullField.h"
26 
27 // Class ProbeRep
28 // ------------------------------------------------------------------------
30 
31 class ProbeRep: public Probe {
32 
33 public:
34 
36  explicit ProbeRep(const std::string &name);
37 
38  ProbeRep();
39  ProbeRep(const ProbeRep &);
40  virtual ~ProbeRep();
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 ProbeRep &);
96 
97 
98 
99 };
100 
101 #endif // CLASSIC_ProbeRep_HH
void operator=(const ProbeRep &)
Interface for basic beam line object.
Definition: ElementBase.h:128
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: ProbeRep.cpp:74
virtual void setActive(bool=true)
Set active flag.
Definition: ProbeRep.cpp:111
ProbeRep()
Definition: ProbeRep.cpp:50
virtual ~ProbeRep()
Definition: ProbeRep.cpp:65
A zero electromagnetic field.
Definition: NullField.h:30
Representation for Probe.
Definition: ProbeRep.h:31
Interface for probe.
Definition: Probe.h:16
virtual NullField & getField()
Get field.
Definition: ProbeRep.cpp:84
bool active
The active/inactive flag.
Definition: ProbeRep.h:90
An image of an element.
Definition: ElementImage.h:35
NullField field
The zero magnetic field.
Definition: ProbeRep.h:84
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
const std::string name
StraightGeometry geometry
The probe's geometry.
Definition: ProbeRep.h:87
virtual ElementImage * getImage() const
Construct an image.
Definition: ProbeRep.cpp:101
virtual StraightGeometry & getGeometry()
Get geometry.
Definition: ProbeRep.cpp:92
virtual ElementBase * clone() const
Return clone.
Definition: ProbeRep.cpp:69