For synchronous data access you can use a DAQ middle layer server called the DAQmonitor that shows It is . The DAQMonitor usually is used to check that the data revived by the DAQ is correct.
But it is also possible to pass the trainID (historically called macropulse) in pydoocs
read methode and ensure related data. For this purpose the DAQmonitor (to be updated !) provides a ring buffer. An example how to read the data from the ring buffer can be found in the repository.
Working DAQ monitor
After taken a DAQ run with the actual DAQ configuration which will be used during the beamtime, you could configure the DAQmonitor by using the taken DAQ run via the DAQdataGUI.