0.0160489082336
3.79758787155
Processing /mnt/build/workspace/root-makedoc-v612/rootspi/rdoc/src/v6-12-00-patches/tutorials/tree/treefriend.C...
******************************************************************************
*Tree :T : test friend trees *
*Entries : 10000 : Total = 203762 bytes File Size = 94821 *
* : : Tree compression factor = 1.69 *
******************************************************************************
*Br 0 :Run : Run/I *
*Entries : 10000 : Total Size= 40698 bytes File Size = 265 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 120.75 *
*............................................................................*
*Br 1 :Event : Event/I *
*Entries : 10000 : Total Size= 40712 bytes File Size = 11231 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.85 *
*............................................................................*
*Br 2 :x : x/F *
*Entries : 10000 : Total Size= 40684 bytes File Size = 27116 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.18 *
*............................................................................*
*Br 3 :y : y/F *
*Entries : 10000 : Total Size= 40684 bytes File Size = 27035 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.18 *
*............................................................................*
*Br 4 :z : z/F *
*Entries : 10000 : Total Size= 40684 bytes File Size = 29174 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.10 *
*............................................................................*
******************************************************************************
*Tree :TF : test friend trees *
*Entries : 8460 : Total = 375780 bytes File Size = 128540 *
* : : Tree compression factor = 1.69 *
******************************************************************************
*Br 0 :Run : Run/I *
*Entries : 8460 : Total Size= 34463 bytes File Size = 374 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 90.84 *
*............................................................................*
*Br 1 :Event : Event/I *
*Entries : 8460 : Total Size= 34475 bytes File Size = 12152 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 2.80 *
*............................................................................*
*Br 2 :x : x/F *
*Entries : 8460 : Total Size= 34451 bytes File Size = 28849 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 1.18 *
*............................................................................*
*Br 3 :y : y/F *
*Entries : 8460 : Total Size= 34451 bytes File Size = 28757 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 1.18 *
*............................................................................*
*Br 4 :z : z/F *
*Entries : 8460 : Total Size= 34451 bytes File Size = 30674 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 1.11 *
*............................................................................*
nok = 8460, fentries=8460
void CreateParentTree() {
TFile *f =
new TFile(
"treeparent.root",
"recreate");
T->
Branch(
"Run",&Run,
"Run/I");
T->
Branch(
"Event",&Event,
"Event/I");
for (
Int_t i=0;i<10000;i++) {
if (i < 5000) Run = 1;
else Run = 2;
Event = i;
}
delete f;
}
void CreateFriendTree() {
TFile *ff =
new TFile(
"treefriend.root",
"recreate");
delete ff;
}
void CompareTrees() {
if (fRun == Run && fEvent==Event && x==fx && y==fy &&z==fz) {
nok++;
} else {
if (i <100) printf("i=%lld, Run=%d, Event=%d, x=%g, y=%g, z=%g, : fRun=%d, fEvent=%d, fx=%g, fy=%g, fz=%g\n",i,Run,Event,x,y,z,fRun,fEvent,fx,fy,fz);
}
}
}
printf(
"nok = %d, fentries=%lld\n",nok,TF->
GetEntries());
delete f;
delete ff;
}
void DrawFriend() {
}
void treefriend() {
CreateParentTree();
CreateFriendTree();
CompareTrees();
DrawFriend();
}