Belle II Software light-2406-ragdoll
ipython_handler.py
1
10from hep_ipython_tools.ipython_handler import IPythonHandler
11from hep_ipython_tools.ipython_handler_basf2.information import Basf2ModulesInformation, Basf2EnvironmentInformation
12
13
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
43
44
46
47
48 self._calculation_type_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()
information
A shortcut for returning information on the environment.
information
A shortcut for returning information on the ipython_handler_basf2 environment.