File indexing completed on 2026-09-07 08:28:08
0001
0002
0003
0004 #pragma once
0005
0006 #include <JANA/JEvent.h>
0007 #include <memory>
0008 #include <string>
0009
0010 #include "algorithms/interfaces/WithPodConfig.h"
0011 #include "algorithms/meta/Cloner.h"
0012 #include "extensions/jana/JOmniFactory.h"
0013
0014 namespace eicrecon {
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 template <typename T> class Cloner_factory : public JOmniFactory<Cloner_factory<T>, NoConfig> {
0030
0031 public:
0032 using FactoryT = JOmniFactory<Cloner_factory<T>, NoConfig>;
0033 using AlgoT = Cloner<T>;
0034
0035 private:
0036 std::unique_ptr<AlgoT> m_algo;
0037
0038 typename FactoryT::template PodioInput<T> m_input{this};
0039 typename FactoryT::template PodioOutput<T> m_output{this};
0040
0041 public:
0042 void Configure() {
0043 m_algo = std::make_unique<AlgoT>(this->GetPrefix());
0044 m_algo->level(static_cast<algorithms::LogLevel>(this->logger()->level()));
0045 m_algo->init();
0046 }
0047
0048 void Process(int32_t , uint64_t ) {
0049 m_algo->process({m_input()}, {m_output().get()});
0050 }
0051 };
0052
0053 }