OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
DegraderRep.h
Go to the documentation of this file.
1 //
2 // Class DegraderRep
3 // Representation for a degrader.
4 //
5 // Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
6 // All rights reserved
7 //
8 // This file is part of OPAL.
9 //
10 // OPAL is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17 //
18 #ifndef CLASSIC_DegraderRep_HH
19 #define CLASSIC_DegraderRep_HH
20 
21 #include "AbsBeamline/Degrader.h"
23 #include "Fields/NullField.h"
24 
25 
26 class DegraderRep: public Degrader {
27 
28 public:
29 
31  explicit DegraderRep(const std::string &name);
32 
33  DegraderRep();
34  DegraderRep(const DegraderRep &);
35  virtual ~DegraderRep();
36 
38  // Return an identical deep copy of the element.
39  virtual ElementBase *clone() const;
40 
42  // This method constructs a Channel permitting read/write access to
43  // the attribute [b]aKey[/b] and returns it.
44  // If the attribute does not exist, it returns NULL.
45  virtual Channel *getChannel(const std::string &aKey, bool = false);
46 
48  // Version for non-constant object.
49  virtual NullField &getField();
50 
52  // Version for constant object.
53  virtual const NullField &getField() const;
54 
56  // Version for non-constant object.
57  virtual StraightGeometry &getGeometry();
58 
60  // Version for constant object.
61  virtual const StraightGeometry &getGeometry() const;
62 
63  /*
65  virtual double getXsize() = 0;//const;
66 
68  virtual double getYsize() = 0; const;
69 
71  virtual void setXsize(double) = 0;
72 
74  virtual void setYsize(double) = 0;
75  */
76 private:
77 
78  // Not implemented.
79  void operator=(const DegraderRep &);
80 
81  // The zero magnetic field.
83 
84  // The geometry.
86 
87  // The horizontal half-size.
88  double xSize;
89 
90  // The vertical half-size.
91  double ySize;
92 };
93 
94 #endif // CLASSIC_DegraderRep_HH
const std::string name
StraightGeometry geometry
Definition: DegraderRep.h:85
virtual ElementBase * clone() const
Return clone.
Definition: DegraderRep.cpp:62
virtual StraightGeometry & getGeometry()
Get geometry.
Definition: DegraderRep.cpp:87
void operator=(const DegraderRep &)
virtual ~DegraderRep()
Definition: DegraderRep.cpp:58
double ySize
Definition: DegraderRep.h:91
virtual NullField & getField()
Get field.
Definition: DegraderRep.cpp:78
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: DegraderRep.cpp:67
NullField field
Definition: DegraderRep.h:82
double xSize
Definition: DegraderRep.h:88
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
A zero electromagnetic field.
Definition: NullField.h:30