OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
MultipoleRep.h
Go to the documentation of this file.
1//
2// Class MultipoleRep
3// Representation for a general multipole.
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_MultipoleRep_HH
19#define CLASSIC_MultipoleRep_HH
20
23
24class MultipoleRep: public Multipole {
25
26public:
27
29 explicit MultipoleRep(const std::string &name);
30
33 virtual ~MultipoleRep();
34
36 // Return an identical deep copy of the element.
37 virtual ElementBase *clone() const;
38
40 // This method constructs a Channel permitting read/write access to
41 // the attribute [b]aKey[/b]r and returns it.
42 // If the attribute does not exist, it returns nullptr.
43 virtual Channel *getChannel(const std::string &aKey, bool = false);
44
46 // Version for non-constant object.
47 virtual BMultipoleField &getField();
48
50 // Version for constant object.
51 virtual const BMultipoleField &getField() const;
52
54 // Return the element geometry.
55 // Version for non-constant object.
57
59 // Return the element geometry
60 // Version for constant object.
61 virtual const StraightGeometry &getGeometry() const;
62
64 virtual void setField(const BMultipoleField &field);
65
66private:
67
70
73
74 // Not implemented.
75 void operator=(const MultipoleRep &);
76};
77
78#endif // CLASSIC_MultipoleRep_HH
const std::string name
Interface for general multipole.
Definition: Multipole.h:47
virtual ElementBase * clone() const
Return clone.
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
StraightGeometry geometry
Multipole geometry.
Definition: MultipoleRep.h:69
virtual ~MultipoleRep()
virtual BMultipoleField & getField()
Get field.
BMultipoleField field
Multipole field.
Definition: MultipoleRep.h:72
virtual void setField(const BMultipoleField &field)
Set mulitpole field.
void operator=(const MultipoleRep &)
virtual StraightGeometry & getGeometry()
Get geometry.
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
The magnetic field of a multipole.