diff --git a/src/libraries/JANA/Topology/JEventPool.h b/src/libraries/JANA/Topology/JEventPool.h index 504fbde2b..8871b1251 100644 --- a/src/libraries/JANA/Topology/JEventPool.h +++ b/src/libraries/JANA/Topology/JEventPool.h @@ -37,18 +37,15 @@ class JEventPool { bool limit_total_events_in_flight, JEventLevel level = JEventLevel::PhysicsEvent) - : m_pool_size(pool_size) - , m_location_count(location_count) - , m_limit_total_events_in_flight(limit_total_events_in_flight) - , m_component_manager(component_manager) - , m_level(level) { - + : m_pool_size(pool_size) + , m_location_count(location_count) + , m_limit_total_events_in_flight(limit_total_events_in_flight) + , m_component_manager(component_manager) + , m_level(level) { + assert(m_location_count >= 1); assert(m_pool_size > 0 || !m_limit_total_events_in_flight); - } - - void init() { m_pools = std::unique_ptr(new LocalPool[m_location_count]()); for (size_t j=0; jinit(); if (m_configure_topology) { m_configure_topology(*this); @@ -262,7 +261,6 @@ void JTopologyBuilder::attach_level(JEventLevel current_level, JUnfoldArrow* par // 0. Pool // -------------------------- JEventPool* pool_at_level = new JEventPool(m_components, m_pool_capacity, m_location_count, m_limit_total_events_in_flight, current_level); - pool_at_level->init(); pools.push_back(pool_at_level); // Hand over ownership of the pool to the topology // -------------------------- diff --git a/src/programs/unit_tests/Components/UnfoldTests.cc b/src/programs/unit_tests/Components/UnfoldTests.cc index 92293eea0..e7a2cf24c 100644 --- a/src/programs/unit_tests/Components/UnfoldTests.cc +++ b/src/programs/unit_tests/Components/UnfoldTests.cc @@ -51,9 +51,6 @@ TEST_CASE("UnfoldTests_Basic") { JMailbox parent_queue {3}; // size JMailbox child_queue {3}; - parent_pool.init(); - child_pool.init(); - auto ts1 = parent_pool.get(); (*ts1)->SetEventNumber(17); @@ -94,9 +91,6 @@ TEST_CASE("FoldArrowTests") { // We only use these to obtain preconfigured JEvents JEventPool parent_pool {jcm, 5, 1, true, JEventLevel::Timeslice}; // size=5, locations=1, limit_total_events_in_flight=true JEventPool child_pool {jcm, 5, 1, true, JEventLevel::PhysicsEvent}; - parent_pool.init(); - child_pool.init(); - // We set up our test cases by putting events on these queues JMailbox*> child_in; diff --git a/src/programs/unit_tests/Engine/ArrowActivationTests.cc b/src/programs/unit_tests/Engine/ArrowActivationTests.cc index ab9eba8c4..11847d614 100644 --- a/src/programs/unit_tests/Engine/ArrowActivationTests.cc +++ b/src/programs/unit_tests/Engine/ArrowActivationTests.cc @@ -27,8 +27,6 @@ TEST_CASE("ArrowActivationTests") { auto p1 = new JEventPool(jcm, 0,1,false); auto p2 = new JEventPool(jcm, 0,1,false); - p1->init(); - p2->init(); auto emit_rand_ints = new RandIntArrow("emit_rand_ints", p1, q1); auto multiply_by_two = new MultByTwoArrow("multiply_by_two", q1, q2); diff --git a/src/programs/unit_tests/Engine/SchedulerTests.cc b/src/programs/unit_tests/Engine/SchedulerTests.cc index 68cac604d..eb4c1678b 100644 --- a/src/programs/unit_tests/Engine/SchedulerTests.cc +++ b/src/programs/unit_tests/Engine/SchedulerTests.cc @@ -23,9 +23,6 @@ TEST_CASE("SchedulerTests") { auto p1 = new JEventPool(jcm, 0,1,false); auto p2 = new JEventPool(jcm, 0,1,false); - p1->init(); - p2->init(); - auto emit_rand_ints = new RandIntArrow("emit_rand_ints", p1, q1); auto multiply_by_two = new MultByTwoArrow("multiply_by_two", q1, q2); auto subtract_one = new SubOneArrow("subtract_one", q2, q3); @@ -110,8 +107,6 @@ TEST_CASE("SchedulerRoundRobinBehaviorTests") { auto p1 = new JEventPool(jcm, 0,1,false); auto p2 = new JEventPool(jcm, 0,1,false); - p1->init(); - p2->init(); auto emit_rand_ints = new RandIntArrow("emit_rand_ints", p1, q1); auto multiply_by_two = new MultByTwoArrow("multiply_by_two", q1, q2); diff --git a/src/programs/unit_tests/Topology/ArrowTests.cc b/src/programs/unit_tests/Topology/ArrowTests.cc index c5613b86b..1aaf84e75 100644 --- a/src/programs/unit_tests/Topology/ArrowTests.cc +++ b/src/programs/unit_tests/Topology/ArrowTests.cc @@ -81,9 +81,6 @@ TEST_CASE("ArrowTests_Basic") { JEventPool pd {jcm, 5, 1, true}; JMailbox qd {2, 1, false}; - pi.init(); - pd.init(); - TestJunctionArrow a {&qi, &pi, &pd, &qd}; EventT* x = nullptr; diff --git a/src/programs/unit_tests/Topology/JPoolTests.cc b/src/programs/unit_tests/Topology/JPoolTests.cc index 85cc10fa4..389d2bc37 100644 --- a/src/programs/unit_tests/Topology/JPoolTests.cc +++ b/src/programs/unit_tests/Topology/JPoolTests.cc @@ -14,7 +14,6 @@ TEST_CASE("JPoolTests_SingleLocationLimitEvents") { auto jcm = app.GetService(); JEventPool pool(jcm, 3, 1, true); - pool.init(); auto* e = pool.get(0); REQUIRE(e != nullptr); @@ -45,7 +44,6 @@ TEST_CASE("JPoolTests_SingleLocationUnlimitedEvents") { auto jcm = app.GetService(); JEventPool pool(jcm, 3, 1, false); - pool.init(); auto* e = pool.get(0); REQUIRE(e != nullptr); diff --git a/src/programs/unit_tests/Topology/TopologyTests.cc b/src/programs/unit_tests/Topology/TopologyTests.cc index 7fe7f99a9..fac0d83dd 100644 --- a/src/programs/unit_tests/Topology/TopologyTests.cc +++ b/src/programs/unit_tests/Topology/TopologyTests.cc @@ -35,8 +35,6 @@ TEST_CASE("JTopology: Basic functionality") { auto p1 = new JEventPool(jcm, 0,1,false); auto p2 = new JEventPool(jcm, 0,1,false); - p1->init(); - p2->init(); auto emit_rand_ints = new RandIntArrow("emit_rand_ints", p1, q1); auto multiply_by_two = new MultByTwoArrow("multiply_by_two", q1, q2);