Project
Loading...
Searching...
No Matches
Utils.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
16
17#include "DPLUtils/Utils.h"
19
20using namespace o2::framework;
21
22namespace o2
23{
24namespace workflows
25{
26
27// Method to convert an OutputSpec in a Output.
29{
30 auto concrete = DataSpecUtils::asConcreteDataMatcher(outputSpec);
31 return Output{concrete.origin, concrete.description, concrete.subSpec};
32}
33
34// This method can convert a vector of OutputSpec into a vector of Output.
35// This is useful for DPL devices, to avoid specifying both OutputSpec and Output in define
36std::shared_ptr<std::vector<Output>> getOutputList(const Outputs outputSpecs)
37{
38 std::shared_ptr<std::vector<o2f::Output>> outputList = std::make_shared<std::vector<o2f::Output>>();
39
40 for (const auto& itOutputSpec : outputSpecs) {
41 (*outputList).emplace_back(getOutput(itOutputSpec));
42 }
43
44 return outputList;
45};
46
47} // namespace workflows
48} // namespace o2
A collection of , v0.1.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< OutputSpec > Outputs
o2f::Output getOutput(const o2f::OutputSpec outputSpec)
Definition Utils.cxx:28
std::shared_ptr< std::vector< o2f::Output > > getOutputList(const o2f::Outputs outputSpecs)
Definition Utils.cxx:36
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static ConcreteDataMatcher asConcreteDataMatcher(InputSpec const &input)
header::DataOrigin origin
Definition Output.h:28