artdaq_core  v1_07_01
 All Classes Namespaces Functions
GlobalQueue.hh
1 #ifndef artdaq_core_Core_GlobalQueue_hh
2 #define artdaq_core_Core_GlobalQueue_hh
3 
4 #include "artdaq-core/Core/ConcurrentQueue.hh"
5 #include "artdaq-core/Data/RawEvent.hh"
6 #include <memory>
7 
8 namespace artdaq {
9  typedef std::shared_ptr<RawEvent> RawEvent_ptr;
10  typedef daqrate::ConcurrentQueue<RawEvent_ptr> RawEventQueue;
11  typedef daqrate::ConcurrentQueue<RawEvent_ptr>::SizeType SizeType;
12 
13  // The first thread to call getGlobalQueue() causes the creation of
14  // the queue. The queue will be destroyed at static destruction
15  // time.
16  RawEventQueue & getGlobalQueue(SizeType maxSize=std::numeric_limits<SizeType>::max());
17 }
18 
19 #endif /* artdaq_core_Core_GlobalQueue_hh */