Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:36

0001 
0002 // Copyright 2020, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 
0005 #pragma once
0006 #include <JANA/Topology/JArrow.h>
0007 
0008 
0009 class JEventSourceArrow : public JArrow {
0010 public:
0011     enum PortIndex {EVENT_IN=0, EVENT_OUT=1};
0012 
0013 private:
0014     std::vector<JEventSource*> m_sources;
0015     size_t m_current_source = 0;
0016     bool m_barrier_active = false;
0017     JEvent* m_pending_barrier_event = nullptr;
0018 
0019 public:
0020     JEventSourceArrow(std::string name, std::vector<JEventSource*> sources);
0021 
0022     void initialize() final;
0023     void finalize() final;
0024     void fire(JEvent* input, OutputData& outputs, size_t& output_count, JArrow::FireResult& status);
0025 };
0026