Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:49

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "ActsExamples/Framework/DataHandle.hpp"
0012 #include "ActsExamples/Framework/IAlgorithm.hpp"
0013 #include "ActsExamples/Framework/ProcessCode.hpp"
0014 
0015 #include <memory>
0016 
0017 #include "HelloData.hpp"
0018 
0019 namespace ActsExamples {
0020 
0021 /// Example algorithm that reads/writes data from/to the event store.
0022 class HelloWhiteBoardAlgorithm : public ActsExamples::IAlgorithm {
0023  public:
0024   struct Config {
0025     /// Input collection name.
0026     std::string input;
0027     /// Output collection name.
0028     std::string output;
0029   };
0030 
0031   HelloWhiteBoardAlgorithm(const Config& cfg,
0032                            Acts::Logging::Level level = Acts::Logging::INFO);
0033 
0034   /// Read input and copy to the output
0035   ActsExamples::ProcessCode execute(const AlgorithmContext& ctx) const override;
0036 
0037   ReadDataHandle<HelloDataCollection> m_readHandle{this, "Input"};
0038   WriteDataHandle<HelloDataCollection> m_writeHandle{this, "Output"};
0039 
0040  private:
0041   Config m_cfg;
0042 };
0043 
0044 }  // namespace ActsExamples