rootFileSizeTools.h
Go to the documentation of this file.
1 #ifndef art_Framework_IO_Root_detail_rootFileSizeTools_h
2 #define art_Framework_IO_Root_detail_rootFileSizeTools_h
3 //
4 // Utilties for finding the size on disk of TTrees and TBranches
5 // Adapted from code given by Philippe Canal, pcanal@fnal.gov.
6 //
7 // This is known to work for root 5.34.*
8 
9 #include "TBranch.h"
10 #include "TObjArray.h"
11 #include "TTree.h"
12 
13 namespace art {
14  namespace detail {
15 
16  Long64_t GetBasketSize(TObjArray* branches, bool ondisk, bool inclusive);
17  Long64_t GetBasketSize(TBranch* b, bool ondisk, bool inclusive);
18  Long64_t GetTotalSize(TBranch* br, bool ondisk, bool inclusive);
19  Long64_t GetTotalSize(TObjArray* branches, bool ondisk);
20  Long64_t GetTotalSize(TTree* t, bool ondisk);
21  Long64_t sizeOnDisk(TTree* t);
22  Long64_t sizeOnDisk(TBranch* branch, bool inclusive);
23  void printBranchSummary(std::ostream& os, TBranch* br);
24  void printTreeSummary(std::ostream& os, TTree* t);
25 
26  } // namespace detail
27 } // namespace art
28 
29 #endif /* art_Framework_IO_Root_detail_rootFileSizeTools_h */
30 
31 // Local Variables:
32 // mode: c++
33 // End:
Long64_t GetTotalSize(TBranch *br, bool ondisk, bool inclusive)
void printBranchSummary(std::ostream &os, TBranch *br)
Long64_t GetBasketSize(TObjArray *branches, bool ondisk, bool inclusive)
void printTreeSummary(std::ostream &os, TTree *t)
Long64_t sizeOnDisk(TTree *t)