Skip to content

Commit

Permalink
Remove JEventProcessorArrow
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed Oct 17, 2024
1 parent 0322185 commit dc13597
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 97 deletions.
19 changes: 10 additions & 9 deletions src/examples/SubeventCUDAExample/SubeventCUDAExample.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include <JANA/JApplication.h>
#include <JANA/JObject.h>
#include <JANA/Engine/JSubeventArrow.h>
#include <JANA/JEventSource.h>
#include <JANA/JEventProcessor.h>
#include "JANA/Engine/JTopologyBuilder.h"
#include <JANA/Topology/JSubeventArrow.h>


struct MyInput : public JObject {
Expand Down Expand Up @@ -128,8 +128,7 @@ int main() {
JMailbox <SubeventWrapper<MyOutput>> subevents_out;

auto split_arrow = new JSplitArrow<MyInput, MyOutput>("split", &processor, &events_in, &subevents_in);
auto subprocess_arrow = new JSubeventArrow<MyInput, MyOutput>("subprocess", &processor, &subevents_in,
&subevents_out);
auto subprocess_arrow = new JSubeventArrow<MyInput, MyOutput>("subprocess", &processor, &subevents_in, &subevents_out);
auto merge_arrow = new JMergeArrow<MyInput, MyOutput>("merge", &processor, &subevents_out, &events_out);

JApplication app;
Expand All @@ -140,12 +139,14 @@ int main() {
source->SetNEvents(10); // limit ourselves to 10 events. Note that the 'jana:nevents' param won't work
// here because we aren't using JComponentManager to manage the EventSource

auto topology = app.GetService<JTopologyBuilder>()->create_empty();
auto source_arrow = new JEventSourceArrow("simpleSource",
{source},
&events_in,
topology->event_pool);
auto proc_arrow = new JEventProcessorArrow("simpleProcessor", &events_out, nullptr, topology->event_pool);
auto topology = app.GetService<JTopologyBuilder>();
auto source_arrow = new JEventSourceArrow("simpleSource", {source});
source_arrow->set_input(topology->event_pool);
source_arrow->set_output(&events_in);

auto proc_arrow = new JEventMapArrow("simpleProcessor");
proc_arrow->set_input(&events_out);
proc_arrow->set_output(topology->event_pool);
proc_arrow->add_processor(new SimpleProcessor);

topology->arrows.push_back(source_arrow);
Expand Down
6 changes: 3 additions & 3 deletions src/examples/SubeventExample/SubeventExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <JANA/JEventProcessor.h>

#include <JANA/Topology/JEventSourceArrow.h>
#include <JANA/Topology/JEventProcessorArrow.h>
#include <JANA/Topology/JEventMapArrow.h>
#include <JANA/Topology/JSubeventArrow.h>
#include "JANA/Topology/JTopologyBuilder.h"
#include <JANA/Topology/JTopologyBuilder.h>


struct MyInput : public JObject {
Expand Down Expand Up @@ -111,7 +111,7 @@ int main() {
source_arrow->set_input(topology->event_pool);
source_arrow->set_output(&events_in);

auto proc_arrow = new JEventProcessorArrow("simpleProcessor");
auto proc_arrow = new JEventMapArrow("simpleProcessor");
proc_arrow->set_input(&events_out);
proc_arrow->set_output(topology->event_pool);
proc_arrow->add_processor(new SimpleProcessor);
Expand Down
1 change: 0 additions & 1 deletion src/libraries/JANA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set(JANA2_SOURCES
Engine/JPerfMetrics.cc
Engine/JPerfSummary.cc

Topology/JEventProcessorArrow.cc
Topology/JEventSourceArrow.cc
Topology/JEventMapArrow.cc
Topology/JEventTapArrow.cc
Expand Down
58 changes: 0 additions & 58 deletions src/libraries/JANA/Topology/JEventProcessorArrow.cc

This file was deleted.

22 changes: 0 additions & 22 deletions src/libraries/JANA/Topology/JEventProcessorArrow.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/libraries/JANA/Topology/JTopologyBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#include "JTopologyBuilder.h"

#include "JEventSourceArrow.h"
#include "JEventProcessorArrow.h"
#include "JEventMapArrow.h"
#include "JEventTapArrow.h"
#include "JUnfoldArrow.h"
#include "JFoldArrow.h"
#include <JANA/JEventProcessor.h>
#include <JANA/Utils/JTablePrinter.h>


Expand Down
4 changes: 3 additions & 1 deletion src/libraries/JANA/Utils/JCallGraphEntryMaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
/// (and possibly other places).
class JCallGraphEntryMaker{
public:

JCallGraphEntryMaker(JCallGraphRecorder &callgraphrecorder, JFactory *factory) : m_call_graph(callgraphrecorder), m_factory(factory){
m_call_graph.StartFactoryCall(m_factory->GetObjectName(), m_factory->GetTag());
}

JCallGraphEntryMaker(JCallGraphRecorder &callgraphrecorder, std::string name) : m_call_graph(callgraphrecorder) {
// (This is used mainly for JEventProcessors and called from JEventProcessorArrow::execute )
// This is used mainly for JEventProcessors
m_call_graph.StartFactoryCall(name, "");
}

Expand Down
5 changes: 3 additions & 2 deletions src/programs/unit_tests/Topology/SubeventTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

#include <JANA/JObject.h>
#include <JANA/JEvent.h>
#include <JANA/JEventProcessor.h>
#include <JANA/Topology/JEventSourceArrow.h>
#include <JANA/Topology/JEventProcessorArrow.h>
#include <JANA/Topology/JEventMapArrow.h>
#include <JANA/Topology/JSubeventArrow.h>
#include <JANA/Topology/JTopologyBuilder.h>

Expand Down Expand Up @@ -105,7 +106,7 @@ TEST_CASE("Basic subevent arrow functionality") {
source_arrow->set_input(topology.event_pool);
source_arrow->set_output(&events_in);

auto proc_arrow = new JEventProcessorArrow("simpleProcessor");
auto proc_arrow = new JEventMapArrow("simpleProcessor");
proc_arrow->set_input(&events_out);
proc_arrow->set_output(topology.event_pool);
proc_arrow->add_processor(new SimpleProcessor);
Expand Down

0 comments on commit dc13597

Please sign in to comment.