EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
egs_envelope_geometry.cpp
Go to the documentation of this file.
1 /*
2 ###############################################################################
3 #
4 # EGSnrc egs++ envelope geometry
5 # Copyright (C) 2015 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: Iwan Kawrakow, 2005
25 #
26 # Contributors: Frederic Tessier
27 # Ernesto Mainegra-Hing
28 # Marc Chamberland
29 # Hannah Gallop
30 #
31 ###############################################################################
32 */
33 
34 
40 #include "egs_envelope_geometry.h"
41 #include "egs_input.h"
42 #include "egs_functions.h"
43 
44 #include <cstdlib>
45 
46 using namespace std;
47 
48 string EGS_ENVELOPEG_LOCAL EGS_EnvelopeGeometry::type = "EGS_EnvelopeGeometry";
49 string EGS_ENVELOPEG_LOCAL EGS_FastEnvelope::type = "EGS_FastEnvelope";
50 
51 static bool EGS_ENVELOPEG_LOCAL inputSet = false;
52 
53 void EGS_EnvelopeGeometry::setMedia(EGS_Input *,int,const int *) {
54  egsWarning("EGS_EnvelopeGeometry::setMedia: don't use this method. Use the\n"
55  " setMedia() methods of the geometry objects that make up this geometry\n");
56 }
57 
58 void EGS_EnvelopeGeometry::setRelativeRho(int start, int end, EGS_Float rho) {
59  setRelativeRho(0);
60 }
61 
62 void EGS_EnvelopeGeometry::setRelativeRho(EGS_Input *) {
63  egsWarning("EGS_EnvelopeGeometry::setRelativeRho(): don't use this method."
64  " Use the\n setRelativeRho methods of the geometry objects that make up"
65  " this geometry\n");
66 }
67 
68 void EGS_EnvelopeGeometry::setBScaling(int start, int end, EGS_Float bf) {
69  setBScaling(0);
70 }
71 
72 void EGS_EnvelopeGeometry::setBScaling(EGS_Input *) {
73  egsWarning("EGS_EnvelopeGeometry::setBScaling(): don't use this method."
74  " Use the\n setBScaling methods of the geometry objects that make up"
75  " this geometry\n");
76 }
77 
78 void EGS_FastEnvelope::setMedia(EGS_Input *,int,const int *) {
79  egsWarning("EGS_FastEnvelope::setMedia: don't use this method. Use the\n"
80  " setMedia() methods of the geometry objects that make up this geometry\n");
81 }
82 
83 void EGS_FastEnvelope::setRelativeRho(int start, int end, EGS_Float rho) {
84  setRelativeRho(0);
85 }
86 
87 void EGS_FastEnvelope::setRelativeRho(EGS_Input *) {
88  egsWarning("EGS_FastEnvelope::setRelativeRho(): don't use this method."
89  " Use the\n setRelativeRho methods of the geometry objects that make up"
90  " this geometry\n");
91 }
92 
93 void EGS_FastEnvelope::setBScaling(int start, int end, EGS_Float bf) {
94  setBScaling(0);
95 }
96 
97 void EGS_FastEnvelope::setBScaling(EGS_Input *) {
98  egsWarning("EGS_FastEnvelope::setBScaling(): don't use this method."
99  " Use the\n setBScaling methods of the geometry objects that make up"
100  " this geometry\n");
101 }
102 
103 struct EGS_ENVELOPEG_LOCAL EnvelopeAux {
104  EGS_BaseGeometry *g;
105  int nreg;
106  int *regs;
107  EnvelopeAux() : nreg(0) {};
108  ~EnvelopeAux() {
109  if (nreg>0) {
110  delete [] regs;
111  }
112  };
113 };
114 
115 EGS_EnvelopeGeometry::EGS_EnvelopeGeometry(EGS_BaseGeometry *G,
116  const vector<EGS_BaseGeometry *> &geoms, const string &Name,
117  bool newindexing) :
118  EGS_BaseGeometry(Name), reg_to_inscr(0), local_start(0) {
119  if (!G) {
120  egsFatal("EGS_EnvelopeGeometry: base geometry must not be null\n");
121  }
122  g = G;
123  g->ref();
124  new_indexing = false;
125  nbase = g->regions();
126  n_in = geoms.size();
127  nmax = 1;
128  int nreg_inscribed = 0;
129  if (n_in > 0) {
130  geometries = new EGS_BaseGeometry * [n_in];
131  for (int j=0; j<n_in; j++) {
132  geometries[j] = geoms[j];
133  geometries[j]->ref();
134  int nj = geometries[j]->regions();
135  if (nj > nmax) {
136  nmax = nj;
137  }
138  nreg_inscribed += nj;
139  }
140  }
141  nreg = nbase + n_in*nmax;
142  is_convex = g->isConvex();
143 
144  has_rho_scaling = g->hasRhoScaling();
145  if (!has_rho_scaling) {
146  for (int j=0; j<n_in; j++) {
147  if (geometries[j]->hasRhoScaling()) {
148  has_rho_scaling = true;
149  break;
150  }
151  }
152  }
153  has_B_scaling = g->hasBScaling();
154  if (!has_B_scaling) {
155  for (int j=0; j<n_in; j++) {
156  if (geometries[j]->hasBScaling()) {
157  has_B_scaling = true;
158  break;
159  }
160  }
161  }
162 
163  if (!n_in) {
164  return;
165  }
166  if (newindexing) {
167  new_indexing = true;
168  local_start = new int [n_in];
169  reg_to_inscr = new int [nreg_inscribed];
170  int ir=0;
171  for (int j=0; j<n_in; j++) {
172  int n = geometries[j]->regions();
173  local_start[j] = nbase + ir;
174  for (int i=0; i<n; i++) {
175  reg_to_inscr[ir++] = j;
176  }
177  }
178  nreg = nbase + ir;
179  }
180 }
181 
182 EGS_FastEnvelope::EGS_FastEnvelope(EGS_BaseGeometry *G,
183  const vector<EnvelopeAux *> &fgeoms, const string &Name,
184  int newindexing) :
185  EGS_BaseGeometry(Name), reg_to_inscr(0), local_start(0) {
186  if (!G) {
187  egsFatal("EGS_FastEnvelope: base geometry must not be null\n");
188  }
189  g = G;
190  g->ref();
191  n_in = fgeoms.size();
192  nmax = 1;
193  new_indexing = false;
194  if (!n_in) {
195  egsFatal("EGS_FastEnvelope: no inscribed geometries!\n");
196  }
197  geometries = new EGS_BaseGeometry * [n_in];
198  nbase = g->regions();
199  int *iaux = new int [nbase];
200  int j;
201  for (j=0; j<nbase; j++) {
202  iaux[j] = 0;
203  }
204  int nlist = 0;
205  int nreg_inscribed = 0;
206  for (j=0; j<fgeoms.size(); j++) {
207  geometries[j] = fgeoms[j]->g;
208  geometries[j]->ref();
209  int nj = geometries[j]->regions();
210  nreg_inscribed += nj;
211  if (nj > nmax) {
212  nmax = nj;
213  }
214  for (int i=0; i<fgeoms[j]->nreg; i++) {
215  int k = fgeoms[j]->regs[i];
216  if (k >= 0 && k < nbase) {
217  ++iaux[k];
218  ++nlist;
219  }
220  }
221  }
222  n_start = new int [nbase+1];
223  glist = new int [nlist];
224  int ilist=0;
225  for (j=0; j<nbase; j++) {
226  n_start[j] = ilist;
227  if (iaux[j] > 0) {
228  for (int l=0; l<fgeoms.size(); l++) {
229  for (int i=0; i<fgeoms[l]->nreg; i++) {
230  int k = fgeoms[l]->regs[i];
231  if (k == j) {
232  glist[ilist++] = l;
233  }
234  }
235  }
236  }
237  }
238  n_start[nbase] = ilist;
239  nreg = nbase + n_in*nmax;
240  is_convex = g->isConvex();
241  has_rho_scaling = g->hasRhoScaling();
242  if (!has_rho_scaling) {
243  for (int j=0; j<n_in; j++) {
244  if (geometries[j]->hasRhoScaling()) {
245  has_rho_scaling = true;
246  break;
247  }
248  }
249  }
250 
251  has_B_scaling = g->hasBScaling();
252  if (!has_B_scaling) {
253  for (int j=0; j<n_in; j++) {
254  if (geometries[j]->hasBScaling()) {
255  has_B_scaling = true;
256  break;
257  }
258  }
259  }
260 
261  delete [] iaux;
262  if (newindexing) {
263  new_indexing = true;
264  local_start = new int [n_in];
265  reg_to_inscr = new int [nreg_inscribed];
266  int ir=0;
267  for (int j=0; j<n_in; j++) {
268  int n = geometries[j]->regions();
269  local_start[j] = nbase + ir;
270  for (int i=0; i<n; i++) {
271  reg_to_inscr[ir++] = j;
272  }
273  }
274  nreg = nbase + ir;
275  }
276 }
277 
278 EGS_EnvelopeGeometry::~EGS_EnvelopeGeometry() {
279  if (!g->deref()) {
280  delete g;
281  }
282  for (int j=0; j<n_in; j++) {
283  if (!geometries[j]->deref()) {
284  delete geometries[j];
285  }
286  }
287  delete [] geometries;
288  if (new_indexing) {
289  if (local_start) {
290  delete [] local_start;
291  }
292  if (reg_to_inscr) {
293  delete [] reg_to_inscr;
294  }
295  }
296 }
297 
298 EGS_FastEnvelope::~EGS_FastEnvelope() {
299  if (!g->deref()) {
300  delete g;
301  }
302  for (int j=0; j<n_in; j++) {
303  if (!geometries[j]->deref()) {
304  delete geometries[j];
305  }
306  }
307  delete [] geometries;
308  delete [] n_start;
309  delete [] glist;
310  if (new_indexing) {
311  if (local_start) {
312  delete [] local_start;
313  }
314  if (reg_to_inscr) {
315  delete [] reg_to_inscr;
316  }
317  }
318 }
319 
320 void EGS_EnvelopeGeometry::printInfo() const {
322  egsInformation(" base geometry = %s (type %s)\n",g->getName().c_str(),
323  g->getType().c_str());
324  egsInformation(" inscribed geometries:\n");
325  for (int j=0; j<n_in; j++) egsInformation(" %s (type %s)\n",
326  geometries[j]->getName().c_str(),geometries[j]->getType().c_str());
328  "=======================================================\n");
329 }
330 
331 void EGS_FastEnvelope::printInfo() const {
333  egsInformation(" base geometry = %s (type %s)\n",g->getName().c_str(),
334  g->getType().c_str());
335  egsInformation(" inscribed geometries:\n");
336  for (int j=0; j<n_in; j++) egsInformation(" %s (type %s)\n",
337  geometries[j]->getName().c_str(),geometries[j]->getType().c_str());
339  "=======================================================\n");
340 }
341 
342 
343 static char EGS_ENVELOPEG_LOCAL eeg_message1[] =
344  "createGeometry(envelope geometry): %s\n";
345 static char EGS_ENVELOPEG_LOCAL eeg_message2[] =
346  "null input?";
347 static char EGS_ENVELOPEG_LOCAL eeg_message3[] =
348  "no 'base geometry' input?";
349 static char EGS_ENVELOPEG_LOCAL eeg_message4[] =
350  "incorrect base geometry definition";
351 static char EGS_ENVELOPEG_LOCAL eeg_message5[] =
352  "missing/incorrect 'base geometry' input";
353 static char EGS_ENVELOPEG_LOCAL eeg_message6[] =
354  "createGeometry(envelope geometry): no geometry with name %s defined\n";
355 static char EGS_ENVELOPEG_LOCAL eeg_message7[] =
356  "no inscirebed geometries defined?. I hope you know what you are doing";
357 static char EGS_ENVELOPEG_LOCAL eeg_message8[] =
358  "an error occured while constructing inscibed geometries";
359 
360 static char EGS_ENVELOPEG_LOCAL eeg_keyword1[] = "base geometry";
361 static char EGS_ENVELOPEG_LOCAL eeg_keyword2[] = "geometry";
362 static char EGS_ENVELOPEG_LOCAL eeg_keyword3[] = "inscribed geometries";
363 
364 extern "C" {
365  static void setInputs() {
366  inputSet = true;
367 
368  setBaseGeometryInputs(false);
369 
370  geomBlockInput->getSingleInput("library")->setValues({"egs_genvelope"});
371 
372  // Format: name, isRequired, description, vector string of allowed values
373  auto typePtr = geomBlockInput->addSingleInput("type", false, "The type of envelope", {"EGS_FastEnvelope"});
374  geomBlockInput->addSingleInput("base geometry", true, "The name of a previously defined geometry");
375  geomBlockInput->addSingleInput("inscribed geometries", true, "A list of names of previously defined geometries, must be stictly inside the envelope");
376  }
377 
378  EGS_ENVELOPEG_EXPORT string getExample() {
379  string example;
380  example = {
381  R"(
382  # Example of egs_genvelope
383  #:start geometry:
384  name = my_envelope
385  library = egs_genvelope
386  base geometry = my_box
387  inscribed geometries = geom1 geom2
388  # geometries geom1 and geom2 must be defined before this one
389  #:stop geometry:
390 )"};
391  return example;
392  }
393 
394  EGS_ENVELOPEG_EXPORT shared_ptr<EGS_BlockInput> getInputs() {
395  if(!inputSet) {
396  setInputs();
397  }
398  return geomBlockInput;
399  }
400 
401  EGS_ENVELOPEG_EXPORT EGS_BaseGeometry *createGeometry(EGS_Input *input) {
402  if (!input) {
403  egsWarning(eeg_message1,eeg_message2);
404  return 0;
405  }
406  //
407  // *** new indexing style
408  //
409  int indexing = 0;
410  input->getInput("new indexing style",indexing);
411  //
412  // *** Base geometry
413  //
414  EGS_Input *i = input->takeInputItem(eeg_keyword1);
415  if (!i) {
416  egsWarning(eeg_message1,eeg_message3);
417  return 0;
418  }
419  EGS_Input *ig = i->takeInputItem(eeg_keyword2);
420  EGS_BaseGeometry *g;
421  if (ig) { // defined inline
423  delete ig;
424  if (!g) {
425  egsWarning(eeg_message1,eeg_message4);
426  delete i;
427  return 0;
428  }
429  }
430  else { // defined via a name of a previously defined geometry
431  string bgname;
432  int err = i->getInput(eeg_keyword1,bgname);
433  delete i;
434  if (err) {
435  egsWarning(eeg_message1,eeg_message5);
436  return 0;
437  }
438  g = EGS_BaseGeometry::getGeometry(bgname);
439  if (!g) {
440  egsWarning(eeg_message6,bgname.c_str());
441  return 0;
442  }
443  }
444  vector<EnvelopeAux *> fgeoms;
445  EGS_Input *ix;
446  while ((ix = input->takeInputItem("inscribe in regions")) != 0) {
447  vector<string> values;
448  ix->getInput("inscribe in regions",values);
449  if (values.size() < 2) egsWarning("createGeometry(envelope geometry):"
450  " %d inputs for 'inscribe in regions'? 2 or more are needed\n",values.size());
451  else {
453  if (!gj) {
454  egsWarning(eeg_message6,values[0].c_str());
455  }
456  else {
457  EnvelopeAux *aux = new EnvelopeAux;
458  aux->g = gj;
459  aux->nreg = values.size()-1;
460  aux->regs = new int [aux->nreg];
461  for (int j=0; j<aux->nreg; j++) {
462  aux->regs[j] = atoi(values[j+1].c_str());
463  }
464  fgeoms.push_back(aux);
465  }
466  }
467  delete ix;
468  }
469  if (fgeoms.size() > 0) {
470  EGS_BaseGeometry *result = new EGS_FastEnvelope(g,fgeoms,"",indexing);
471  result->setName(input);
472  result->setBoundaryTolerance(input);
473  for (int j=0; j<fgeoms.size(); j++) {
474  delete fgeoms[j];
475  }
476  return result;
477  }
478 
479  //
480  // *** Inscribed geometries
481  //
482  i = input->takeInputItem(eeg_keyword3);
483  vector<EGS_BaseGeometry *> geoms;
484  if (!i) {
485  if (fgeoms.size()) {
486  egsWarning(eeg_message1,eeg_message7);
487  }
488  }
489  else {
490  // first try for inscribed geometries defined inline
491  while ((ig = i->takeInputItem(eeg_keyword2)) != 0) {
493  delete ig;
494  if (!gj) {
495  egsWarning(eeg_message1,eeg_message8);
496  }
497  else {
498  geoms.push_back(gj);
499  }
500  }
501  // if geoms.size() is 0, check if inscribed geometries are defined
502  // via names of previously defined geometries.
503  if (!geoms.size()) {
504  vector<string> igeoms;
505  int err = i->getInput(eeg_keyword3,igeoms);
506  if (err || !igeoms.size()) {
507  egsWarning(eeg_message1,eeg_message7);
508  }
509  else {
510  for (unsigned int j=0; j<igeoms.size(); j++) {
511  EGS_BaseGeometry *gj =
513  if (!gj) {
514  egsWarning(eeg_message6,igeoms[j].c_str());
515  }
516  else {
517  geoms.push_back(gj);
518  }
519  }
520  }
521  }
522  delete i;
523  }
524  /*
525  EGS_BaseGeometry *result = fgeoms.size() ?
526  new EGS_EnvelopeGeometry(g,fgeoms,geoms) :
527  new EGS_EnvelopeGeometry(g,geoms);
528  */
529  EGS_BaseGeometry *result = new EGS_EnvelopeGeometry(g,geoms,"",indexing);
530  result->setName(input);
531  result->setLabels(input);
532  return result;
533 
534  }
535 
536  int EGS_EnvelopeGeometry::getGlobalRegionOffset(const string geomName) {
537  // Look for the named geometry in the inscribed geometries
538  for (int i=0; i<n_in; i++) {
539  if (geometries[i] && geometries[i]->getName() == geomName) {
540  int shift = 0;
541  if (new_indexing) {
542  shift = local_start[i];
543  }
544  else {
545  shift = nbase+i*nmax;
546  }
547  return shift;
548  }
549  }
550 
551  // If it's not found above, search through the inscribed geometries in case they are composite geometries
552  for (int i=0; i<n_in; i++) {
553  int shift = geometries[i]->getGlobalRegionOffset(geomName);
554  if (shift >= 0) {
555  if (new_indexing) {
556  shift += local_start[i];
557  }
558  else {
559  shift += nbase+i*nmax;
560  }
561  return shift;
562  }
563  }
564 
565  // Return -1 for not found
566  return -1;
567  }
568 
569  int EGS_FastEnvelope::getGlobalRegionOffset(const string geomName) {
570  // Look for the named geometry in the inscribed geometries
571  for (int i=0; i<n_in; i++) {
572  if (geometries[i] && geometries[i]->getName() == geomName) {
573  int shift = 0;
574  if (new_indexing) {
575  shift = local_start[i];
576  }
577  else {
578  shift = nbase+i*nmax;
579  }
580 
581  return shift;
582  }
583  }
584 
585  // If it's not found above, search through the inscribed geometries in case they are composite geometries
586  for (int i=0; i<n_in; i++) {
587  int shift = geometries[i]->getGlobalRegionOffset(geomName);
588  if (shift >= 0) {
589  if (new_indexing) {
590  shift += local_start[i];
591  }
592  else {
593  shift += nbase+i*nmax;
594  }
595  return shift;
596  }
597  }
598 
599  // Return -1 for not found
600  return -1;
601  }
602 
603  void EGS_EnvelopeGeometry::getLabelRegions(const string &str, vector<int> &regs, bool sanitize) {
604 
605  // label defined in the envelope geometry
606  g->getLabelRegions(str, regs, sanitize);
607 
608  // label defined in the inscribed geometries
609  vector<int> gregs;
610  int shift=0;
611  for (int i=0; i<n_in; i++) {
612 
613  // add regions from set geometries
614  gregs.clear();
615  if (geometries[i]) {
616  geometries[i]->getLabelRegions(str, gregs, sanitize);
617  }
618 
619  // shift region numbers according to indexing style
620  if (new_indexing) {
621  shift = local_start[i];
622  }
623  else {
624  shift = nbase+i*nmax;
625  }
626  for (int j=0; j<gregs.size(); j++) {
627  gregs[j] += shift;
628  }
629 
630  // add regions to the list
631  regs.insert(regs.end(), gregs.begin(), gregs.end());
632 
633  }
634 
635  // label defined in self (envelope geometry input block)
636  EGS_BaseGeometry::getLabelRegions(str, regs, sanitize);
637 
638  }
639 
640  void EGS_FastEnvelope::getLabelRegions(const string &str, vector<int> &regs, bool sanitize) {
641 
642  // label defined in the envelope geometry
643  g->getLabelRegions(str, regs, sanitize);
644 
645  // label defined in the inscribed geometries
646  vector<int> gregs;
647  int shift=0;
648  for (int i=0; i<n_in; i++) {
649 
650  // add regions from set geometries
651  gregs.clear();
652  if (geometries[i]) {
653  geometries[i]->getLabelRegions(str, gregs, sanitize);
654  }
655 
656  // shift region numbers according to indexing style
657  if (new_indexing) {
658  shift = local_start[i];
659  }
660  else {
661  shift = nbase+i*nmax;
662  }
663  for (int j=0; j<gregs.size(); j++) {
664  gregs[j] += shift;
665  }
666 
667  // add regions to the list
668  regs.insert(regs.end(), gregs.begin(), gregs.end());
669 
670  }
671 
672  // label defined in self (envelope geometry input block)
673  EGS_BaseGeometry::getLabelRegions(str, regs, sanitize);
674 
675  }
676 
677 }
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual int getGlobalRegionOffset(const string geomName)
Get the global region number for the first region in the geometry.
int deref()
Decrease the reference count to this geometry.
static EGS_BaseGeometry * createSingleGeometry(EGS_Input *inp)
Create a single geometry from the input inp.
virtual const string & getType() const =0
Get the geometry type.
bool hasBScaling() const
Does this geometry object have a B field scaling feature?
virtual bool hasRhoScaling()
Does this geometry object have a mass density scaling feature?
void setName(EGS_Input *inp)
Set the name of the geometry from the input inp.
const string & getName() const
Get the name of this geometry.
bool isConvex() const
Is the geometry convex?
int regions() const
Returns the number of local regions in this geometry.
int setLabels(EGS_Input *input)
Set the labels from an input block.
virtual void printInfo() const
Print information about this geometry.
int ref()
Increase the reference count to this geometry.
static EGS_BaseGeometry * getGeometry(const string &Name)
Get a pointer to the geometry named Name.
void setBoundaryTolerance(EGS_Input *inp)
Set the value of the boundary tolerance from the input inp.
virtual void getLabelRegions(const string &str, vector< int > &regs, bool sanitize=true)
Get the list of all regions labeled with str.
An envelope geometry class.
EGS_BaseGeometry * g
The envelope geometry.
int n_in
Number of inscribed geometries.
static string type
Geometry type.
int * local_start
First region for each inscribed geometry.
void setMedia(EGS_Input *, int, const int *)
Don't set media for an envelope geometry.
int nbase
Number of regions in the base geometry.
bool new_indexing
If true, use new indexing style.
EGS_BaseGeometry ** geometries
The inscribed geometries.
int * reg_to_inscr
Region to inscribed geometry conversion.
An envelope geometry class.
int nbase
Number of regions in the base geometry.
EGS_BaseGeometry ** geometries
The inscribed geometries.
int * local_start
First region for each inscribed geometry.
int n_in
Number of inscribed geometries.
int * reg_to_inscr
Region to inscribed geometry conversion.
EGS_BaseGeometry * g
The envelope geometry.
static string type
Geometry type.
void setMedia(EGS_Input *, int, const int *)
Don't set media for an envelope geometry.
bool new_indexing
If true, use new indexing style.
A class for storing information in a tree-like structure of key-value pairs. This class is used throu...
Definition: egs_input.h:182
EGS_Input * takeInputItem(const string &key, bool self=true)
Get the property named key.
Definition: egs_input.cpp:229
int getInput(const string &key, vector< string > &values) const
Assign values to an array of strings from an input identified by key.
Definition: egs_input.cpp:341
An envelope geometry: header.
Global egspp functions header file.
EGS_GLIB_EXPORT EGS_BaseGeometry * createGeometry(EGS_Input *input)
Definition: egs_glib.cpp:84
EGS_Input class header file.
EGS_InfoFunction EGS_EXPORT egsInformation
Always use this function for reporting the progress of a simulation and any other type of information...
EGS_InfoFunction EGS_EXPORT egsFatal
Always use this function for reporting fatal errors.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.