parse_mod Module

Module contains parses the input toml config files. See config for details of toml input file.



Subroutines

private subroutine parse_geometry(table, dict, error)

parse geometry information

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table

Input Toml table

type(toml_table), intent(inout) :: dict

Dictonary used to store metadata

type(toml_error), intent(out), allocatable :: error

Error message

private subroutine parse_grid(table, dict, error)

parse grid input data

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table

Input Toml table

type(toml_table), intent(inout) :: dict

Dictonary used to store metadata

type(toml_error), intent(out), allocatable :: error

Error message

private subroutine parse_output(table, error)

parse output file information

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table

Input Toml table

type(toml_error), intent(out), allocatable :: error

Error message

public subroutine parse_params(filename, packet, dects, spectrum, dict, error)

entry point for parsing toml file

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

filename of input toml file

type(photon), intent(out) :: packet

some input options set up data in the photon class

type(dect_array), intent(out), allocatable :: dects(:)

detector array which is setup during parsing

type(spectrum_t), intent(out) :: spectrum

spectrum type which is set up during parsing

type(toml_table), intent(inout) :: dict

dictionary that stores potential metadata to be saved with simulation output

type(toml_error), intent(out), allocatable :: error

Last error raised during parsing. Unallocated if no error raised. Need to handle this on return from parse_params.

private subroutine parse_simulation(table, error)

parse simulation information

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table

Input Toml table

type(toml_error), intent(out), allocatable :: error

Error message