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) BDSIM Collaboration, 2001 - 2026.
3
4
This file is part of BDSIM.
5
6
BDSIM is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published
8
by the Free Software Foundation version 3 of the License.
9
10
BDSIM is distributed in the hope that it will be useful, but
11
WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
#include "aperture.h"
19
20
using namespace
GMAD
;
21
22
Aperture::Aperture
()
23
{
24
clear
();
25
PublishMembers
();
26
}
27
28
void
Aperture::clear
()
29
{
30
name =
""
;
31
apertureType =
""
;
32
aper1 = 0;
33
aper2 = 0;
34
aper3 = 0;
35
aper4 = 0;
36
}
37
38
void
Aperture::PublishMembers
()
39
{
40
publish
(
"name"
, &Aperture::name);
41
publish
(
"apertureType"
, &Aperture::apertureType);
42
publish
(
"aper1"
, &Aperture::aper1);
43
publish
(
"aperture1"
, &Aperture::aper1);
// alternative
44
publish
(
"aper"
, &Aperture::aper1);
// alternative - backwards compatibility
45
publish
(
"beampipeRadius"
,&Aperture::aper1);
// alternative - backwards compatibility
46
publish
(
"aper2"
, &Aperture::aper2);
47
publish
(
"aperture2"
, &Aperture::aper2);
// alternative
48
publish
(
"aper3"
, &Aperture::aper3);
49
publish
(
"aperture3"
, &Aperture::aper3);
// alternative
50
publish
(
"aper4"
, &Aperture::aper4);
51
publish
(
"aperture4"
, &Aperture::aper4);
// alternative
52
}
53
54
void
Aperture::print
()
const
55
{
56
std::cout <<
"Aperture: "
57
<<
"name "
<< name << std::endl
58
<<
"apertureType "
<< apertureType << std::endl
59
<<
"aper1 "
<< aper1 << std::endl
60
<<
"aper2 "
<< aper2 << std::endl
61
<<
"aper3 "
<< aper3 << std::endl
62
<<
"aper4 "
<< aper4 << std::endl;
63
}
GMAD::Aperture::Aperture
Aperture()
Constructor.
Definition
aperture.cc:22
GMAD::Aperture::PublishMembers
void PublishMembers()
publish members
Definition
aperture.cc:38
GMAD::Aperture::print
void print() const
Print some properties.
Definition
aperture.cc:54
GMAD::Aperture::clear
void clear()
Reset.
Definition
aperture.cc:28
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:93
GMAD
Parser namespace for GMAD language. Combination of Geant4 and MAD.
Definition
BDSBeamlineIntegral.hh:26
Generated on Thu Nov 12 2026 21:36:59 for BDSIM by
1.9.8