Invalid parameter "buffer" in Write() function

ROOT Version: 6.20.02
Platform: Centos7
Compiler: gcc830

When writing a very large TObject(contains millions of pointer to other TObject) to root File, I found that there is a huge memory cost so that it must be killed. I tried to change the buffersize in “Write()” function, but seemed the same, the memory cost curve is the same to the default buffersize.
Is there any methods to avoid the memory cost?

Maybe @pcanal can answer to this question

If save as single ROOT I/O operation there is, by definition, no way to reduce the cost unless you can afford disk space and can disable compression. (The memory is cost is essentially twice the size of the object, one for the buffer holding the platform independent representation of the object and one to hold the compressed version).

To further save memory, you could try to split the object (i.e as a split branch in inside a TTree). If you data model does not allow this (i.e. is in a form that can be effectively split), then you will need to do some manual split (i.e. store the data member and/or collection that are inside the main object “by hand”).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.