OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
StripperRep.h
Go to the documentation of this file.
1 //
2 // Class StripperRep
3 // Representation for Stripper
4 //
5 // Copyright (c) 2011, Jianjun Yang,
6 // Paul Scherrer Institut, Villigen PSI, Switzerland
7 // All rights reserved
8 //
9 // Implemented as part of the PhD thesis
10 // "Beam dynamics in high intensity cyclotrons including neighboring bunch effects"
11 // and the paper
12 // "Beam dynamics in high intensity cyclotrons including neighboring bunch effects:
13 // Model, implementation, and application"
14 // (https://journals.aps.org/prab/pdf/10.1103/PhysRevSTAB.13.064201)
15 //
16 // This file is part of OPAL.
17 //
18 // OPAL is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
25 //
26 #ifndef CLASSIC_StripperRep_HH
27 #define CLASSIC_StripperRep_HH
28 
29 #include "AbsBeamline/Stripper.h"
31 #include "Fields/NullField.h"
32 
33 class StripperRep: public Stripper {
34 
35 public:
36 
38  explicit StripperRep(const std::string &name);
39 
40  StripperRep();
41  StripperRep(const StripperRep &);
42  virtual ~StripperRep();
43 
45  // Return an identical deep copy of the element.
46  virtual ElementBase *clone() const;
47 
49  // This method constructs a Channel permitting read/write access to
50  // the attribute [b]aKey[/b] and returns it.
51  // If the attribute does not exist, it returns NULL.
52  virtual Channel *getChannel(const std::string &aKey, bool = false);
53 
55  // Version for non-constant object.
56  virtual NullField &getField();
57 
59  // Version for constant object.
60  virtual const NullField &getField() const;
61 
63  // Return the element geometry.
64  // Version for non-constant object.
66  // Return the element geometry.
67  // Version for non-constant object.
68  virtual StraightGeometry &getGeometry();
69 
71  // Return the element geometry
72  // Version for constant object.
73  virtual const StraightGeometry &getGeometry() const;
74 
76  virtual void setActive(bool = true);
77 
78 protected:
79 
82 
85 
87  bool active;
88 
89 private:
90 
91  // Not implemented.
92  void operator=(const StripperRep &);
93 
94 
95 
96 };
97 
98 #endif // CLASSIC_StripperRep_HH
const std::string name
NullField field
The zero magnetic field.
Definition: StripperRep.h:81
void operator=(const StripperRep &)
virtual StraightGeometry & getGeometry()
Get geometry.
Definition: StripperRep.cpp:96
virtual ~StripperRep()
Definition: StripperRep.cpp:69
virtual void setActive(bool=true)
Set active flag.
bool active
The active/inactive flag.
Definition: StripperRep.h:87
virtual ElementBase * clone() const
Return clone.
Definition: StripperRep.cpp:73
StraightGeometry geometry
The septa's geometry.
Definition: StripperRep.h:84
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: StripperRep.cpp:78
virtual NullField & getField()
Get field.
Definition: StripperRep.cpp: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