OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
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 Beamline
28 // ------------------------------------------------------------------------
30 // A beam line is built as a list of objects derived from ElmPtr. Each
31 // ElmPtr (``element pointer'') points to a ElementBase, and may contain
32 // additional data describing the position, like lattice functions etc.
33 
34 class Beamline: public ElementBase {
35 
36 public:
37 
39  explicit Beamline(const std::string &name);
40 
41  Beamline();
42  Beamline(const Beamline &);
43  virtual ~Beamline();
44 
46  // If the parameter [b]reverse[/b] is true, theline is traversed in
47  // reverse direction. If any error occurs, this method may throw an
48  // exception.
49  virtual void iterate(BeamlineVisitor &, bool reverse) const = 0;
50 
51  virtual Vector_t getOrigin3D() const;
52  virtual Quaternion getInitialDirection() const;
53  virtual bool getRelativeFlag() const;
54 private:
55 
56  // Not implemented.
57  void operator=(const Beamline &);
58 };
59 
60 #endif // CLASSIC_Beamline_HH
const std::string name
An abstract sequence of beam line components.
Definition: Beamline.h:34
virtual ~Beamline()
Definition: Beamline.cpp:46
virtual bool getRelativeFlag() const
Definition: Beamline.cpp:57
virtual void iterate(BeamlineVisitor &, bool reverse) const =0
Apply visitor to all elements of the line.
virtual Quaternion getInitialDirection() const
Definition: Beamline.cpp:53
Beamline()
Definition: Beamline.cpp:28
virtual Vector_t getOrigin3D() const
Definition: Beamline.cpp:49
void operator=(const Beamline &)