Size of ROOT files

Hi,

I have some problems with the fact that my root files are too big (tens of GB).
I am trying to remove trees i don’t need when i run my main.mac file:
/gate/output/root/setRootSinglesAdderFlag 0
/gate/output/root/setRootSinglesReadoutFlag 0
/gate/output/root/setRootHitFlag 0
/gate/output/root/setRootSinglesFlag 0
/gate/output/root/setRootCoincidencesFlag 1

However, I don’t seem to gain much.
Am I doing something wrong?

Ludovica

Hi Ludovica, what are these /gate/output/root/setRootSinglesReadoutFlag flags? They seem to be related to some third-party (non-ROOT) application that produces the files: if that’s the case, you might have better luck getting in touch with the maintainers of that application.

Otherwise you can use TTree::Print() to check the size of your trees and figure out which ones occupy so much space:

$ root yourfile.root
root [0] sometree->Print()
******************************************************************************
*Tree    :t         : t                                                      *
*Entries :       10 : Total =             947 bytes  File  Size =        446 *
*        :          : Tree compression factor =   1.36                       *
******************************************************************************
*Br    0 :x         : x/l                                                    *
*Entries :       10 : Total  Size=        622 bytes  File Size  =        107 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.36     *
*............................................................................*

“File size” should be the interesting number for you, representing how much space the TTree occupies on file.

Cheers,
Enrico

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