Project
Loading...
Searching...
No Matches
DataProcessorSpecHelpers.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
13#include "Framework/Logger.h"
14#include <string>
15#include <algorithm>
16
17namespace o2::framework
18{
20{
21 auto sameLabel = [other = DataProcessorLabel{{label}}](DataProcessorLabel const& label) { return label == other; };
22 return std::find_if(spec.labels.begin(), spec.labels.end(), sameLabel) != spec.labels.end();
23}
24
26{
27 return DataProcessorSpec{
28 .name = name,
30 LOGP(fatal, "{} was not built in this process, which therefore cannot run it.", name);
31 return {};
32 }},
33 .metadata = {{"dpl-placeholder", "true"}}};
34}
35
37{
38 return std::ranges::any_of(spec.metadata, [](auto const& m) { return m.key == "dpl-placeholder"; });
39}
40} // namespace o2::framework
const GLfloat * m
Definition glcorearb.h:4066
GLuint const GLchar * name
Definition glcorearb.h:781
GLuint GLsizei const GLchar * label
Definition glcorearb.h:2519
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::function< ProcessCallback(InitContext &)> InitCallback
std::function< void(ProcessingContext &)> ProcessCallback
A label that can be associated to a DataProcessorSpec.
static bool isPlaceholder(DataProcessorSpec const &spec)
static bool hasLabel(DataProcessorSpec const &spec, char const *name)
static DataProcessorSpec placeholder(std::string name)
std::vector< DataProcessorMetadata > metadata
std::vector< DataProcessorLabel > labels
VectorOfTObjectPtrs other