OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
OpalBend.h
Go to the documentation of this file.
1 #ifndef OPAL_OpalBend_HH
2 #define OPAL_OpalBend_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: OpalBend.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1.4.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: OpalBend
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2004/11/12 20:10:11 $
17 // $Author: adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "Elements/OpalElement.h"
22 
23 
24 // Class OpalBend
25 // ------------------------------------------------------------------------
27 // This class factors out the special behaviour for the DOOM interface
28 // and the printing in OPAL format, as well as the bend attributes.
29 
30 class OpalBend: public OpalElement {
31 
32 public:
33 
35  enum {
36  ANGLE = COMMON, // The bend angle.
37  K0, K0S, // The multipole coefficients; must be in this order.
38  K1, K1S,
39  K2, K2S,
40  K3, K3S,
41  E1, E2, // The edge angles.
42  H1, H2, // The pole face curvatures.
43  HGAP, FINT, // The fringing field parameters.
44  SLICES, STEPSIZE, // Parameters used to determine slicing.
45  FMAPFN, // File name containing on-axis field.
46  GAP, // Full gap of magnet.
47  HAPERT, // Horizontal aperture of magnet.
48  ROTATION, // Magnet rotation about z axis.
49  DESIGNENERGY, // the design energy of the particles
50  GREATERTHANPI, // Boolean flag set to true if bend angle is greater
51  // than 180 degrees.
52  NSLICES, // The number of slices / steps per element for map tracking
53  SIZE // Total number of attributes.
54  };
55 
57  OpalBend(const char *name, const char *help);
58 
59  virtual ~OpalBend();
60 
62  // Handle printing in OPAL-8 format.
63  virtual void print(std::ostream &) const;
64 
65 protected:
66 
68  OpalBend(const std::string &name, OpalBend *parent);
69 
70 private:
71 
72  // Not implemented.
73  OpalBend(const OpalBend &);
74  void operator=(const OpalBend &);
75 };
76 
77 #endif // OPAL_OpalBend_HH
virtual void print(std::ostream &) const
Print the bend magnet.
Definition: OpalBend.cpp:118
OpalBend(const char *name, const char *help)
Exemplar constructor.
Definition: OpalBend.cpp:30
Base class for all bending magnets.
Definition: OpalBend.h:30
Base class for all beam line elements.
Definition: OpalElement.h:41
const std::string name
virtual ~OpalBend()
Definition: OpalBend.cpp:114
void operator=(const OpalBend &)