Project
Loading...
Searching...
No Matches
test_RawDeviceInjector.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
13#include "Framework/Logger.h"
15
16using namespace o2::framework;
17
19
20// A simple workflow which takes heartbeats from
21// a raw FairMQ device as input and uses them as
22// part of the DPL.
24{
25 auto outspec = OutputSpec{o2::header::DataOrigin("SMPL"),
27 auto inspec = InputSpec{"heatbeat",
30 return WorkflowSpec{
31 specifyExternalFairMQDeviceProxy("foreign-source",
32 {outspec},
33 "type=sub,method=connect,address=tcp://localhost:5450,rateLogging=1",
34 o2DataModelAdaptor(outspec, 0, 1)),
36 "foreign-consumer",
37 Inputs{inspec},
38 {},
40 [](ProcessingContext& ctx) {
41 LOG(debug) << ctx.inputs().size();
42 }}}};
43}
std::ostringstream debug
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
DataProcessorSpec specifyExternalFairMQDeviceProxy(char const *label, std::vector< OutputSpec > const &outputs, const char *defaultChannelConfig, InjectorFunction converter, uint64_t minSHM=0, bool sendTFcounter=false, bool doInjectMissingData=false, unsigned int doPrintSizes=0)
InjectorFunction o2DataModelAdaptor(OutputSpec const &spec, uint64_t startTime, uint64_t step)
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< InputSpec > Inputs
Descriptor< gSizeDataOriginString > DataOrigin
Definition DataHeader.h:550
const o2::header::DataDescription gDataDescriptionHeartbeatFrame
WorkflowSpec defineDataProcessing(ConfigContext const &specs)
This function hooks up the the workflow specifications into the DPL driver.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"