EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
Classes | Functions
egs_base_source.h File Reference

EGS_BaseSource class header file. More...

#include "egs_vector.h"
#include "egs_object_factory.h"
#include "egs_functions.h"
#include <string>
#include <iostream>
#include "egs_math.h"

Go to the source code of this file.

Classes

class  EGS_BaseSource
 Base source class. All particle sources must be derived from this class. More...
 
class  EGS_BaseSpectrum
 Base class for energy spectra. All energy spectra in the EGSnrc C++ class library are derived from this class. More...
 
class  EGS_BaseSimpleSource
 Base class for 'simple' particle sources. More...
 

Functions

template<class T >
EGS_BaseSourcecreateSourceTemplate (EGS_Input *input, EGS_ObjectFactory *f, const char *name)
 A template source creation function. More...
 

Detailed Description

EGS_BaseSource class header file.

Author
Iwan Kawrakow, NRC

Also declares the base spectrum class and the simple source class, and provides a source creation template function.

Definition in file egs_base_source.h.

Function Documentation

template<class T >
EGS_BaseSource* createSourceTemplate ( EGS_Input input,
EGS_ObjectFactory f,
const char *  name 
)

A template source creation function.

This template function is used by the createSource functions of the various source dynamic shared objects provided with the EGSnrc C++ class library to create sources from a given input. The variable name should point to a null-terminated string that will be used to output warnings in the form "createSource(name):..." if the creation of a source fails.

Definition at line 816 of file egs_base_source.h.

References EGS_BaseSource::addKnownTypeId(), and egsWarning.