Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-13 10:09:38

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024 - 2025 Derek Anderson, Wouter Deconinck
0003 
0004 #pragma once
0005 
0006 #include "extensions/jana/JOmniFactory.h"
0007 #include "algorithms/reco/ChargedReconstructedParticleSelector.h"
0008 
0009 namespace eicrecon {
0010 
0011 class ChargedReconstructedParticleSelector_factory
0012     : public JOmniFactory<ChargedReconstructedParticleSelector_factory, NoConfig> {
0013 public:
0014   using AlgoT = eicrecon::ChargedReconstructedParticleSelector;
0015 
0016 private:
0017   // algorithm
0018   std::unique_ptr<AlgoT> m_algo;
0019 
0020   // input collection
0021   PodioInput<edm4eic::ReconstructedParticle> m_pars_in{this, "GeneratedParticles"};
0022 
0023   // output collection
0024   PodioOutput<edm4eic::ReconstructedParticle> m_pars_out{this};
0025 
0026 public:
0027   void Configure() {
0028     m_algo = std::make_unique<AlgoT>(GetPrefix());
0029     m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0030     m_algo->applyConfig(config());
0031     m_algo->init();
0032   }
0033 
0034   void Process(int32_t /* run_number */, uint64_t /* event_number */) {
0035     m_algo->process({m_pars_in()}, {m_pars_out().get()});
0036   }
0037 };
0038 
0039 } // namespace eicrecon