File indexing completed on 2025-12-16 09:41:48
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "ActsExamples/Framework/AlgorithmContext.hpp"
0012 #include "ActsExamples/Framework/ProcessCode.hpp"
0013
0014 #include <string>
0015 #include <vector>
0016
0017 namespace ActsExamples {
0018
0019 class DataHandleBase;
0020 struct AlgorithmContext;
0021
0022
0023
0024 class SequenceElement {
0025 public:
0026 virtual ~SequenceElement() = default;
0027
0028
0029 virtual std::string name() const = 0;
0030
0031
0032 virtual std::string_view typeName() const = 0;
0033
0034
0035 virtual ProcessCode initialize() = 0;
0036
0037
0038 virtual ProcessCode finalize() = 0;
0039
0040
0041
0042 virtual ProcessCode internalExecute(const AlgorithmContext& context) = 0;
0043
0044 const std::vector<const DataHandleBase*>& writeHandles() const;
0045 const std::vector<const DataHandleBase*>& readHandles() const;
0046
0047 private:
0048 void registerWriteHandle(const DataHandleBase& handle);
0049 void registerReadHandle(const DataHandleBase& handle);
0050
0051 friend class DataHandleBase;
0052
0053 friend class BufferedReader;
0054
0055 std::vector<const DataHandleBase*> m_writeHandles;
0056 std::vector<const DataHandleBase*> m_readHandles;
0057 };
0058
0059 }