otsdaq  v1_01_04
 All Classes Namespaces Functions
VirtualEventBuilder.h
1 #ifndef _ots_VirtualEventBuilder_h_
2 #define _ots_VirtualEventBuilder_h_
3 
4 #include "otsdaq-core/DataManager/DataProducer.h"
5 #include "otsdaq-core/DataManager/DataConsumer.h"
6 #include <string>
7 #include <queue>
8 
9 namespace ots
10 {
11 
12 class Event;
13 
15 {
16 public:
17  VirtualEventBuilder(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID);
18  virtual ~VirtualEventBuilder(void);
19 
20  virtual void build (const std::string& buffer) = 0;
21  virtual std::queue<Event*>& getCompleteEvents(void) = 0;
22  virtual std::queue<Event*>& getAllEvents (void) = 0;
23  void flush (void);
24  //Getters
25  std::string getName(void);
26 
27 protected:
28  bool workLoopThread(toolbox::task::WorkLoop* workLoop);
29  std::queue<Event*> completeEvents_;//The VirtualEventBuilder is the owner of these events and it will delete them after the use!
30 };
31 
32 }
33 
34 #endif