otsdaq  v1_01_02
 All Classes Namespaces Functions
AssociativeMemoryEventBuilder.h
1 #ifndef _ots_AssociativeMemoryEventBuilder_h
2 #define _ots_AssociativeMemoryEventBuilder_h
3 
4 #include "otsdaq-core/EventBuilder/VirtualEventBuilder.h"
5 #include "otsdaq-core/DataDecoders/DataDecoder.h"
6 #include <queue>
7 #include <string>
8 #include <stdint.h>
9 
10 namespace ots
11 {
12 
13 class Event;
14 
16 {
17 public:
18  AssociativeMemoryEventBuilder(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, ConsumerPriority priority);
19  virtual ~AssociativeMemoryEventBuilder(void);
20 
21  void build(const std::string& buffer);
22  std::queue<Event*>& getCompleteEvents(void);
23  std::queue<Event*>& getAllEvents(void);
24 
25 private:
26  std::queue<Event*>& getCompleteEvents(unsigned int bcoDifference);
27  std::map<uint64_t,Event*> memory_;
28  bool bcoIsComplete_;
29  uint64_t currentBCO_;
30  std::queue<uint32_t> convertedBuffer_;
31  DataDecoder theDataDecoder_;
32 
33 
34 };
35 
36 }
37 
38 #endif