OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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 OPALX_MultipoleRep_HH
19#define OPALX_MultipoleRep_HH
20
23
24class MultipoleRep : public Multipole {
25public:
27 explicit MultipoleRep(const std::string& name);
28
31 virtual ~MultipoleRep();
32
34 // Return an identical deep copy of the element.
35 virtual ElementBase* clone() const;
36
38 // This method constructs a Channel permitting read/write access to
39 // the attribute [b]aKey[/b]r and returns it.
40 // If the attribute does not exist, it returns nullptr.
41 virtual Channel* getChannel(const std::string& aKey, bool = false);
42
44 // Version for non-constant object.
45 virtual BMultipoleField& getField();
46
48 // Version for constant object.
49 virtual const BMultipoleField& getField() const;
50
52 // Return the element geometry.
53 // Version for non-constant object.
55
57 // Return the element geometry
58 // Version for constant object.
59 virtual const StraightGeometry& getGeometry() const;
60
62 virtual void setField(const BMultipoleField& field);
63
64private:
67
70
71 // Not implemented.
72 void operator=(const MultipoleRep&);
73};
74
75#endif // OPALX_MultipoleRep_HH
The magnetic field of a multipole.
Abstract interface for read/write access to variable.
Definition Channel.h:30
virtual ElementBase * clone() const
Return clone.
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
StraightGeometry geometry
Multipole geometry.
virtual ~MultipoleRep()
virtual BMultipoleField & getField()
Get field.
BMultipoleField field
Multipole field.
virtual void setField(const BMultipoleField &field)
Set mulitpole field.
void operator=(const MultipoleRep &)
virtual StraightGeometry & getGeometry()
Get geometry.
Interface for general multipole.
Definition Multipole.h:30
A geometry representing a straight line.