BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
__w
bdsim
bdsim
parser
aperture.cc
1
/*
2
Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3
University of London 2001 - 2024.
4
5
This file is part of BDSIM.
6
7
BDSIM is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published
9
by the Free Software Foundation version 3 of the License.
10
11
BDSIM is distributed in the hope that it will be useful, but
12
WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#include "aperture.h"
20
21
using namespace
GMAD
;
22
23
Aperture::Aperture
()
24
{
25
clear
();
26
PublishMembers
();
27
}
28
29
void
Aperture::clear
()
30
{
31
name =
""
;
32
apertureType =
""
;
33
aper1 = 0;
34
aper2 = 0;
35
aper3 = 0;
36
aper4 = 0;
37
}
38
39
void
Aperture::PublishMembers
()
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
55
void
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
}
GMAD::Aperture::Aperture
Aperture()
Constructor.
Definition
aperture.cc:23
GMAD::Aperture::PublishMembers
void PublishMembers()
publish members
Definition
aperture.cc:39
GMAD::Aperture::print
void print() const
Print some properties.
Definition
aperture.cc:55
GMAD::Aperture::clear
void clear()
Reset.
Definition
aperture.cc:29
GMAD::Published< Aperture >::publish
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:94
GMAD
Parser namespace for GMAD language. Combination of Geant4 and MAD.
Definition
BDSBeamlineIntegral.hh:27
Generated on Sat Oct 18 2025 18:31:04 for BDSIM by
1.9.8