Belle II Software
development
ipython_handler.py
1
8
from
hep_ipython_tools.ipython_handler_basf2.calculation
import
Basf2Calculation
9
from
hep_ipython_tools.ipython_handler_basf2.viewer
import
StylingWidget
10
from
hep_ipython_tools.ipython_handler
import
IPythonHandler
11
from
hep_ipython_tools.ipython_handler_basf2.information
import
Basf2ModulesInformation, Basf2EnvironmentInformation
12
13
14
class
Basf2IPythonHandler
(
IPythonHandler
):
15
"""
16
Handler class to start processes in an IPython notebook in a convenient way.
17
From this whole framework you should not need to create any instances by yourself but rather use the
18
given ipython handler for this.
19
20
Usage
21
-----
22
23
Create a handler object in the beginning of your NB and use the two methods `process`
24
and `process_parameter_space` to turn a path or a path creator function into a Basf2Calculation.
25
Do not create calculations on you own.
26
27
from tracking.validation.ipython_handler import handler
28
29
path = ...
30
31
calculation = handler.process(path)
32
33
"""
34
35
def
__init__
(self):
36
"""
37
Set the ipython_handler_basf2 related shortcuts.
38
"""
39
super().
__init__
()
40
41
42
self.
information
=
Basf2EnvironmentInformation
()
43
44
45
self.
modules
=
Basf2ModulesInformation
()
46
47
48
self.
_calculation_type
= Basf2Calculation
49
50
def
process
(self, path, result_queue=None, max_event=0):
51
"""
52
Shortcut for convenience.
53
"""
54
return
IPythonHandler.process(self, result_queue=result_queue, path=path, max_event=max_event)
55
56
@staticmethod
57
def
style
():
58
"""
59
Show a nice styling :-)
60
"""
61
styling_widget =
StylingWidget
()
62
styling_widget.show()
hep_ipython_tools.ipython_handler.IPythonHandler
Definition
ipython_handler.py:14
hep_ipython_tools.ipython_handler.IPythonHandler.information
information
A shortcut for returning information on the environment.
Definition
ipython_handler.py:42
hep_ipython_tools.ipython_handler.IPythonHandler._calculation_type
_calculation_type
The calculation type to use.
Definition
ipython_handler.py:45
hep_ipython_tools.ipython_handler_basf2.information.Basf2EnvironmentInformation
Definition
information.py:16
hep_ipython_tools.ipython_handler_basf2.information.Basf2ModulesInformation
Definition
information.py:43
hep_ipython_tools.ipython_handler_basf2.ipython_handler.Basf2IPythonHandler
Definition
ipython_handler.py:14
hep_ipython_tools.ipython_handler_basf2.ipython_handler.Basf2IPythonHandler.process
process(self, path, result_queue=None, max_event=0)
Definition
ipython_handler.py:50
hep_ipython_tools.ipython_handler_basf2.ipython_handler.Basf2IPythonHandler.modules
modules
A shortcut for returning module information.
Definition
ipython_handler.py:45
hep_ipython_tools.ipython_handler_basf2.ipython_handler.Basf2IPythonHandler.style
style()
Definition
ipython_handler.py:57
hep_ipython_tools.ipython_handler_basf2.ipython_handler.Basf2IPythonHandler.__init__
__init__(self)
Definition
ipython_handler.py:35
hep_ipython_tools.ipython_handler_basf2.viewer.StylingWidget
Definition
viewer.py:13
hep_ipython_tools.ipython_handler_basf2.calculation
Definition
calculation.py:1
hep_ipython_tools.ipython_handler_basf2.information
Definition
information.py:1
hep_ipython_tools.ipython_handler_basf2.viewer
Definition
viewer.py:1
hep_ipython_tools.ipython_handler
Definition
ipython_handler.py:1
framework
scripts
hep_ipython_tools
ipython_handler_basf2
ipython_handler.py
Generated on Mon Sep 1 2025 02:51:52 for Belle II Software by
1.13.2