File indexing completed on 2025-01-18 10:01:38
0001
0002
0003
0004 #pragma once
0005
0006 #include <JANA/Components/JOmniFactory.h>
0007 #include <PodioDatamodel/ExampleClusterCollection.h>
0008
0009
0010 struct MyClusterFactory : public JOmniFactory<MyClusterFactory> {
0011
0012 PodioInput<ExampleCluster> m_protoclusters_in {this};
0013 PodioOutput<ExampleCluster> m_clusters_out {this};
0014
0015
0016 void Configure() {
0017 }
0018
0019 void ChangeRun(int32_t ) {
0020 }
0021
0022 void Execute(int32_t , uint64_t ) {
0023
0024 auto cs = std::make_unique<ExampleClusterCollection>();
0025
0026 for (auto protocluster : *m_protoclusters_in()) {
0027 auto cluster = MutableExampleCluster(protocluster.energy() + 1000);
0028 cluster.addClusters(protocluster);
0029 cs->push_back(cluster);
0030 }
0031
0032 m_clusters_out() = std::move(cs);
0033 }
0034 };
0035
0036