artdaq_core  v3_00_06
SimpleMemoryReader.hh
1 #ifndef artdaq_core_Core_SimpleMemoryReader_hh
2 #define artdaq_core_Core_SimpleMemoryReader_hh 1
3 
4 #include "artdaq-core/Core/SharedMemoryEventReceiver.hh"
5 #include <thread>
6 #include <memory>
7 
8 namespace artdaq
9 {
20  int SimpleMemoryReaderApp(int argc, char** argv);
21 
27  {
28  public:
35  explicit SimpleMemoryReader( uint32_t shm_key, uint32_t broadcast_key, std::size_t expectedEventCount = 0);
36 
42  void run();
43 
44  private:
48  std::shared_ptr<SharedMemoryEventReceiver> incoming_events_;
52  std::size_t expectedEventCount_;
53  };
54 }
55 
56 #endif /* artdaq_core_Core_SimpleMemoryReader_hh */
void run()
Run until a null pointer is popped off of the RawEventQueue. Throws an excpetion if expectedEventCoun...
SimpleMemoryReader(uint32_t shm_key, uint32_t broadcast_key, std::size_t expectedEventCount=0)
Constructs a SimpleMemoryReader.
SimpleMemoryReader will continue to read RawEvent objects off the queue until it encounters a null po...
int SimpleMemoryReaderApp(int argc, char **argv)
An application which pops items off a RawEventQueue using the SimpleMemoryReader. ...