BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
aperture.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include "aperture.h"
20
21using namespace GMAD;
22
24{
25 clear();
27}
28
30{
31 name = "";
32 apertureType = "";
33 aper1 = 0;
34 aper2 = 0;
35 aper3 = 0;
36 aper4 = 0;
37}
38
40{
41 publish("name", &Aperture::name);
42 publish("apertureType", &Aperture::apertureType);
43 publish("aper1", &Aperture::aper1);
44 publish("aperture1", &Aperture::aper1); // alternative
45 publish("aper", &Aperture::aper1); // alternative - backwards compatibility
46 publish("beampipeRadius",&Aperture::aper1); // alternative - backwards compatibility
47 publish("aper2", &Aperture::aper2);
48 publish("aperture2", &Aperture::aper2); // alternative
49 publish("aper3", &Aperture::aper3);
50 publish("aperture3", &Aperture::aper3); // alternative
51 publish("aper4", &Aperture::aper4);
52 publish("aperture4", &Aperture::aper4); // alternative
53}
54
55void Aperture::print()const
56{
57 std::cout << "Aperture: "
58 << "name " << name << std::endl
59 << "apertureType " << apertureType << std::endl
60 << "aper1 " << aper1 << std::endl
61 << "aper2 " << aper2 << std::endl
62 << "aper3 " << aper3 << std::endl
63 << "aper4 " << aper4 << std::endl;
64}
Aperture()
Constructor.
Definition: aperture.cc:23
void PublishMembers()
publish members
Definition: aperture.cc:39
void print() const
Print some properties.
Definition: aperture.cc:55
void clear()
Reset.
Definition: aperture.cc:29
void publish(const std::string &name, T C::*mp)
Make pointer to member from class C and type T with accessible with a name.
Definition: published.h:92
Parser namespace for GMAD language. Combination of Geant4 and MAD.