1 #ifndef EventSynchronisationBase_h__
2 #define EventSynchronisationBase_h__
4 #include "eudaq/DetectorEvent.hh"
5 #include "eudaq/FileSerializer.hh"
19 typedef std::queue<std::shared_ptr<eudaq::Event>> eventqueue_t;
21 int AddDetectorElementToProducerQueue(
22 int fileIndex, std::shared_ptr<eudaq::DetectorEvent> dev);
23 virtual bool SyncFirstEvent();
24 virtual bool SyncNEvents(
size_t N);
25 virtual bool getNextEvent(std::shared_ptr<eudaq::DetectorEvent> &ev);
28 compareTLUwithEventQueue(std::shared_ptr<eudaq::Event> &tlu_event,
29 SyncBase::eventqueue_t &event_queue);
31 compareTLUwithEventQueues(std::shared_ptr<eudaq::Event> &tlu_event);
33 void storeCurrentOrder();
34 bool Event_Queue_Is_Empty();
35 bool SubEventQueueIsEmpty(
int i);
36 void event_queue_pop();
37 void event_queue_pop_TLU_event();
38 void makeDetectorEvent();
39 void clearDetectorQueue();
46 void PrepareForEvents();
49 eventqueue_t &getQueuefromId(
unsigned producerID);
50 eventqueue_t &getQueuefromId(
unsigned fileIndex,
unsigned eventIndex);
52 eventqueue_t &getFirstTLUQueue();
53 unsigned getUniqueID(
unsigned fileIndex,
unsigned eventIndex);
54 unsigned getTLU_UniqueID(
unsigned fileIndex);
55 std::map<unsigned, size_t> m_ProducerId2Eventqueue;
56 size_t m_registertProducer;
57 std::vector<size_t> m_EventsProFileReader;
60 std::vector<eventqueue_t> m_ProducerEventQueue;
62 std::queue<std::shared_ptr<eudaq::DetectorEvent>> m_DetectorEventQueue;
67 size_t NumberOfEventsToSync_;
68 uint64_t longTimeDiff_;
75 #endif // EventSynchronisationBase_h__
Definition: EventSynchronisationBase.hh:17
virtual ~SyncBase()
Definition: EventSynchronisationBase.hh:43
Definition: DetectorEvent.hh:12