root [] printBranchSummary(
tree->GetBranch(
"event"));
The branch "event" takes 3760313 bytes on disk
Its sub-branch "TObject" takes 581 bytes on disk
Its sub-branch "fType[20]" takes 640 bytes on disk
Its sub-branch "fEventName" takes 855 bytes on disk
Its sub-branch "fNtrack" takes 506 bytes on disk
Its sub-branch "fNseg" takes 554 bytes on disk
Its sub-branch "fNvertex" takes 507 bytes on disk
Its sub-branch "fFlag" takes 420 bytes on disk
Its sub-branch "fTemperature" takes 738 bytes on disk
Its sub-branch "fMeasures[10]" takes 1856 bytes on disk
Its sub-branch "fMatrix[4][4]" takes 4563 bytes on disk
Its sub-branch "fClosestDistance" takes 2881 bytes on disk
Its sub-branch "fEvtHdr" takes 847 bytes on disk
Its sub-branch "fTracks" takes 3673982 bytes on disk
Its sub-branch "fHighPt" takes 59640 bytes on disk
Its sub-branch "fMuons" takes 1656 bytes on disk
Its sub-branch "fLastTrack" takes 785 bytes on disk
Its sub-branch "fWebHistogram" takes 596 bytes on disk
Its sub-branch "fH" takes 10076 bytes on disk
Its sub-branch "fTriggerBits" takes 1699 bytes on disk
Its sub-branch "fIsValid" takes 366 bytes on disk
void printSizes() {
}
for(
size_t i = 0; i <
n; ++ i ) {
result += GetBasketSize(
dynamic_cast<TBranch*
>( branches->
At( i ) ), ondisk, inclusive );
}
return result;
}
if (ondisk &&
b->GetZipBytes() > 0) {
result =
b->GetZipBytes();
} else {
result =
b->GetTotBytes();
}
if (inclusive) {
result += GetBasketSize(
b->GetListOfBranches(), ondisk,
true);
}
return result;
}
return result;
}
}
f.WriteObject(br,
"thisbranch");
TKey* key =
f.GetKey(
"thisbranch");
if (ondisk)
else
return GetBasketSize(br, ondisk, inclusive) + size;
}
for(
size_t i = 0; i <
n; ++ i ) {
result += GetTotalSize(
dynamic_cast<TBranch*
>( branches->
At( i ) ), ondisk,
true );
cerr <<
"After " << branches->
At( i )->
GetName() <<
" " << result << endl;
}
return result;
}
}
if (key) {
} else {
}
}
if (ondisk) {
} else {
}
}
if (ondisk) {
} else {
}
}
return GetTotalSize(t, true);
}
{
return GetTotalSize(branch, true, inclusive);
}
void printBranchSummary(
TBranch *br)
{
cout <<
"The branch \"" << br->
GetName() <<
"\" takes " << sizeOnDisk(br,
true) <<
" bytes on disk\n";
for(
size_t i = 0; i <
n; ++ i ) {
cout <<
" Its sub-branch \"" << subbr->
GetName() <<
"\" takes " << sizeOnDisk(subbr,
true) <<
" bytes on disk\n";
}
}
void printTreeSummary(
TTree *t)
{
cout <<
"The TTree \"" << t->
GetName() <<
"\" takes " << sizeOnDisk(t) <<
" bytes on disk\n";
for(
size_t i = 0; i <
n; ++ i ) {
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.
TFile * GetCurrentFile() const
Return pointer to the current file.
TDirectory * GetDirectory() const
virtual TBranchRef * GetBranchRef() const
virtual TObjArray * GetListOfBranches()