rail.tools.flow_handle module

Rail-specific data management

class rail.tools.flow_handle.FlowDict[source]

Bases: dict

A specialized dict to keep track of individual flow objects: this is just a dict these additional features

  1. Keys are paths

  2. Values are flow objects, this is checked at runtime.

  3. There is a read(path, force=False) method that reads a flow object and inserts it into the dictionary

  4. There is a single static instance of this class

read(path, force=False)[source]

Read a Flow object from disk and add it to this dictionary

class rail.tools.flow_handle.FlowHandle(tag, data=None, path=None, creator=None)[source]

Bases: ModelHandle

A wrapper around a file that describes a PZFlow object

flow_factory = {}
suffix = 'pkl'