OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
VacuumRep.h
Go to the documentation of this file.
1 //
2 // Class VacuumRep
3 // Defines a concrete representation for 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 class VacuumRep: public Vacuum {
30 
31 public:
32 
34  explicit VacuumRep(const std::string &name);
35 
36  VacuumRep();
37  VacuumRep(const VacuumRep &);
38  virtual ~VacuumRep();
39 
41  // Return an identical deep copy of the element.
42  virtual ElementBase *clone() const;
43 
45  // This method constructs a Channel permitting read/write access to
46  // the attribute [b]aKey[/b] and returns it.
47  // If the attribute does not exist, it returns NULL.
48  virtual Channel *getChannel(const std::string &aKey, bool = false);
49 
50 // virtual double getPressure() const;
51 // void setPressure(double);
52 
54  // Version for non-constant object.
55  virtual NullField &getField();
56 
58  // Version for constant object.
59  virtual const NullField &getField() const;
60 
62  // Version for non-constant object.
63  virtual PlanarArcGeometry &getGeometry();
64 
66  // Version for constant object.
67  virtual const PlanarArcGeometry &getGeometry() const;
68 
69 private:
70 
71  // Not implemented.
72  void operator=(const VacuumRep &);
73 
74  // The zero magnetic field.
76 
77  // The geometry.
79 
80 };
81 
82 #endif // CLASSIC_VacuumRep_HH
const std::string name
Definition: Vacuum.h:67
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: VacuumRep.cpp:71
virtual ~VacuumRep()
Definition: VacuumRep.cpp:62
PlanarArcGeometry geometry
Definition: VacuumRep.h:78
void operator=(const VacuumRep &)
NullField field
Definition: VacuumRep.h:75
virtual ElementBase * clone() const
Return clone.
Definition: VacuumRep.cpp:66
virtual PlanarArcGeometry & getGeometry()
Get geometry.
Definition: VacuumRep.cpp:90
virtual NullField & getField()
Get field.
Definition: VacuumRep.cpp:81
A simple arc in the XZ plane.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
A zero electromagnetic field.
Definition: NullField.h:30