Project
Loading...
Searching...
No Matches
InputSpec.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.
11//
12#include "Framework/InputSpec.h"
14
15#include <variant>
16#include <vector>
17
18namespace o2
19{
20namespace framework
21{
22
23InputSpec::InputSpec(std::string binding_,
24 ConcreteDataMatcher const& concrete,
25 enum Lifetime lifetime_,
26 std::vector<ConfigParamSpec> const& metadata_)
27 : binding{binding_},
28 matcher{concrete},
29 lifetime{lifetime_},
30 metadata{metadata_}
31{
32}
33
34InputSpec::InputSpec(std::string binding_,
35 header::DataOrigin origin_,
36 header::DataDescription description_,
38 enum Lifetime lifetime_,
39 std::vector<ConfigParamSpec> const& metadata_)
40 : binding{binding_},
41 matcher{ConcreteDataMatcher{origin_, description_, subSpec_}},
42 lifetime{lifetime_},
43 metadata{metadata_}
44{
45}
46
47InputSpec::InputSpec(std::string binding_,
48 header::DataOrigin origin_,
49 header::DataDescription description_,
50 enum Lifetime lifetime_,
51 std::vector<ConfigParamSpec> const& metadata_)
52 : binding{binding_},
53 matcher{ConcreteDataMatcher{origin_, description_, 0}},
54 lifetime{lifetime_},
55 metadata{metadata_}
56{
57}
58
59InputSpec::InputSpec(std::string binding_,
60 header::DataOrigin const& origin_,
61 enum Lifetime lifetime_,
62 std::vector<ConfigParamSpec> const& metadata_)
63 : binding{binding_},
64 matcher{DataSpecUtils::dataDescriptorMatcherFrom(origin_)},
65 lifetime{lifetime_},
66 metadata{metadata_}
67{
68}
69
70InputSpec::InputSpec(std::string binding_,
71 ConcreteDataTypeMatcher const& dataType,
72 enum Lifetime lifetime_,
73 std::vector<ConfigParamSpec> const& metadata_)
74 : binding{binding_},
75 matcher{DataSpecUtils::dataDescriptorMatcherFrom(dataType)},
76 lifetime{lifetime_},
77 metadata{metadata_}
78{
79}
80
81InputSpec::InputSpec(std::string binding_,
83 enum Lifetime lifetime_,
84 std::vector<ConfigParamSpec> const& metadata_)
85 : binding{binding_},
86 matcher{matcher_},
87 lifetime{lifetime_},
88 metadata{metadata_}
89{
90}
91
92bool InputSpec::operator==(InputSpec const& that) const
93{
94 return this->matcher == that.matcher && this->lifetime == that.lifetime;
95}
96
97} // namespace framework
98} // namespace o2
Lifetime
Possible Lifetime of objects being exchanged by the DPL.
Definition Lifetime.h:18
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
InputSpec(std::string binding_, header::DataOrigin origin_, header::DataDescription description_, header::DataHeader::SubSpecificationType subSpec_, enum Lifetime lifetime_=Lifetime::Timeframe, std::vector< ConfigParamSpec > const &metadata_={})
Create a fully qualified InputSpec.
Definition InputSpec.cxx:34
enum Lifetime lifetime
Definition InputSpec.h:73
bool operator==(InputSpec const &that) const
Definition InputSpec.cxx:92
std::variant< ConcreteDataMatcher, data_matcher::DataDescriptorMatcher > matcher
The actual matcher for the input spec.
Definition InputSpec.h:70
uint32_t SubSpecificationType
Definition DataHeader.h:620