From 6dc4506d8fde8cf63698a71d64adc5c00cad92ed Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Sun, 4 Feb 2024 15:46:21 +0100 Subject: [PATCH] DPL: move stuff out of line --- Framework/Core/CMakeLists.txt | 1 + .../Core/include/Framework/AlgorithmSpec.h | 19 ++--------- Framework/Core/src/AlgorithmSpec.cxx | 32 +++++++++++++++++++ 3 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 Framework/Core/src/AlgorithmSpec.cxx diff --git a/Framework/Core/CMakeLists.txt b/Framework/Core/CMakeLists.txt index 25f2e60f402c4..05bcb1bd53083 100644 --- a/Framework/Core/CMakeLists.txt +++ b/Framework/Core/CMakeLists.txt @@ -11,6 +11,7 @@ o2_add_library(Framework SOURCES src/AODReaderHelpers.cxx + src/AlgorithmSpec.cxx src/ArrowSupport.cxx src/ArrowTableSlicingCache.cxx src/AnalysisDataModel.cxx diff --git a/Framework/Core/include/Framework/AlgorithmSpec.h b/Framework/Core/include/Framework/AlgorithmSpec.h index 544e6a4840548..98f7f18e0d24d 100644 --- a/Framework/Core/include/Framework/AlgorithmSpec.h +++ b/Framework/Core/include/Framework/AlgorithmSpec.h @@ -46,22 +46,9 @@ struct AlgorithmSpec { using ErrorCallback = std::function; using InitErrorCallback = std::function; - static AlgorithmSpec dummyAlgorithm() - { - return AlgorithmSpec{ProcessCallback{nullptr}}; - } - - static ErrorCallback& emptyErrorCallback() - { - static ErrorCallback callback = nullptr; - return callback; - } - - static InitErrorCallback& emptyInitErrorCallback() - { - static InitErrorCallback callback = nullptr; - return callback; - } + static AlgorithmSpec dummyAlgorithm(); + static ErrorCallback& emptyErrorCallback(); + static InitErrorCallback& emptyInitErrorCallback(); AlgorithmSpec() = default; diff --git a/Framework/Core/src/AlgorithmSpec.cxx b/Framework/Core/src/AlgorithmSpec.cxx new file mode 100644 index 0000000000000..218083c80947e --- /dev/null +++ b/Framework/Core/src/AlgorithmSpec.cxx @@ -0,0 +1,32 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// 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. + +#include "Framework/AlgorithmSpec.h" + +namespace o2::framework +{ +AlgorithmSpec AlgorithmSpec::dummyAlgorithm() +{ + return AlgorithmSpec{ProcessCallback{nullptr}}; +} + +AlgorithmSpec::ErrorCallback& AlgorithmSpec::emptyErrorCallback() +{ + static ErrorCallback callback = nullptr; + return callback; +} + +AlgorithmSpec::InitErrorCallback& AlgorithmSpec::emptyInitErrorCallback() +{ + static InitErrorCallback callback = nullptr; + return callback; +} +} // namespace o2::framework