OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
TrackRun.h
Go to the documentation of this file.
1 //
2 // Class TrackRun
3 // The RUN command.
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 OPAL_TrackRun_HH
19 #define OPAL_TrackRun_HH
20 
21 #include "AbstractObjects/Action.h"
22 
23 #include <string>
24 #include <vector>
25 
26 class Beam;
27 class OpalData;
28 class DataSink;
29 class Distribution;
30 class Tracker;
31 class ParallelTTracker;
32 class FieldSolver;
33 class H5PartWrapper;
34 
35 class TrackRun: public Action {
36 
37 public:
38 
40  TrackRun();
41 
42  virtual ~TrackRun();
43 
45  virtual TrackRun *clone(const std::string &name);
46 
48  virtual void execute();
49 
50 private:
51 
52  // Not implemented.
53  TrackRun(const TrackRun &);
54  void operator=(const TrackRun &);
55 
56  // Clone constructor.
57  TrackRun(const std::string &name, TrackRun *parent);
58 
59  void setupTTracker();
60  void setupCyclotronTracker();
61  void setupThickTracker();
62  void setupFieldsolver();
63 
64  void initDataSink(const int& numBunch = 1);
65 
66  double setDistributionParallelT(Beam *beam);
67 
68  // Pointer to tracking algorithm.
70 
72 
73  std::vector<Distribution *> distrs_m;
74 
76 
78 
80 
82 
83  static const std::string defaultDistribution;
84 };
85 
86 #endif // OPAL_TrackRun_HH
const std::string name
The base class for all OPAL actions.
Definition: Action.h:30
The global OPAL structure.
Definition: OpalData.h:49
Definition: Beam.h:32
The FieldSolver definition.
Definition: FieldSolver.h:43
H5PartWrapper * phaseSpaceSink_m
Definition: TrackRun.h:79
virtual void execute()
Execute the command.
Definition: TrackRun.cpp:142
void setupTTracker()
Definition: TrackRun.cpp:307
Distribution * dist
Definition: TrackRun.h:71
virtual ~TrackRun()
Definition: TrackRun.cpp:131
void operator=(const TrackRun &)
void initDataSink(const int &numBunch=1)
Definition: TrackRun.cpp:619
TrackRun(const TrackRun &)
TrackRun()
Exemplar constructor.
Definition: TrackRun.cpp:74
std::vector< Distribution * > distrs_m
Definition: TrackRun.h:73
virtual TrackRun * clone(const std::string &name)
Make clone.
Definition: TrackRun.cpp:137
static const std::string defaultDistribution
Definition: TrackRun.h:83
Tracker * itsTracker
Definition: TrackRun.h:69
double setDistributionParallelT(Beam *beam)
Definition: TrackRun.cpp:635
void setupFieldsolver()
Definition: TrackRun.cpp:586
void setupCyclotronTracker()
Definition: TrackRun.cpp:426
DataSink * ds
Definition: TrackRun.h:77
OpalData * opal
Definition: TrackRun.h:81
FieldSolver * fs
Definition: TrackRun.h:75
void setupThickTracker()
Definition: TrackRun.cpp:204