OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ProbeRep.h
Go to the documentation of this file.
1//
2// Class ProbeRep
3// Representation for Probe.
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_ProbeRep_HH
19#define OPALX_ProbeRep_HH
20
21#include "AbsBeamline/Probe.h"
23#include "Fields/NullField.h"
24
25class ProbeRep : public Probe {
26public:
28 explicit ProbeRep(const std::string& name);
29
30 ProbeRep();
31 ProbeRep(const ProbeRep&);
32 virtual ~ProbeRep();
33
35 // Return an identical deep copy of the element.
36 virtual ElementBase* clone() const;
37
39 // This method constructs a Channel permitting read/write access to
40 // the attribute [b]aKey[/b] and returns it.
41 // If the attribute does not exist, it returns nullptr.
42 virtual Channel* getChannel(const std::string& aKey, bool = false);
43
45 // Version for non-constant object.
46 virtual NullField& getField();
47
49 // Version for constant object.
50 virtual const NullField& getField() const;
51
53 // Return the element geometry.
54 // Version for non-constant object.
56 // Return the element geometry.
57 // Version for non-constant object.
59
61 // Return the element geometry
62 // Version for constant object.
63 virtual const StraightGeometry& getGeometry() const;
64
66 virtual void setActive(bool = true);
67
68protected:
71
74
76 bool active;
77
78private:
79 // Not implemented.
80 void operator=(const ProbeRep&);
81};
82
83#endif // OPALX_ProbeRep_HH
Abstract interface for read/write access to variable.
Definition Channel.h:30
A zero electromagnetic field.
Definition NullField.h:29
NullField field
The zero magnetic field.
Definition ProbeRep.h:70
bool active
The active/inactive flag.
Definition ProbeRep.h:76
virtual StraightGeometry & getGeometry()
Get geometry.
Definition ProbeRep.cpp:57
virtual ElementBase * clone() const
Return clone.
Definition ProbeRep.cpp:41
virtual ~ProbeRep()
Definition ProbeRep.cpp:39
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition ProbeRep.cpp:43
StraightGeometry geometry
The probe's geometry.
Definition ProbeRep.h:73
void operator=(const ProbeRep &)
virtual void setActive(bool=true)
Set active flag.
Definition ProbeRep.cpp:61
virtual NullField & getField()
Get field.
Definition ProbeRep.cpp:53
Definition Probe.h:28
A geometry representing a straight line.