OPALX (Object Oriented Parallel Accelerator Library for Exascal)
MINIorX
OPALX
Configure.cpp
Go to the documentation of this file.
1
//
2
// Namespace Configure
3
// The OPAL configurator.
4
// This class must be modified to configure the commands to be contained
5
// in an executable OPAL program. For each command an exemplar object
6
// is constructed and linked to the main directory. This exemplar is then
7
// available to the OPAL parser for cloning.
8
// This class could be part of the class OpalData. It is separated from
9
// that class and opale into a special module in order to reduce
10
// dependencies between modules.
11
//
12
// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
13
// All rights reserved
14
//
15
// This file is part of OPAL.
16
//
17
// OPAL is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
// You should have received a copy of the GNU General Public License
23
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
24
//
25
#include "
OpalConfigure/Configure.h
"
26
#include "
AbstractObjects/OpalData.h
"
27
28
#include "
Distribution/Distribution.h
"
29
30
// Basic action commands.
31
#include "
BasicActions/Call.h
"
32
#include "
BasicActions/DumpEMFields.h
"
33
#include "
BasicActions/DumpFields.h
"
34
#include "
BasicActions/Echo.h
"
35
#include "
BasicActions/Help.h
"
36
#include "
BasicActions/Option.h
"
37
#include "
BasicActions/PSystem.h
"
38
#include "
BasicActions/Quit.h
"
39
#include "
BasicActions/Select.h
"
40
#include "
BasicActions/Stop.h
"
41
#include "
BasicActions/System.h
"
42
#include "
BasicActions/Title.h
"
43
#include "
BasicActions/Value.h
"
44
45
// Macro command.
46
#include "
OpalParser/MacroCmd.h
"
47
48
// Commands introducing a special mode.
49
#include "
Track/TrackCmd.h
"
50
51
// Table-related commands.
52
#include "
Structure/Beam.h
"
53
#include "
Structure/FieldSolverCmd.h
"
54
// #include "Tables/List.h"
55
56
// Value definitions commands.
57
#include "
ValueDefinitions/BoolConstant.h
"
58
#include "
ValueDefinitions/RealConstant.h
"
59
#include "
ValueDefinitions/RealVariable.h
"
60
#include "
ValueDefinitions/RealVector.h
"
61
#include "
ValueDefinitions/StringConstant.h
"
62
63
// Element commands.
64
#include "
Elements/OpalCavity.h
"
65
#include "
Elements/OpalDrift.h
"
66
#include "
Elements/OpalMarker.h
"
67
#include "
Elements/OpalOffset/OpalLocalCartesianOffset.h
"
68
#include "
Elements/OpalProbe.h
"
69
#include "
Elements/OpalRingDefinition.h
"
70
#include "
Elements/OpalSolenoid.h
"
71
#include "
Elements/OpalVerticalFFAMagnet.h
"
72
73
// Structure-related commands.
74
#include "
Lines/Line.h
"
75
76
#include "
changes.h
"
77
78
// Modify these methods to add new commands.
79
// ------------------------------------------------------------------------
80
81
namespace
{
82
83
void
makeActions() {
84
OpalData
* opal =
OpalData::getInstance
();
85
opal->
create
(
new
Call
());
86
opal->
create
(
new
DumpFields
());
87
opal->
create
(
new
DumpEMFields
());
88
opal->
create
(
new
Echo
());
89
opal->
create
(
new
Help
());
90
opal->
create
(
new
Option
());
91
opal->
create
(
new
Select
());
92
opal->
create
(
new
Stop
());
93
opal->
create
(
new
Quit
());
94
opal->
create
(
new
PSystem
());
95
opal->
create
(
new
System
());
96
opal->
create
(
new
Title
());
97
opal->
create
(
new
TrackCmd
());
98
opal->
create
(
new
Value
());
99
}
100
101
void
makeDefinitions() {
102
OpalData
* opal =
OpalData::getInstance
();
103
// Must create the value definitions first.
104
opal->
create
(
new
BoolConstant
());
105
opal->
create
(
new
RealConstant
());
106
opal->
create
(
new
RealVariable
());
107
opal->
create
(
new
RealVector
());
108
opal->
create
(
new
StringConstant
());
109
110
opal->
create
(
new
MacroCmd
());
111
112
opal->
create
(
new
Beam
());
113
opal->
create
(
new
FieldSolverCmd
());
114
opal->
create
(
new
Distribution
());
115
}
116
117
void
makeElements() {
118
OpalData
* opal =
OpalData::getInstance
();
119
opal->
create
(
new
OpalCavity
());
120
opal->
create
(
new
OpalDrift
());
121
opal->
create
(
new
OpalMarker
());
122
opal->
create
(
new
OpalProbe
());
123
opal->
create
(
new
OpalSolenoid
());
124
opal->
create
(
new
OpalRingDefinition
());
125
opal->
create
(
new
Line
());
126
opal->
create
(
new
OpalOffset::OpalLocalCartesianOffset
());
127
opal->
create
(
new
OpalVerticalFFAMagnet
());
128
}
129
};
// namespace
130
131
namespace
Configure
{
132
void
configure
() {
133
makeDefinitions();
134
makeElements();
135
makeActions();
136
Versions::fillChanges
();
137
}
138
};
// namespace Configure
TrackCmd.h
Help.h
Quit.h
Stop.h
DumpEMFields.h
Title.h
Echo.h
Call.h
Value.h
DumpFields.h
Option.h
System.h
PSystem.h
Select.h
Distribution.h
StringConstant.h
RealVector.h
RealVariable.h
RealConstant.h
BoolConstant.h
OpalSolenoid.h
OpalMarker.h
OpalLocalCartesianOffset.h
OpalRingDefinition.h
OpalDrift.h
OpalProbe.h
OpalVerticalFFAMagnet.h
OpalCavity.h
Configure.h
changes.h
MacroCmd.h
OpalData.h
Beam.h
FieldSolverCmd.h
Line.h
Versions::fillChanges
void fillChanges()
Definition
changes.cpp:12
Configure
Definition
Configure.cpp:131
Configure::configure
void configure()
Configure all commands.
Definition
Configure.cpp:132
OpalData
The global OPAL structure.
Definition
OpalData.h:45
OpalData::create
void create(Object *newObject)
Create new object.
Definition
OpalData.cpp:473
OpalData::getInstance
static OpalData * getInstance()
Definition
OpalData.cpp:195
Call
Definition
Call.h:24
DumpEMFields
Definition
DumpEMFields.h:54
DumpFields
Definition
DumpFields.h:54
Echo
Definition
Echo.h:24
Help
Definition
Help.h:24
Option
Definition
Option.h:30
PSystem
Definition
PSystem.h:24
Quit
Definition
Quit.h:24
Select
Definition
Select.h:26
Stop
Definition
Stop.h:24
System
Definition
System.h:24
Title
Definition
Title.h:24
Value
Definition
Value.h:24
Distribution
Definition
Distribution.h:57
OpalCavity
Definition
OpalCavity.h:26
OpalDrift
Definition
OpalDrift.h:23
OpalMarker
The MARKER element.
Definition
OpalMarker.h:28
OpalOffset::OpalLocalCartesianOffset
Definition
OpalLocalCartesianOffset.h:44
OpalProbe
Definition
OpalProbe.h:23
OpalRingDefinition
Definition
OpalRingDefinition.h:41
OpalSolenoid
Definition
OpalSolenoid.h:24
OpalVerticalFFAMagnet
Definition
OpalVerticalFFAMagnet.h:23
Line
Definition
Line.h:30
MacroCmd
Definition
MacroCmd.h:35
Beam
Definition
Beam.h:31
FieldSolverCmd
Definition
FieldSolverCmd.h:51
TrackCmd
Definition
TrackCmd.h:27
BoolConstant
Definition
BoolConstant.h:24
RealConstant
Definition
RealConstant.h:24
RealVariable
Definition
RealVariable.h:24
RealVector
Definition
RealVector.h:24
StringConstant
Definition
StringConstant.h:24