forked from sPHENIX-Collaboration/acts
/
IAlgorithm.hpp
33 lines (25 loc) · 949 Bytes
/
IAlgorithm.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This file is part of the Acts project.
//
// Copyright (C) 2017 CERN for the benefit of the Acts project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
#include "ActsExamples/Framework/AlgorithmContext.hpp"
#include "ActsExamples/Framework/ProcessCode.hpp"
#include <string>
namespace ActsExamples {
/// Event processing algorithm interface.
///
/// An algorithm must have no internal state and can communicate to the
/// rest of the world only by reading and writting to the event store.
class IAlgorithm {
public:
virtual ~IAlgorithm() = default;
/// The algorithm name.
virtual std::string name() const = 0;
/// Execute the algorithm for one event.
virtual ProcessCode execute(const AlgorithmContext& context) const = 0;
};
} // namespace ActsExamples