Project

General

Profile

Diagramming the data flow that produced an event

Since art records what module (producer or filter) produced each data product inserted into an art::Event, as well as what data products were read by each producer or filter, it is possible to reconstruct the data flow that created the data in any given event. The art::DataFlowDumper output module does just that.

DataFlowDumper writes a GraphViz (http://graphviz.org) document that can be used to generate a diagram of the data flow that created the events in the art/ROOT file being read by the program. If no input file is being read, only the data flow in the process being executed will be diagrammed.

Note that the GraphViz software is not distributed with art; you will need your own installation of GraphViz in order to render the diagram.

Documentation of the configuration options supported by DataFlowDumper is available using the normal art facilities:

 art --print-description DataFlowDumper

Note that DataFlowDumper does not write an art/ROOT output file, so some of the configuration parameters reported are not relevant. The parameter dotfile and the ones after that are the configuration parameters of interest.

Since the data flow in a processing job typically is the same for every event, is will usually be convenient to limit the job to reading a single event. A typical invocation would be:

 art -n 1 -c dataflow.fcl <input-file>

where dataflow.fcl contains:

outputs.o1 : { module_type: DataFlowDumper }
physics.e1 : [ o1 ]

By default, the name of the GraphViz diagram file written by DataFlowDumper is flow.dot.

Note the -n 1 on the art command line, to tell art to read only a single event. If more than one event is read, the output file will contain more than one graph. By default, the GraphViz tools will render only the last graph in an input file.

The resulting GraphViz diagram can contain considerable amounts of redundant information, so the use of the GraphViz utility tred is recommended. Assuming you have a GraphViz installation available on your machine, the following command can be used to generate a PDF file containing the graph using:

 tred flow.dot | dot -T pdf -o flow.pdf