File indexing completed on 2025-01-18 10:17:18
0001
0002
0003
0004
0005 #include "DstExampleFactory.h"
0006 #include "DataObjects.h"
0007
0008 #include <JANA/JEvent.h>
0009
0010 void DstExampleFactory::Init() {
0011
0012
0013
0014
0015
0016 EnableGetAs<JObject>();
0017 EnableGetAs<Renderable>();
0018 }
0019
0020 void DstExampleFactory::ChangeRun(const std::shared_ptr<const JEvent>&) {
0021 }
0022
0023 void DstExampleFactory::Process(const std::shared_ptr<const JEvent> &event) {
0024
0025 auto inputs = event->Get<MyRenderableJObject>("from_source");
0026
0027 std::vector<MyRenderableJObject*> results;
0028
0029 for (auto input : inputs) {
0030
0031 auto mrj = new MyRenderableJObject(input->x + 1, input->y + 1, input->E + 1);
0032 results.push_back(mrj);
0033 }
0034
0035 Set(results);
0036 }