Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-18 08:30:33

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026, ePIC Collaboration
0003 
0004 #pragma once
0005 
0006 #include "algorithms/meta/SortSubsetCollection.h"
0007 #include "extensions/jana/JOmniFactory.h"
0008 #include <cstdint>
0009 #include <memory>
0010 
0011 namespace eicrecon {
0012 
0013 template <class T, auto Accessor>
0014 class SortSubsetCollection_factory
0015     : public JOmniFactory<SortSubsetCollection_factory<T, Accessor>, NoConfig> {
0016 
0017 public:
0018   using AlgoT = eicrecon::SortSubsetCollection<T, decltype(Accessor)>;
0019 
0020 private:
0021   std::unique_ptr<AlgoT> m_algo;
0022 
0023   typename JOmniFactory<SortSubsetCollection_factory<T, Accessor>, NoConfig>::template PodioInput<T>
0024       m_input{this};
0025   typename JOmniFactory<SortSubsetCollection_factory<T, Accessor>,
0026                         NoConfig>::template PodioOutput<T>
0027       m_output{this};
0028 
0029 public:
0030   void Configure() {
0031     m_algo = std::make_unique<AlgoT>(this->GetPrefix(), Accessor);
0032     m_algo->level(static_cast<algorithms::LogLevel>(this->logger()->level()));
0033     m_algo->applyConfig(this->config());
0034     m_algo->init();
0035   }
0036 
0037   void Process(int32_t /* run_number */, uint64_t /* event_number */) {
0038     m_algo->process({m_input()}, {m_output().get()});
0039   };
0040 };
0041 
0042 } // namespace eicrecon