Belle II Software  release-08-01-10
QueueDrawer Class Reference
Inheritance diagram for QueueDrawer:
Collaboration diagram for QueueDrawer:

Public Member Functions

def __init__ (self, queue=None, label=None, *args, **kwargs)
 
def terminate (self)
 
def new_output_filename (self)
 
def drawoptions (self)
 
def all_drawoptions (self)
 
def draw_wires (self)
 
def draw_wires (self, draw_wires)
 
def initialize (self)
 
def beginRun (self)
 
def event (self)
 
def endRun (self)
 
def new_output_basename (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.
 
 interactive
 Switch if the module shall show the event to the user and wait to continue or just generate the images.
 
 output_folder
 Folder the images shall be saved to.
 
 animate
 Switch to make an animated event display by means of animated SVG.
 
 forward_fade
 Switch to make the color of segments and tracks fade out in the forward direction.
 
 use_python
 Flag to use python.
 
 draw_interaction_point
 Switch to draw the interaction point. More...
 
 draw_superlayer_boundaries
 Switch to draw the superlayer boundaries. More...
 
 draw_walls
 Switch to draw the superlayer boundaries. More...
 
 draw_hits
 Switch to draw the CDCHits. More...
 
 draw_takenflag
 Switch to draw the CDCHits colored by the associated CDCWireHit taken flag. More...
 
 draw_mcparticle_id
 Switch to draw the MCParticle::getArrayIndex property. More...
 
 draw_mcparticle_pdgcode
 Switch to draw the MCParticle::getPDGCode property. More...
 
 draw_mcparticle_primary
 Switch to draw the MCParticle::hasStatus(c_PrimaryParticle) property. More...
 
 draw_mcparticle_trajectories
 Switch to draw the ideal trajectory of the MCParticle. More...
 
 draw_simhits
 Switch to draw the CDCSimHits with momentum information. More...
 
 draw_simhit_tof
 Switch to draw the CDCSimHits color coded by their time of flight. More...
 
 draw_simhit_posflag
 Switch to draw the CDCSimHits color coded by their getPosFlag() property. More...
 
 draw_simhit_pdgcode
 Switch to draw the CDCSimHits color coded by their getPDGCode() property. More...
 
 draw_simhit_bkgtag
 Switch to draw the CDCSimHits color coded by their getBackgroundTag() property. More...
 
 draw_simhit_isbkg
 Switch to draw the CDCSimHits red for getBackgroundTag() != bg_none. More...
 
 draw_nloops
 Switch to draw the CDCHit colored by the number of loops passed.
 
 draw_connect_tof
 Switch to draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo particle. More...
 
 draw_rlinfo
 Switch to draw the CDCSimHits color coded by their local right left passage information. More...
 
 draw_reassigned
 Switch to draw the CDCSimHits color coded by their reassignement information to a different MCParticle. More...
 
 draw_mcsegments
 Switch to draw the Monte Carlo segments as generated in CDCMCTrackStore. More...
 
 draw_mcaxialsegmentpairs
 Switch to draw the axial to axial segment pairs from Monte Carlo truth. More...
 
 draw_mcsegmentpairs
 Switch to draw the axial to stereo segment pairs from Monte Carlo truth. More...
 
 draw_mcsegmenttriples
 Switch to draw the segment triples from Monte Carlo truth. More...
 
 draw_superclusters
 Switch to draw the clusters generated by the finder.
 
 draw_clusters
 Switch to draw the clusters generated by the finder.
 
 draw_segments
 Switch to draw the segments generated by the finder.
 
 draw_segment_trajectories
 Switch to draw the trajectories fitted to the segments generated by the finder.
 
 draw_tangentsegments
 Switch to draw the tangent segments generated by the finder.
 
 draw_segment_mctrackids
 Switch to draw the segments generated by the finder colored with the Monte Carlo track id.
 
 draw_segment_fbinfos
 Switch to draw the segments generated by the finder colored by the coalignment information (forward, backward, undetermined)
 
 draw_segment_firstInTrackIds
 Switch to draw the segments generated by the finder colored by the frist in track hit id.
 
 draw_segment_lastInTrackIds
 Switch to draw the segments generated by the finder colored by the second in track hit id.
 
 draw_segment_firstNPassedSuperLayers
 Switch to draw the segments generated by the finder colored by the number of passed superlayers assoziated to the first hit in the segment.
 
 draw_segment_lastNPassedSuperLayers
 Switch to draw the segments generated by the finder colored by the number of passed superlayers assoziated to the last hit in the segment.
 
 draw_axialsegmentpairs
 Switch to draw the axial stereo segment pairs generated by the finder.
 
 draw_segmentpairs
 Switch to draw the axial stereo segment pairs generated by the finder.
 
 draw_segmenttriples
 Switch to draw the segment triples generated by the finder.
 
 draw_segmenttriple_trajectories
 Switch to draw the trajectories fitted to the segment triples generated by the finder.
 
 draw_tracks
 Switch to draw the tracks generated by the finder.
 
 draw_track_trajectories
 Switch to draw the trajectories of the tracks generated by the finder.
 
 draw_recotracks
 Draw the output RecoTracks.
 
 draw_mcrecotracks
 Draw the MC reference RecoTracks.
 
 draw_recotrack_matching
 Draw the output RecoTracks pattern recognition matching status.
 
 draw_mcrecotrack_matching
 Draw the MC reference RecoTracks pattern recognition matching status.
 
 draw_recotrack_seed_trajectories
 Draw the output track seed trajectories.
 
 draw_recotrack_fit_trajectories
 Draw the output trackpoint trajectories.
 
 draw_wrong_rl_infos_in_segments
 Draw a red cdc hit of the rl info of the segment reco hits is wrong, else a green one.
 
 draw_wrong_rl_infos_in_tracks
 Draw a red cdc hit of the rl info of the track reco hits is wrong, else a green one.
 
 cdc_hits_store_array_name
 Name of the CDC Hits store array.
 
 reco_tracks_store_array_name
 Name of the RecoTracks store array.
 
 mc_reco_tracks_store_array_name
 Name of the Monte Carlo reference RecoTracks store array.
 
 cdc_wire_hit_cluster_store_obj_name
 Name of the CDC Wire Hit Clusters.
 
 cdc_segment_vector_store_obj_name
 Name of the CDC Reco Segment Vector.
 
 file_number
 Current file's number (used for making output filename)
 
 filename_prefix
 Filename prefix.
 
 use_time_in_filename
 Use time instead of prefix in filename.
 
 prefilled_cppplotter
 prefilled default is to use the C++ plotter
 
 prefilled_plotter
 prefilled default is to use the python plotter
 

Private Attributes

 _draw_wires
 Switch to draw the wires.
 

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

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

◆ all_drawoptions()

def all_drawoptions (   self)
inherited
Property that collects the all names of the draw options to a list.
Note that some draw options only make sense after running the CDC
cellular automaton track finder.
@return list of strings naming the different switches that can be activated.

Definition at line 329 of file __init__.py.

◆ beginRun()

def beginRun (   self)
inherited
Begin run method of the module. Empty here.

Definition at line 412 of file __init__.py.

◆ draw_wires() [1/2]

def draw_wires (   self)
inherited
Getter for the draw option that indicates if all wires shall be drawn.
Since this has some performance impact in animated events the wires
are prevented from being drawn in this case.

Definition at line 350 of file __init__.py.

◆ draw_wires() [2/2]

def draw_wires (   self,
  draw_wires 
)
inherited
Setter for the option to draw all wires.

Definition at line 360 of file __init__.py.

◆ drawoptions()

def drawoptions (   self)
inherited
Property that collects the various names of the draw options to a list
that are not related to the CDC cellular automaton track finder.
@return list of strings naming the different switches that can be activated.

Definition at line 264 of file __init__.py.

◆ endRun()

def endRun (   self)
inherited
endRun methode of the module. Empty here.

Definition at line 1050 of file __init__.py.

◆ event()

def event (   self)
inherited
Event method of the module. Draws the event into a new svg file.

Definition at line 419 of file __init__.py.

◆ initialize()

def initialize (   self)
inherited
Initialisation method of the module.
Creates the output folder if it is not present yet.

Definition at line 367 of file __init__.py.

◆ new_output_basename()

def new_output_basename (   self)
inherited
Generates a new unique name for the current event without the folder prefix

Definition at line 1064 of file __init__.py.

◆ 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.

◆ 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.

Member Data Documentation

◆ draw_connect_tof

draw_connect_tof
inherited

Switch to draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo particle.

Default: inactive

Definition at line 133 of file __init__.py.

◆ draw_hits

draw_hits
inherited

Switch to draw the CDCHits.

Default: active

Definition at line 91 of file __init__.py.

◆ draw_interaction_point

draw_interaction_point
inherited

Switch to draw the interaction point.

Default: active

Definition at line 82 of file __init__.py.

◆ draw_mcaxialsegmentpairs

draw_mcaxialsegmentpairs
inherited

Switch to draw the axial to axial segment pairs from Monte Carlo truth.

Default: inactive

Definition at line 148 of file __init__.py.

◆ draw_mcparticle_id

draw_mcparticle_id
inherited

Switch to draw the MCParticle::getArrayIndex property.

Default: inactive

Definition at line 97 of file __init__.py.

◆ draw_mcparticle_pdgcode

draw_mcparticle_pdgcode
inherited

Switch to draw the MCParticle::getPDGCode property.

Default: inactive

Definition at line 100 of file __init__.py.

◆ draw_mcparticle_primary

draw_mcparticle_primary
inherited

Switch to draw the MCParticle::hasStatus(c_PrimaryParticle) property.

Default: inactive

Definition at line 103 of file __init__.py.

◆ draw_mcparticle_trajectories

draw_mcparticle_trajectories
inherited

Switch to draw the ideal trajectory of the MCParticle.

Default: inactive

Definition at line 106 of file __init__.py.

◆ draw_mcsegmentpairs

draw_mcsegmentpairs
inherited

Switch to draw the axial to stereo segment pairs from Monte Carlo truth.

Default: inactive

Definition at line 151 of file __init__.py.

◆ draw_mcsegments

draw_mcsegments
inherited

Switch to draw the Monte Carlo segments as generated in CDCMCTrackStore.

Default: inactive

Definition at line 145 of file __init__.py.

◆ draw_mcsegmenttriples

draw_mcsegmenttriples
inherited

Switch to draw the segment triples from Monte Carlo truth.

Default: inactive

Definition at line 154 of file __init__.py.

◆ draw_reassigned

draw_reassigned
inherited

Switch to draw the CDCSimHits color coded by their reassignement information to a different MCParticle.

Default: inactive

Definition at line 142 of file __init__.py.

◆ draw_rlinfo

draw_rlinfo
inherited

Switch to draw the CDCSimHits color coded by their local right left passage information.

Default: inactive

Definition at line 137 of file __init__.py.

◆ draw_simhit_bkgtag

draw_simhit_bkgtag
inherited

Switch to draw the CDCSimHits color coded by their getBackgroundTag() property.

Default: inactive

Definition at line 122 of file __init__.py.

◆ draw_simhit_isbkg

draw_simhit_isbkg
inherited

Switch to draw the CDCSimHits red for getBackgroundTag() != bg_none.

Default: inactive

Definition at line 125 of file __init__.py.

◆ draw_simhit_pdgcode

draw_simhit_pdgcode
inherited

Switch to draw the CDCSimHits color coded by their getPDGCode() property.

Default: inactive

Definition at line 118 of file __init__.py.

◆ draw_simhit_posflag

draw_simhit_posflag
inherited

Switch to draw the CDCSimHits color coded by their getPosFlag() property.

Default: inactive

Definition at line 115 of file __init__.py.

◆ draw_simhit_tof

draw_simhit_tof
inherited

Switch to draw the CDCSimHits color coded by their time of flight.

Default: inactive

Definition at line 112 of file __init__.py.

◆ draw_simhits

draw_simhits
inherited

Switch to draw the CDCSimHits with momentum information.

Default: inactive

Definition at line 109 of file __init__.py.

◆ draw_superlayer_boundaries

draw_superlayer_boundaries
inherited

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 85 of file __init__.py.

◆ draw_takenflag

draw_takenflag
inherited

Switch to draw the CDCHits colored by the associated CDCWireHit taken flag.

Default: active

Definition at line 94 of file __init__.py.

◆ draw_walls

draw_walls
inherited

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 88 of file __init__.py.


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