Skip to content

Commit

Permalink
DPL: move stuff out of line
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Feb 5, 2024
1 parent 44090f4 commit 6dc4506
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
1 change: 1 addition & 0 deletions Framework/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

o2_add_library(Framework
SOURCES src/AODReaderHelpers.cxx
src/AlgorithmSpec.cxx
src/ArrowSupport.cxx
src/ArrowTableSlicingCache.cxx
src/AnalysisDataModel.cxx
Expand Down
19 changes: 3 additions & 16 deletions Framework/Core/include/Framework/AlgorithmSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,9 @@ struct AlgorithmSpec {
using ErrorCallback = std::function<void(ErrorContext&)>;
using InitErrorCallback = std::function<void(InitErrorContext&)>;

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;

Expand Down
32 changes: 32 additions & 0 deletions Framework/Core/src/AlgorithmSpec.cxx
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6dc4506

Please sign in to comment.