(...loading TOC...)

The Flow Event

Why FlowEvents?

A FlowEvent is an object that contains a table (dictionary, or C++ map) with key/value pairs. The value of each entry is a FlowProperty and the key is a string that uniquely identifies that property. A FlowProperty in turn is a structure that contains a pointer to a value and a type identifier for these data. It also contains a description, a label, and more.

FlowEvents are supported by the FlowAnalyzer from scratch. The advantage compared with standard types (float, int, vector, ...) is that the grouping of these data is preserved even if a particular plugin does not need all data. It provides also a clear "trigger" for the input of a plugin. For example, a 2D histogram takes the x and the y value as input but since these numbers come in sequence x0, y0, x1, y1, ... the 2D histogram can easily get out of sync and take (x1, y0) ... as wrong number pairs. Even worse, if one of the numbers is rejected by one of the previous plugins there is no chance at all for the histogram to figure out which pairs are the correct ones. If it receives a FlowEvent, the matching properties for x and y can be identified, the corresponding data be retrieved and, if something is missing, the event be rejected.

Even though several "event streams" are in principle possible the usual case is that a FlowEvent is created by one dedicated plugin. This plugin usually creates the FlowEvent only once at the beginning and changes only the data (given by the pointers) during an event cycle. Other plugins can add properties, also at the beginning, and contribute their own data. The idea is that a FlowEvent starts with a minimum of raw data, e.g. ADC values from a decoder, and the connected plugins add calculated data until the plugin chain ends in a histogram where several of these "high-level" properties are picked out to fill the histograms.

In order to calculate other data (properties) from the raw data there are often re-occuring simple operations like multiplying/adding (for calibraion), mapping, and so on.