Project
Loading...
Searching...
No Matches
DataSender.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_DATASENDER_H_
12#define O2_FRAMEWORK_DATASENDER_H_
13
17#include "Framework/Tracing.h"
19#include <fairmq/Message.h>
20#include <fairmq/Parts.h>
21#include <string>
22
23#include <cstddef>
24#include <mutex>
25
26namespace o2::framework
27{
28
29struct ServiceRegistry;
30struct DeviceSpec;
31
34{
35 public:
37 void send(fair::mq::Parts&, ChannelIndex index);
38 std::unique_ptr<fair::mq::Message> create(RouteIndex index);
43 void reset();
48 void verifyMissingSporadic() const;
49
50 private:
51 FairMQDeviceProxy& mProxy;
52 // We need the ServiceRegistry and not a ref, to be able
53 // to call the callbacks after sending.
54 ServiceRegistryRef mRegistry;
55 DeviceSpec const& mSpec;
56 std::vector<OutputSpec> mOutputs;
57 std::vector<size_t> mDistinctRoutesIndex;
58
59 std::vector<std::string> mMetricsNames;
60 std::vector<std::string> mVariablesMetricsNames;
61 std::vector<bool> mPresent;
62 std::vector<bool> mPresentDefaults;
63
64 O2_LOCKABLE_NAMED(std::recursive_mutex, mMutex, "data relayer mutex");
65};
66
67} // namespace o2::framework
68
69#endif // O2_FRAMEWORK_DATASENDER_H_
#define O2_LOCKABLE_NAMED(T, V, N)
Definition Tracing.h:19
Allow injecting policies on send.
Definition DataSender.h:34
std::unique_ptr< fair::mq::Message > create(RouteIndex index)
void verifyMissingSporadic() const
void send(fair::mq::Parts &, ChannelIndex index)
GLuint index
Definition glcorearb.h:781
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20