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