![]() |
Project
|
Executable:
A proxy workflow to connect to a channel from DataDistribution. The incoming data is supposed to follow the O2 data model with header-payload pair messages. The header message must contain DataHeader
and the internal DPL DataProcessingHeader
. Only data which match the configured outputs will be forwarded.
Since payload can be split into several messages, the proxy will create a new message to merge all parts belonging to one payload entity.
o2-dpl-raw-proxy
Data is selected by using a configuration string of the format tag1:origin/description/subspec;tag2:...
, the tags are arbitrary and only for internal reasons and are ignored. Example:
The input channel has name readout-proxy
and is configured with option --channel-config
.
By default, data blocks not matching the configured filter/output spec will be silently ignored. Use --throwOnUnmatched
to apply a strict checking in order to indicate unmatched data.
The proxy workflow only defines the proxy process, workflows can be combined by piping them together om the command line
Class RawParser implements a parser for O2 raw data which is organized in pages of a fixed size, each page starts with the RAWDataHeader. The page size may actually be smaller than the maximum size, depending on the header fields.
The parser class works on a contiguous sequence of raw pages in a raw buffer. Multiple versions of RAWDataHeader are supported transparently and selected depending on the version field of the header.
RawParser
Utility class to transparently iterate over raw pages distributed over multiple messsages on multiple routes.
A DPL processor might receive raw pages accumulated on three levels: 1) the DPL processor has one or more input route(s) 2) multiple parts per input route (split payloads or multiple input specs matching the same route spec 3) variable number of raw pages in one payload
Internally, class RawParser is used to access raw pages withon one payload message and dynamically adopt to RAWDataHeader version.
The parser provides an iterator interface to loop over raw pages, starting at the first raw page of the first payload at the first route and going to the next route when all payloads are processed. The iterator element is RawDataHeaderInfo containing just the two least significant bytes of the RDH where we have the version and header size.
The iterator object provides methods to access the concrete RDH, the raw buffer, the payload, etc.
The parser needs an object of DPL InputRecord provided by the ProcessingContext.
A list of InputSpec definiions can be provided to filter the incoming messages by the DataHeader.
Note: select
is a helper function of WorkflowSpec.h which builds InputSpecs from a string.
The iterator implements stream output operator to print out RDH fields in a table, a specific format wrapper prints RDH info and table header, e.g. for
output can look like
Executable:
Parser workflow defines one process with configurable inputs and a loop over the input data which sets up the RawParser class and executes some basic parsing and statistic printout.
o2-dpl-raw-parser
In medium log level, the RDH version and the table header for the RDH field are printed for each new data description, in level high this will be done also for all parts with the same data description. The RDH fields are printed in a table per raw page.
The workflow can be connected to the o2-dpl-raw-proxy workflow using pipe on command line.
Executable:
A proxy workflow to connect to workflow output and forward it to out-of-band channels, meaning channels outside DPL.
o2-dpl-output-proxy
Output channel(s): to be defined with the FairMQ device channel configuration option, e.g.
Input to the proxy is defined by the DPL data spec syntax
The binding label can be used internally to access the input, here it is used to match to a configured output channel. That binding can be the same for multiple data specs.
Note: the 'default-*' options are only for building the the default of the channel configuration. The default channel name is build from the name of the proxy device. Having a default channel configuration allows to skip the '–channel-config' option on the command line.
documentation to be filled