There are several tools implemented in basic library to allow complex
data flows to be composed. The first is a simple process which `taps'
the data flowing through a pipe and puts it out into another data pipe.
This tap process is shown in Figure 3.
There is a helper function which constructs a tap with the appropriate
types. `DPTap<>' takes one argument, the destination to put the
tapped data. The example opens an output stream on stdout, to which
it sends all the processed data as well as saving it to the file
`out.dat'. Figure 4 shows a graphical representation
of the stream created.
DPOFileC<RealT> monitor("-") ;
DPOffsetScale(2.0,3.0) » DPRunningAverage(1.0,5) » DPTap(monitor) » DPOFileC<RealT>("out.dat");
Figure 3:Data Tap.
Figure 4:Tap example.