Project
Loading...
Searching...
No Matches
ChannelSpecHelpers.h
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.
11#ifndef O2_FRAMEWORK_CHANNELSPECHELPERS_H_
12#define O2_FRAMEWORK_CHANNELSPECHELPERS_H_
13
15#include <iosfwd>
16#include <string_view>
17#include <vector>
18
19namespace o2::framework
20{
21
24 virtual void beginChannel() {}
25 virtual void endChannel() {}
26 virtual void property(std::string_view /* key */, std::string_view /* value */) {}
27 virtual void error() {}
28};
29
32 void beginChannel() override;
33 void endChannel() override;
34 void property(std::string_view /* key */, std::string_view /* value */) override;
35 void error() override;
36 std::vector<OutputChannelSpec> specs;
37 int channelCount = 0;
38};
39
45 static char const* typeAsString(enum ChannelType type);
47 static char const* methodAsString(enum ChannelMethod method);
49 static std::string channelUrl(InputChannelSpec const&);
51 static std::string channelUrl(OutputChannelSpec const&);
54 static void parseChannelConfig(char const* channelConfig, FairMQChannelConfigParser& parser);
55 static std::string defaultIPCFolder();
56};
57
59std::ostream& operator<<(std::ostream& s, ChannelType const& type);
61std::ostream& operator<<(std::ostream& s, ChannelMethod const& method);
62
63} // namespace o2::framework
64
65#endif // O2_FRAMEWORK_CHANNELSPECHELPERS_H_
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::ostream & operator<<(std::ostream &s, ChannelType const &type)
Stream operators so that we can use ChannelType with Boost.Test.
ChannelType
These map to zeromq types for the channels.
Definition ChannelSpec.h:27
static void parseChannelConfig(char const *channelConfig, FairMQChannelConfigParser &parser)
static char const * typeAsString(enum ChannelType type)
return a ChannelType as a lowercase string
static std::string channelUrl(InputChannelSpec const &)
static char const * methodAsString(enum ChannelMethod method)
return a ChannelMethod as a lowercase string
Handler to parse the description of the –channel-config.
virtual void property(std::string_view, std::string_view)
A parser which creates an OutputChannelSpec from the –channel-config.
void property(std::string_view, std::string_view) override