mcstasscript.instr_reader.read_definition.DefinitionReader

mcstasscript.instr_reader.read_definition.DefinitionReader

class mcstasscript.instr_reader.read_definition.DefinitionReader(Instr, write_file, product_filename, get_next_line, return_line)

Responsible for reading the defintion section of McStas instrument file. Contains instrument name and instrument parameters.

__init__(Instr, write_file, product_filename, get_next_line, return_line)

Methods

__init__(Instr, write_file, ...)

read_definition_line(line)

Reads line of instrument definition, returns bolean.

set_instr_name(name)

read_definition_line(line)

Reads line of instrument definition, returns bolean. If it encounters the end of the definition section, it returns False, otherwise True.

The contents of the definition section is written to the McStasScript Instr object.