Warning, file /EICrecon/src/factories/calorimetry/CalorimeterParticleIDPreML_factory.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/onnx/CalorimeterParticleIDPreML.h"
0007 #include "services/algorithms_init/AlgorithmsInit_service.h"
0008 #include "extensions/jana/JOmniFactory.h"
0009
0010 namespace eicrecon {
0011
0012 class CalorimeterParticleIDPreML_factory
0013 : public JOmniFactory<CalorimeterParticleIDPreML_factory, NoConfig> {
0014
0015 public:
0016 using AlgoT = eicrecon::CalorimeterParticleIDPreML;
0017
0018 private:
0019 std::unique_ptr<AlgoT> m_algo;
0020
0021 PodioInput<edm4eic::Cluster> m_cluster_input{this};
0022 PodioInput<edm4eic::MCRecoClusterParticleAssociation> m_cluster_assoc_input{this};
0023
0024 PodioOutput<edm4eic::Tensor> m_feature_tensor_output{this};
0025 PodioOutput<edm4eic::Tensor> m_target_tensor_output{this};
0026
0027 public:
0028 void Configure() {
0029 m_algo = std::make_unique<AlgoT>(GetPrefix());
0030 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0031 m_algo->applyConfig(config());
0032 m_algo->init();
0033 }
0034
0035 void Process(int32_t , uint64_t ) {
0036 m_algo->process({m_cluster_input(), m_cluster_assoc_input()},
0037 {m_feature_tensor_output().get(), m_target_tensor_output().get()});
0038 }
0039 };
0040
0041 }