Hi Yun-Ha, > Is it possible to run safely another thread to get those data from the it is very hard to do. When one thread is writing TTree, part of information in ROOT memory, part in system I/O buffers, part in a file. Another thread, for correct work, must exactly know it, and be synchronized. The only way, I see, the first thread must periodically save info into file and flush I/O buffers and close the file. Then, at least, part of info will be accessible by second thread from the file. Victor Yun-Ha Shin wrote: > > Hi, > > Is it possible to use TTree/TNtuple with multiple threads ? > > For example, one thread is writing/filling data to TTree continuously. > Sometimes later it is required to look at some part of the data in the > Tree. > Is it possible to run safely another thread to get those data from the > Tree > without corrupting Tree; like a producer-consumer ? > > Thanks, > Yun-Ha. -- Victor M. Perevoztchikov perev@bnl.gov perev@vxcern.cern.ch Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000 tel office : 631-344-7894; fax 631-344-4206; home 631-345-2690
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:24 MET