Data acquisition based on ROOT

I want to ask for your expert advice regarding building a data acquisition based on ROOT, as I am starting my Phd and have no previous experience with DAQ software.

My idea is the following:
1) DAQ: Run a process that reads data from VME modules and saves them to the hard drive.
2) Run an indepent process that monitorizes the DAQ, so that if it crashes, the process 1) will not stop.

I would solve that the following way, but I would like to know other more efficient ways to do that:

The first program:

  • The DAQ is stored in a TTree with branches, being each branch each one of the modules.
  • It reads the data of each of the modules each time that its buffer is full, and stores them (uint32_t rawdata[1024] for each branch) in one entry of the tree: tree->Fill().
    - When finishing the DAQ, I write the tree into a TFile, so that I have the raw Data stored savely.
    * If I set AutoFlush to 1000, then the tree will flush the entries to the disk periodically (each 1000) so that the RAM memory under use will not be increased permanently, right?

The second program, which should run parallel in time but independent (on another terminal shell/root session):
- It opens the TFile of the first program and gets the tree. Should I specify to do it with ReadOnly Mode? how?.
- It gets the N entries and monitorizes them in histograms.
- When finishing/or after sime timeout, it opens again the TFile, gets N’ entries and looks if there are new entries (N’>N), if yes it adds them (N’-N) to the preexisting histograms, if not, it waits until new entries are found.
* Is there are more efficient way to “refresh” the tree, or just open TFile again completely and starting to read from the entry N until N’?

* Is there a more efficent approach to these two programs, like sending “baskets” from process 1 to process 2 although being independent process, accesing from program 2 the memory of the process 1 instead opening new TFiles and trees that increase the memory consumed? cache, streaming, or bus? How?

Thank you in advance,