Event Building Algorithm
The event table (TPhDAQEventTable) inherits from TObjArray, it has fixed number of rows and columns. One row per event, one column per subevent. When new frame arrives from a ROC, it will be dispatched to the appropriate slot in the subevent according to event number, ROC ID and offset in the event. When all frames in all subevents is received, the event is being built. It will be then written to the disk buffer, sent to online processing and cleared after that.
In the case of lost synchronization, at some stage the incoming frame should hit the non empty slot, the error will be reported and broken event discarded.