EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
muen::MuenDataParser Class Reference

class for parsing muen data from a file. More...

#include <muen.h>

Public Member Functions

 MuenDataParser ()
 construct class by parsing the data file. Note the actual EGS_Interpolator classes are only created when user calls getMuenInterpolator. User is responsible for deleting the interpolator when they are done with it.
 
int setMuenFile (string filename)
 
EGS_Interpolator * getMuenInterpolator (string med_name)
 Create a new EGS_Interpolator of muen data for the requested medium and return pointer to it. Ownership of the object belongs to the caller.
 

Static Public Attributes

static const string MUEN_START = "Muen values for medium MEDIUM ="
 

Private Member Functions

MuenMapT splitFileByMed (ifstream &in)
 does the actual parsing of data from the muen file
 

Private Attributes

MuenMapT med_data
 

Static Private Attributes

static const int NSKIP = 3
 

Detailed Description

class for parsing muen data from a file.

The muen data must be in the format generated by the egsnrc usercode g:

   Muen values for medium MEDIUM = MED_NAME_1
   Medium used is MED_NAME_1 found in your_pegs_data_set
   Number of energy intervals is 2000
   Energy       Muen
   0.001000 MeV 4075.692785 cm^2/g
   0.001004 MeV 4036.185761 cm^2/g
   0.001007 MeV 3997.307705 cm^2/g
   (# 1997 more lines)
   Muen values for medium MEDIUM = MED_NAME_2
   Medium used is MED_NAME_2 found in your_pegs_data_set
   Number of energy intervals is 500
   0.001000 MeV 4075.692785 cm^2/g
   0.001004 MeV 4036.185761 cm^2/g
   0.001007 MeV 3997.307705 cm^2/g
   (# 497 more lines)

Definition at line 131 of file muen.h.

Constructor & Destructor Documentation

◆ MuenDataParser()

muen::MuenDataParser::MuenDataParser ( )
inline

construct class by parsing the data file. Note the actual EGS_Interpolator classes are only created when user calls getMuenInterpolator. User is responsible for deleting the interpolator when they are done with it.

Note
Rather than just calling egsFatal on failure we should probably set a success flag and then let the users check the flag and decide what they want to do.

Definition at line 205 of file muen.h.

Member Function Documentation

◆ getMuenInterpolator()

EGS_Interpolator * muen::MuenDataParser::getMuenInterpolator ( string  med_name)
inline

Create a new EGS_Interpolator of muen data for the requested medium and return pointer to it. Ownership of the object belongs to the caller.

Note
currently calling repeatedly with the same med_name will create a new instance of EGS_Interpolator for every call. We could change this to return a cached copy if it had already been created in the past.

Definition at line 228 of file muen.h.

◆ setMuenFile()

int muen::MuenDataParser::setMuenFile ( string  filename)
inline

Definition at line 207 of file muen.h.

◆ splitFileByMed()

MuenMapT muen::MuenDataParser::splitFileByMed ( ifstream &  in)
inlineprivate

does the actual parsing of data from the muen file

Definition at line 141 of file muen.h.

Member Data Documentation

◆ med_data

MuenMapT muen::MuenDataParser::med_data
private

holds all muen data from file.

Definition at line 133 of file muen.h.

◆ MUEN_START

const string muen::MuenDataParser::MUEN_START = "Muen values for medium MEDIUM ="
static

string indicating start of a new medium

Definition at line 193 of file muen.h.

◆ NSKIP

const int muen::MuenDataParser::NSKIP = 3
staticprivate

number of lines in muen data for a medium to skip between first line for a medium and the start of the data

Definition at line 135 of file muen.h.


The documentation for this class was generated from the following file: