OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Beamline.h
Go to the documentation of this file.
1 #ifndef CLASSIC_Beamline_HH
2 #define CLASSIC_Beamline_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Beamline.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Beamline
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Beamlines
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:34 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
24 #include "Algorithms/Vektor.h"
25 #include "Algorithms/Quaternion.h"
26 
27 class CLRangeError;
28 
29 
30 // Class Beamline
31 // ------------------------------------------------------------------------
33 // A beam line is built as a list of objects derived from ElmPtr. Each
34 // ElmPtr (``element pointer'') points to a ElementBase, and may contain
35 // additional data describing the position, like lattice functions etc.
36 
37 class Beamline: public ElementBase {
38 
39 public:
40 
42  explicit Beamline(const std::string &name);
43 
44  Beamline();
45  Beamline(const Beamline &);
46  virtual ~Beamline();
47 
49  // If the parameter [b]reverse[/b] is true, theline is traversed in
50  // reverse direction. If any error occurs, this method may throw an
51  // exception.
52  virtual void iterate(BeamlineVisitor &, bool reverse) const = 0;
53 
54  virtual Vector_t getOrigin3D() const;
55  virtual Quaternion getInitialDirection() const;
56  virtual bool getRelativeFlag() const;
57 private:
58 
59  // Not implemented.
60  void operator=(const Beamline &);
61 };
62 
63 #endif // CLASSIC_Beamline_HH
virtual void iterate(BeamlineVisitor &, bool reverse) const =0
Apply visitor to all elements of the line.
Interface for basic beam line object.
Definition: ElementBase.h:128
virtual Quaternion getInitialDirection() const
Definition: Beamline.cpp:53
Beamline()
Definition: Beamline.cpp:28
virtual bool getRelativeFlag() const
Definition: Beamline.cpp:57
virtual ~Beamline()
Definition: Beamline.cpp:46
An abstract sequence of beam line components.
Definition: Beamline.h:37
void operator=(const Beamline &)
Range error.
Definition: CLRangeError.h:33
const std::string name
virtual Vector_t getOrigin3D() const
Definition: Beamline.cpp:49
Abstract algorithm.