58 for(
size_t i = 0; i <
n; ++ i ) {
59 result += GetBasketSize(
dynamic_cast<TBranch*
>( branches->
At( i ) ), ondisk, inclusive );
67 if (ondisk &&
b->GetZipBytes() > 0) {
68 result =
b->GetZipBytes();
70 result =
b->GetTotBytes();
73 result += GetBasketSize(
b->GetListOfBranches(), ondisk,
true);
85 f.WriteObject(br,
"thisbranch");
86 TKey* key =
f.GetKey(
"thisbranch");
92 return GetBasketSize(br, ondisk, inclusive) + size;
98 for(
size_t i = 0; i <
n; ++ i ) {
99 result += GetTotalSize(
dynamic_cast<TBranch*
>( branches->
At( i ) ), ondisk,
true );
100 cerr <<
"After " << branches->
At( i )->
GetName() <<
" " << result << endl;
127 ondiskSize += GetBasketSize(t->
GetBranchRef(),
true,
true);
129 totalSize += GetBasketSize(t->
GetBranchRef(),
false,
true);
142 return GetTotalSize(t,
true);
151 return GetTotalSize(branch,
true, inclusive);
154void printBranchSummary(
TBranch *br)
156 cout <<
"The branch \"" << br->
GetName() <<
"\" takes " << sizeOnDisk(br,
true) <<
" bytes on disk\n";
158 for(
size_t i = 0; i <
n; ++ i ) {
160 cout <<
" Its sub-branch \"" << subbr->
GetName() <<
"\" takes " << sizeOnDisk(subbr,
true) <<
" bytes on disk\n";
164void printTreeSummary(
TTree *t)
166 cout <<
"The TTree \"" << t->
GetName() <<
"\" takes " << sizeOnDisk(t) <<
" bytes on disk\n";
168 for(
size_t i = 0; i <
n; ++ i ) {
170 cout <<
" Its branch \"" << br->
GetName() <<
"\" takes " << sizeOnDisk(br,
true) <<
" bytes on disk\n";
A TTree is a list of TBranches.
TObjArray * GetListOfBranches()
virtual TKey * GetKey(const char *, Short_t=9999) const
Int_t GetCompressionSettings() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
A TMemFile is like a normal TFile except that it reads and writes only from memory.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const
virtual const char * GetName() const
Returns name of object.
A TTree represents a columnar dataset.
TFile * GetCurrentFile() const
Return pointer to the current file.
TDirectory * GetDirectory() const
virtual TBranchRef * GetBranchRef() const
virtual TObjArray * GetListOfBranches()