EndfParserFactory
- class endf_parserpy.EndfParserFactory[source]
Bases:
objectFactory class to create ENDF parsers.
This class provides the
create()method for creating an ENDF parser object.- static create(select='fastest', warn_slow=True, require_compat=False, ignore_number_mismatch=False, ignore_zero_mismatch=True, ignore_varspec_mismatch=True, fuzzy_matching=False, abuse_signpos=False, skip_intzero=False, prefer_noexp=False, accept_spaces=True, ignore_blank_lines=True, ignore_send_records=False, ignore_missing_tpid=False, keep_E=False, preserve_value_strings=False, include_linenum=True, width=11, check_arrays=False, strict_datatypes=False, array_type='dict', explain_missing_variable=None, cache_dir=None, print_cache_info=None, endf_format='endf6-ext', recipes=None, parsing_funs=None, loglevel=None, validate_control_records=False)[source]
Create an ENDF parser instance.
This function creates an ENDF parser object, which is either an instance of the
EndfParserPy(Python parser) orEndfParserCpp(C++ parser) class depending on the supplied arguments. The three parameters described below control the behavior of the parser factory. All other parameters are arguments to the constructor of theEndfParserPyorEndfParserCppclass and most of them are available for both classes.- Parameters:
select (string) – Can be
fastest,cpp, orpython. Iffastest, selects the C++ parser if possible and falls back on the Python parser otherwise. Ifcpporpython, selects C++ or Python parser, respectively, and fails if requested parser type cannot be selected.warn_slow (bool) – If
True, issues aUserWarningif user requested fastest parser but C++ parser is not available or incompatible with parser arguments.require_compat (bool) – If
True, only instantiate parser class if parser arguments are compatible with both Python and C++ parser and raise aValueErrorexception otherwise.