5. Belle II Python Interface#
The Belle II Software has an extensive interface to the Python 3 scripting
language: All configuration and steering is done via python and in principle
also simple algorithms can be implemented directly in python. All main
functions are implemented in a module called basf2 and most people will just
start their steering file or script with
import basf2
main = basf2.Path()
- 5.1. Modules and Paths
- 5.2. Logging
- 5.3. Module Statistics
- 5.4. Conditions Database
- 5.5. Additional Functions
- 5.6. Pythonizations
- 5.7. Other Modules
- 5.7.1. basf2.utils - Helper functions for printing basf2 objects
get_terminal_width()is_mod_function()list_functions()pretty_print_description_list()pretty_print_module()pretty_print_table()print_all_modules()print_params()print_path()- 5.7.2. basf2.pickle_path - Functions necessary to pickle and unpickle a Path
check_pickle_path()deserialize_conditions()deserialize_module()deserialize_path()deserialize_value()get_path_from_file()make_code_pickable()serialize_conditions()serialize_module()serialize_path()serialize_value()write_path_to_file()- 5.7.3. B2Tools
- 5.7.4. b2test_utils - Helper functions useful for test scripts
check_error_free()clean_working_directory()configure_logging_for_tests()get_object_with_name()get_streamer_checksums()is_cdb_down()is_ci()local_software_directory()print_belle2_environment()require_file()run_in_subprocess()safe_process()set_loglevel()show_only_errors()skip_test()skip_test_if_central()skip_test_if_light()temporary_environment()working_directory()- 5.7.5. conditions_db
BearerAuthConditionsDBPayloadInformationchunks()enable_debugging()encode_name()file_checksum()get_cdb_authentication_token()require_database_for_test()set_cdb_authentication_token()- 5.7.6. conditions_db.iov
IntervalOfValidityIoVSet- 5.7.7. hep_ipython_tools
IPythonHandlerhandler- 5.7.8. iov_conditional - Functions to Execute Paths Depending on Experiment Phases
PHASE2_IOVSmake_conditional_at()phase_2_conditional()- 5.7.9. pdg - access particle definitions
add_particle()conjugate()from_name()from_names()get()load()load_default()search()to_name()to_names()- 5.7.10. rundb - Helper classes for retrieving information from the RunDB
RunDB- 5.7.11. terminal_utils - Helper functions for input from/output to a terminal
ANSIColorsInputEditorPager