Belle II Software development
QueueDrawer Class Reference
Inheritance diagram for QueueDrawer:
CDCSVGDisplayModule

Public Member Functions

def __init__ (self, queue=None, label=None, *args, **kwargs)
 
def terminate (self)
 
def new_output_filename (self)
 

Public Attributes

 queue
 The queue to handle.
 
 label
 The label for writing to the queue.
 
 use_cpp
 We want to use cpp for sure.
 
 manager
 We store the files in a list and this list must be accessible also in multiprocessing, so we us a manager here.
 
 file_list
 The list of created paths.
 

Detailed Description

A wrapper around the svg drawer in the tracking package that
writes its output files as a list to the queue

Definition at line 16 of file wrapper.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  queue = None,
  label = None,
args,
**  kwargs 
)
 The same as the base class, except:

Arguments
---------

queue: The queue to write to
label: The key name in the queue

Reimplemented from CDCSVGDisplayModule.

Definition at line 23 of file wrapper.py.

23 def __init__(self, queue=None, label=None, *args, **kwargs):
24 """ The same as the base class, except:
25
26 Arguments
27 ---------
28
29 queue: The queue to write to
30 label: The key name in the queue
31 """
32
33 self.queue = queue
34
35
36 self.label = label
37
38 CDCSVGDisplayModule.__init__(self, interactive=False, *args, **kwargs)
39
40
41 self.use_cpp = True
42
43
44 self.manager = multiprocessing.Manager()
45
46
47 self.file_list = self.manager.list([])
48

Member Function Documentation

◆ new_output_filename()

def new_output_filename (   self)
 Overwrite the function to listen for every new filename 

Reimplemented from CDCSVGDisplayModule.

Definition at line 57 of file wrapper.py.

57 def new_output_filename(self):
58 """ Overwrite the function to listen for every new filename """
59 output_file_name = CDCSVGDisplayModule.new_output_filename(self)
60 self.file_list.append(output_file_name)
61 return output_file_name
62
63

◆ terminate()

def terminate (   self)
 Overwrite the terminate to put the list to the queue

Reimplemented from CDCSVGDisplayModule.

Definition at line 49 of file wrapper.py.

49 def terminate(self):
50 """ Overwrite the terminate to put the list to the queue"""
51 CDCSVGDisplayModule.terminate(self)
52 file_list = self.file_list
53 files = [file_list[i] for i in range(len(file_list))]
54 if self.queue:
55 self.queue.put(self.label, files)
56

Member Data Documentation

◆ file_list

file_list

The list of created paths.

Definition at line 47 of file wrapper.py.

◆ label

label

The label for writing to the queue.

Definition at line 36 of file wrapper.py.

◆ manager

manager

We store the files in a list and this list must be accessible also in multiprocessing, so we us a manager here.

Definition at line 44 of file wrapper.py.

◆ queue

queue

The queue to handle.

Definition at line 33 of file wrapper.py.

◆ use_cpp

use_cpp

We want to use cpp for sure.

Definition at line 41 of file wrapper.py.


The documentation for this class was generated from the following file: