Skip to content

Source · fairmq/devices/

runMultiplier.cxxsource

fairmq/devices/runMultiplier.cxx25 lines · C++GitHub ↗
1/********************************************************************************2 * Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH  *3 *                                                                              *4 *              This software is distributed under the terms of the             *5 *              GNU Lesser General Public Licence (LGPL) version 3,             *6 *                  copied verbatim in the file "LICENSE"                       *7 ********************************************************************************/8 9#include <fairmq/devices/Multiplier.h>10#include <fairmq/runDevice.h>11 12namespace bpo = boost::program_options;13 14void addCustomOptions(bpo::options_description& options)15{16    options.add_options()17        ("in-channel", bpo::value<std::string>()->default_value("data-in"), "Name of the input channel")18        ("out-channel", bpo::value<std::vector<std::string>>()->multitoken(), "Names of the output channels")19        ("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");20}21 22std::unique_ptr<fair::mq::Device> getDevice(fair::mq::ProgOptions& /*config*/)23{24    return std::make_unique<fair::mq::Multiplier>();25}