Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:39

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/Streaming/JWindow.h>
0007 
0008 /// JTrivialWindow emits a new JEvent for each JMessage it receives. This may be useful for simple
0009 /// scenarios such as anomaly detection, or when events have already been built upstream so that
0010 /// each JMessage corresponds to one event already.
0011 template <typename T>
0012 class JTrivialWindow : public JWindow<T> {
0013 public:
0014     void pushMessage(T* message) final;
0015     bool pullEvent(JEvent& event) final;
0016 private:
0017     std::deque<T*> m_pending_messages;
0018 };
0019