Public Member Functions | |
def | __init__ (self) |
def | dotIndenter (self, dot) |
def | export (self, data, filename, filetype) |
def | get_png_size (self, filename) |
def | processMap (self, mapdata) |
def | selectNode (self, dotdata, node, depth_s) |
def | write_output (self, dot, filename, filetype) |
Public Attributes | |
include_nodes | |
shapes | |
Export a CMSSW config file to DOT (http://www.graphviz.org) markup, either as raw markup or by invoking the dot program, as an image.
Definition at line 263 of file DOTExport.py.
def DOTExport.DotExport.__init__ | ( | self | ) |
def DOTExport.DotExport.dotIndenter | ( | self, | |
dot | |||
) |
Simple indenter for dot output, mainly to prettify it for human reading.
Definition at line 311 of file DOTExport.py.
References join().
Referenced by DOTExport.DotExport.export().
def DOTExport.DotExport.export | ( | self, | |
data, | |||
filename, | |||
filetype | |||
) |
Definition at line 465 of file DOTExport.py.
References DOTExport.DotExport.dotIndenter(), FileExportPlugin.FileExportPlugin.options, cmsswPreprocessor.CmsswPreprocessor.options, DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, TestProcess.TestProcess.options, DOTExport.DotProducer.options, confdb.HLTProcess.options, production_tasks.Task.options, VisualizationOptions.options(), fireworks::OptionNode.options(), edmIntegrityCheck.IntegrityCheck.options, edm.print(), DOTExport.DotExport.selectNode(), DOTExport.DotProducer.shapes, cms::DDParsingContext.shapes, EcalLaserAnalyzer2.shapes, DOTExport.DotExport.shapes, and DOTExport.DotExport.write_output().
def DOTExport.DotExport.get_png_size | ( | self, | |
filename | |||
) |
def DOTExport.DotExport.processMap | ( | self, | |
mapdata | |||
) |
Re-process the client-side image-map produces when png+map is selected. DOT will only ever put a single URL in the imagemap corresponding to a node, with the 'url' parameter (after html encoding) as the url, and the 'title' parameter as the title. This isn't useful behaviour for our purposes. We want probably several link areas, or a javascript link to make a menu appear, or other more complex behaviour. If the option 'urlprocess' is turned on, this function is called, and it expects to find a dictionary it can eval in the url parameter. I can't think of a less messy way of passing data to this function without having inner access to DOT at the moment. This function iterates through all the areas in the mapfile, replacing each one with one or more areas according to the rules in the dictionary stored in the URL parameter. The dictionary should have structure: { split_x:#, split_y:#, scale_x:#, scale_y:#, cells:[ { top:#, left:#, width:#, height:#, html_attribute1:"...", html_attribute2:"..." ] } The imagemap is first scaled in size by scale_x and scale_y. It is then split into split_x*split_y rectangular cells. New areas are created for each defined cell with the defined top,left location and width,height. This will not check you aren't making new areas that overlap if you define them as such. The areas then get attributes defined by html_attribute fields - eg, 'html_href':'mypage.htm' becomes 'href'='mypage.htm' in the area. Probably you want as a minimum to define html_href and html_alt. It would also be useful to set html_class to allow highlighting of different link types, or html_onclick/onmouseover for more exotic behaviour. This will probably be quite sensitive to the presence of special characters, complex splitting schemes, etc. Use with caution. This may be somewhat replaceable with the <html_label> and cut-down table format that graphviz provides, but I haven't had much of an experiment with that.
Definition at line 395 of file DOTExport.py.
References createfilelist.int, join(), and genParticles_cff.map.
Referenced by DOTExport.DotExport.write_output().
def DOTExport.DotExport.selectNode | ( | self, | |
dotdata, | |||
node, | |||
depth_s | |||
) |
Definition at line 330 of file DOTExport.py.
References DOTExport.DotExport.__init__(), funct.abs(), and createfilelist.int.
Referenced by DOTExport.DotExport.export().
def DOTExport.DotExport.write_output | ( | self, | |
dot, | |||
filename, | |||
filetype | |||
) |
Definition at line 500 of file DOTExport.py.
References DOTExport.DotExport.get_png_size(), SiStripPI.max, FileExportPlugin.FileExportPlugin.options, cmsswPreprocessor.CmsswPreprocessor.options, DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DOTExport.DotProducer.options, TestProcess.TestProcess.options, confdb.HLTProcess.options, production_tasks.Task.options, VisualizationOptions.options(), fireworks::OptionNode.options(), edmIntegrityCheck.IntegrityCheck.options, edm.print(), and DOTExport.DotExport.processMap().
Referenced by DOTExport.DotExport.export().
DOTExport.DotExport.include_nodes |
Definition at line 375 of file DOTExport.py.
DOTExport.DotExport.shapes |
Definition at line 301 of file DOTExport.py.
Referenced by DOTExport.DotExport.export().