OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Surveyor.h
Go to the documentation of this file.
1 #ifndef MAD_Surveyor_HH
2 #define MAD_Surveyor_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Surveyor.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Surveyor
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Algorithms
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:33 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
25 
26 
27 // Class Surveyor
28 // ------------------------------------------------------------------------
30 // This visitor class computes the survey of a beam line.
31 
32 class Surveyor: public DefaultVisitor {
33 
34 public:
35 
37  // Assume zero initial conditions.
38  // The beam line to be tracked is [b]bl[/b].
39  // If [b]revTrack[/b] is true, track from s = C to s = 0.
40  Surveyor(Beamline &bl, bool revTrack);
41 
43  // Use given initial conditions.
44  // The beam line to be tracked is [b]bl[/b].
45  // If [b]revTrack[/b] is true, track from s = C to s = 0.
46  Surveyor(Beamline &bl, double x0, double y0, double z0,
47  double theta0, double phi0, double psi0,
48  bool revTrack = false);
49 
51  // Use given initial conditions in terms of an Euclid3D object.
52  // The beam line to be tracked is [b]bl[/b].
53  // If [b]revTrack[/b] is true, track from s = C to s = 0.
54  Surveyor(Beamline &bl, const Euclid3D &init, bool revTrack);
55 
56  virtual ~Surveyor();
57 
59  void getMap(Euclid3D &) const;
60 
62  void setMap(const Euclid3D &);
63 
64 
66  virtual void visitPatch(const Patch &pat);
67 
68 private:
69 
70  // Not implemented.
71  Surveyor();
72  Surveyor(const Surveyor &);
73  void operator=(const Surveyor &);
74 
76  // Apply the default to all element (advance the position and direction).
77  // All visitXXX() methods except visitPatch() call applyDefault() which
78  // is overridden here to propagate the survey through the element.
79  virtual void applyDefault(const ElementBase &element);
80 
83 };
84 
85 #endif // __Surveyor_HH
virtual ~Surveyor()
Definition: Surveyor.cpp:48
Interface for basic beam line object.
Definition: ElementBase.h:128
Euclid3D itsMap
The accumulated survey map.
Definition: Surveyor.h:82
virtual void applyDefault(const ElementBase &element)
Default action.
Definition: Surveyor.cpp:69
Default algorithms.
Displacement and rotation in space.
Definition: Euclid3D.h:68
void operator=(const Surveyor &)
An abstract sequence of beam line components.
Definition: Beamline.h:37
void getMap(Euclid3D &) const
Return accumulated map.
Definition: Surveyor.cpp:52
virtual void visitPatch(const Patch &pat)
Apply the algorithm to a patch.
Definition: Surveyor.cpp:62
void setMap(const Euclid3D &)
Reset accumulated map for restart.
Definition: Surveyor.cpp:57
Interface for a geometric patch.
Definition: Patch.h:34
Survey algorithm.
Definition: Surveyor.h:32