Hi, > The latter will be bad for speed concern if we only want > the first entry. It is later. It is assumed that in the most general case you would want to read the next event after that (reading 32K at in one disk read is more efficient that reading several time 800 bytes). However, the size of the buffer is totally customizable. When creating the branch, one of the argument is the size of the buffer to be used. As a test you can try to set this buffer size to be 1000bytes (for that branch). This will insures that only one of your array will fit in the basket. Hence, doing: br.GetEvent(0); would probably be faster but doing br.GetEvent(0); br.GetEvent(1); should be slower. You can vary the buffer size to optimize whichever case is most important to you. Note that by chosing smaller buffer size, you also lose some opportunity for compression (hence smaller buffer size might lead to larger file). Cheers, Philippe. -----Original Message----- From: HP Wei [mailto:hp@rentec.com] Sent: Monday, December 09, 2002 5:33 PM To: pcanal@fnal.gov Cc: roottalk@pcroot.cern.ch Subject: RE: [ROOT] need info on low level stuff hi Philippe thanks for sheding some light. Here is another question: Suppose we have one branch with buffer size of 32000. br : Double_t d[100] Let's say there are millions of entries. If we do br.GetEvent(0); will ROOT extract into the buffer 800 bytes of data which contain only the array in the first entry ? Or will it extract 3992*8 bytes of data which contain many entries in addtion to the first entry ? The latter will be bad for speed concern if we only want the first entry. thanks, HP
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:23 MET