forked from mcoquet642/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutputRef.h
More file actions
45 lines (37 loc) · 1.46 KB
/
OutputRef.h
File metadata and controls
45 lines (37 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#ifndef FRAMEWORK_OUTPUTREF_H
#define FRAMEWORK_OUTPUTREF_H
#include "Headers/DataHeader.h"
#include "Headers/Stack.h"
#include <string>
namespace o2
{
namespace framework
{
/// A reference to an output spec
///
/// OutputRef descriptors are expected to be passed as rvalue, i.e. a temporary object in the
/// function call. This is due to the fact that the header stack has no ordinary copy
/// constructor but only a move constructor
struct OutputRef {
std::string label;
header::DataHeader::SubSpecificationType subSpec;
header::Stack headerStack = {};
OutputRef(std::string&& l, header::DataHeader::SubSpecificationType s = 0) : label(std::move(l)), subSpec(s) {}
OutputRef(const std::string& l, header::DataHeader::SubSpecificationType s = 0) : label(l), subSpec(s) {}
OutputRef(std::string&& l, header::DataHeader::SubSpecificationType s, o2::header::Stack&& stack)
: label(std::move(l)), subSpec(s), headerStack(std::move(stack))
{
}
};
} // namespace framework
} // namespace o2
#endif