EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
egs_radiative_splitting.h
Go to the documentation of this file.
1 /*
2 ###############################################################################
3 #
4 # EGSnrc egs++ radiative splitting object headers
5 # Copyright (C) 2018 National Research Council Canada
6 #
7 # This file is part of EGSnrc.
8 #
9 # EGSnrc is free software: you can redistribute it and/or modify it under
10 # the terms of the GNU Affero General Public License as published by the
11 # Free Software Foundation, either version 3 of the License, or (at your
12 # option) any later version.
13 #
14 # EGSnrc is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
17 # more details.
18 #
19 # You should have received a copy of the GNU Affero General Public License
20 # along with EGSnrc. If not, see <http://www.gnu.org/licenses/>.
21 #
22 ###############################################################################
23 #
24 # Author: Ernesto Mainegra-Hing, 2018
25 #
26 # Contributors:
27 #
28 ###############################################################################
29 #
30 # A general radiative splitting tool.
31 #
32 # TODO:
33 #
34 # - Add directional radiative splitting (DRS)
35 #
36 ###############################################################################
37 */
38 
39 
45 #ifndef EGS_RADIATIVE_SPLITTING_
46 #define EGS_RADIATIVE_SPLITTING_
47 
48 #include "egs_ausgab_object.h"
49 #include "egs_application.h"
50 #include "egs_scoring.h"
51 #include "egs_base_geometry.h"
52 
53 #ifdef WIN32
54 
55  #ifdef BUILD_RADIATIVE_SPLITTING_DLL
56  #define EGS_RADIATIVE_SPLITTING_EXPORT __declspec(dllexport)
57  #else
58  #define EGS_RADIATIVE_SPLITTING_EXPORT __declspec(dllimport)
59  #endif
60  #define EGS_RADIATIVE_SPLITTING_LOCAL
61 
62 #else
63 
64  #ifdef HAVE_VISIBILITY
65  #define EGS_RADIATIVE_SPLITTING_EXPORT __attribute__ ((visibility ("default")))
66  #define EGS_RADIATIVE_SPLITTING_LOCAL __attribute__ ((visibility ("hidden")))
67  #else
68  #define EGS_RADIATIVE_SPLITTING_EXPORT
69  #define EGS_RADIATIVE_SPLITTING_LOCAL
70  #endif
71 
72 #endif
73 
93 class EGS_RADIATIVE_SPLITTING_EXPORT EGS_RadiativeSplitting : public EGS_AusgabObject {
94 
95 public:
96 
98  enum Type {
99  URS, // EGSnrc Uniform Radiative Splitting
100  DRS, // Directional Radiative Splitting
101  DRSf // Directional Radiative Splitting (BEAMnrc)
102  };
103 
104  EGS_RadiativeSplitting(const string &Name="", EGS_ObjectFactory *f = 0);
105 
107 
108  void setApplication(EGS_Application *App);
109 
110  void setSplitting(const int &n_s) {
111  nsplit = n_s;
112  };
113 
115  return 0;
116  };
117  int processEvent(EGS_Application::AusgabCall iarg, int ir) {
118  return 0;
119  };
120 
121 protected:
122  /* Maximum splitting limited to 2,147,483,647 */
123  int nsplit;
124 
125 };
126 
127 #endif
EGS_AusgabObject interface class header file.
virtual int processEvent(EGS_Application::AusgabCall iarg)=0
Process an ausgab call for event iarg.
AusgabCall
Possible calls to the user scoring function ausgab().
An object factory.
A radiative splitting object: header.
EGS_ScoringSingle and EGS_ScoringArray class header file.
EGS_BaseGeometry class header file.
virtual void setApplication(EGS_Application *App)
Set the application this object belongs to.
EGS_Application class header file.
Base class for advanced EGSnrc C++ applications.