Closed csullivan closed 8 years ago
This is particularly useful in my case as I have GrandRaiden spectrograph data and CAGRA geb data coming from different sources online, whereas in the S800/Gretina case, the S800 data is written directly into the Gretina data stream. Nonetheless, I submitted this as a pull request hoping that you can see if this still works for your standard workflow. Thanks.
every thing looks good. A tree made from multiple files before this commit and a tree made from the same multiple files after the commit match exactly for me. It won't let me do a merge from here do to conflicts but I will get this incorporated shortly.
Motivation:
Prior to this, TMultiRawFile did not handle the case in which multiple data sources are read and time correlated online. This pull request adds that functionality.
Details:
If ExitAfterSort (-q) is not specified, a TMultiRawFile source (-m) will not close a subordinate source when it reaches the last of its events. Instead it will enter a stalled source state and will wait until a new event arrives for that source. This ensures correct time ordering during online runs. It should be noted that this will prevent the processing of other files in the TMultiRawFile until more data arrives for the stalled source. If this behavior is not desired, then either the -m flag should not be specified when processing multiple data files, or -mq should be used, in which case the TMultiRawFile will never enter a stalled state as data will be processed in offline mode.