OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
VacuumRep.h
Go to the documentation of this file.
1 //
2 // Class VacuumRep
3 // Representation for the vacuum conditions.
4 //
5 // Copyright (c) 2018 - 2021, Pedro Calvo, CIEMAT, Spain
6 // All rights reserved
7 //
8 // Implemented as part of the PhD thesis
9 // "Optimizing the radioisotope production of the novel AMIT
10 // superconducting weak focusing cyclotron"
11 //
12 // This file is part of OPAL.
13 //
14 // OPAL is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
21 //
22 #ifndef CLASSIC_VacuumRep_HH
23 #define CLASSIC_VacuumRep_HH
24 
25 #include "AbsBeamline/Vacuum.h"
27 #include "Fields/NullField.h"
28 
29 
30 class VacuumRep: public Vacuum {
31 
32 public:
33 
35  explicit VacuumRep(const std::string& name);
36 
37  VacuumRep();
38  VacuumRep(const VacuumRep&);
39  virtual ~VacuumRep();
40 
42  // Return an identical deep copy of the element.
43  virtual ElementBase* clone() const;
44 
46  // This method constructs a Channel permitting read/write access to
47  // the attribute [b]aKey[/b] and returns it.
48  // If the attribute does not exist, it returns nullptr.
49  virtual Channel* getChannel(const std::string& aKey, bool = false);
50 
52  // Version for non-constant object.
53  virtual NullField& getField();
54 
56  // Version for constant object.
57  virtual const NullField& getField() const;
58 
60  // Version for non-constant object.
61  virtual StraightGeometry& getGeometry();
62 
64  // Version for constant object.
65  virtual const StraightGeometry& getGeometry() const;
66 
67 private:
68 
69  // Not implemented.
70  void operator=(const VacuumRep&);
71 
72  // The zero magnetic field.
74 
75  // The geometry.
77 };
78 
79 #endif // CLASSIC_VacuumRep_HH
A geometry representing a straight line.
virtual ~VacuumRep()
Definition: VacuumRep.cpp:61
Definition: Vacuum.h:61
StraightGeometry geometry
Definition: VacuumRep.h:76
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: VacuumRep.cpp:70
Abstract interface for read/write access to variable.
Definition: Channel.h:32
const std::string name
virtual NullField & getField()
Get field.
Definition: VacuumRep.cpp:80
virtual ElementBase * clone() const
Return clone.
Definition: VacuumRep.cpp:65
virtual StraightGeometry & getGeometry()
Get geometry.
Definition: VacuumRep.cpp:88
void operator=(const VacuumRep &)
A zero electromagnetic field.
Definition: NullField.h:30
NullField field
Definition: VacuumRep.h:73