Belle II Software
development
information.py
1
8
9
import
os
10
import
re
11
12
import
hep_ipython_tools.ipython_handler_basf2.viewer
13
from
hep_ipython_tools.information
import
EnvironmentInformation
14
15
16
class
Basf2EnvironmentInformation
(
EnvironmentInformation
):
17
18
"""
19
Helper class for accessing the information about ipython_handler_basf2
20
from the environment variables.
21
"""
22
23
def
__init__
(self):
24
"""
25
Get the variables from the environment variables.
26
"""
27
super().
__init__
()
28
29
30
self.
externals_version
= os.environ.get(
"BELLE2_EXTERNALS_VERSION"
)
31
32
self.
externals_option
= os.environ.get(
"BELLE2_EXTERNALS_OPTION"
)
33
34
self.
option
= os.environ.get(
"BELLE2_OPTION"
)
35
36
self.
architecture
= os.environ.get(
"BELLE2_ARCH"
)
37
38
self.
release
= os.environ.get(
"BELLE2_RELEASE"
)
39
40
self.
release_folder
= os.environ.get(
"BELLE2_LOCAL_DIR"
)
41
42
43
class
Basf2ModulesInformation
:
44
"""
45
A helper class to perform module lookup.
46
"""
47
48
def
__init__
(self):
49
"""
50
Initialize with the module list from the framework.
51
"""
52
from
basf2
import
list_available_modules
53
54
self.
module_list
= list_available_modules()
55
56
def
search
(self, regex_string):
57
"""
58
Search for a given module. You can give ane regular expression you like.
59
The results will be printed as a nice tabbed view with the modules and their parameters
60
and descriptions.
61
"""
62
def
filter_modules():
63
for
module_name
in
self.
module_list
:
64
if
re.search(regex_string, module_name):
65
yield
module_name
66
67
v =
hep_ipython_tools.ipython_handler_basf2.viewer.PathViewer
(filter_modules(), standalone=
True
)
68
v.show()
hep_ipython_tools.information.EnvironmentInformation
Definition
information.py:12
hep_ipython_tools.information.EnvironmentInformation.release_folder
str release_folder
Release folder.
Definition
information.py:33
hep_ipython_tools.information.EnvironmentInformation.architecture
str architecture
OS.
Definition
information.py:29
hep_ipython_tools.information.EnvironmentInformation.externals_version
str externals_version
Externals version.
Definition
information.py:23
hep_ipython_tools.information.EnvironmentInformation.release
str release
Release version.
Definition
information.py:31
hep_ipython_tools.information.EnvironmentInformation.externals_option
str externals_option
Compile options of externals.
Definition
information.py:25
hep_ipython_tools.information.EnvironmentInformation.option
str option
Compile options.
Definition
information.py:27
hep_ipython_tools.ipython_handler_basf2.information.Basf2EnvironmentInformation
Definition
information.py:16
hep_ipython_tools.ipython_handler_basf2.information.Basf2EnvironmentInformation.__init__
__init__(self)
Definition
information.py:23
hep_ipython_tools.ipython_handler_basf2.information.Basf2ModulesInformation
Definition
information.py:43
hep_ipython_tools.ipython_handler_basf2.information.Basf2ModulesInformation.search
search(self, regex_string)
Definition
information.py:56
hep_ipython_tools.ipython_handler_basf2.information.Basf2ModulesInformation.module_list
module_list
A cached module list for faster lookup.
Definition
information.py:54
hep_ipython_tools.ipython_handler_basf2.information.Basf2ModulesInformation.__init__
__init__(self)
Definition
information.py:48
hep_ipython_tools.ipython_handler_basf2.viewer.PathViewer
Definition
viewer.py:39
hep_ipython_tools.information
Definition
information.py:1
hep_ipython_tools.ipython_handler_basf2.viewer
Definition
viewer.py:1
framework
scripts
hep_ipython_tools
ipython_handler_basf2
information.py
Generated on Mon Sep 1 2025 02:51:51 for Belle II Software by
1.13.2