Problem with h2root

Hi,

I want to convert .hbook file to root file, but it gives the following error,
could you please help me…
Actually it converts, but the ntuple doesn’t contain any event, whereas in hbook
it has many events.

Thanks Rafayel

ifarml4> h2root gp_nspec_test.hbook
RZOPEN. Cannot determine record length - EXCHANGE mode is used.
Converting directory //example
Converting CWN with ID= 10, nentries = -1
Creating branch:nevt, block:KINE, fullname:nevt/i, nsub=0, itype=3, isize=4, ielem=1
Creating branch:evstat, block:KINE, fullname:evstat/I, nsub=0, itype=2, isize=4, ielem=1
Creating branch:Eg, block:KINE, fullname:Eg/F, nsub=0, itype=1, isize=4, ielem=1
Creating branch:Wp, block:KINE, fullname:Wp/F, nsub=0, itype=1, isize=4, ielem=1
Creating branch:Q2g, block:KINE, fullname:Q2g/F, nsub=0, itype=1, isize=4, ielem=1
Creating branch:t_t, block:KINE, fullname:t_t/F, nsub=0, itype=1, isize=4, ielem=1
Creating branch:M_t, block:KINE, fullname:M_t/F, nsub=0, itype=1, isize=4, ielem=1
Creating branch:gnpart, block:GENER, fullname:gnpart/I, nsub=0, itype=2, isize=4, ielem=1
Creating branch:stcod, block:GENER, fullname:stcod[gnpart]/b, nsub=1, itype=3, isize=4, ielem=20
Creating branch:pid, block:GENER, fullname:pid[gnpart]/S, nsub=1, itype=2, isize=4, ielem=20
Creating branch:prntid, block:GENER, fullname:prntid[gnpart]/b, nsub=1, itype=3, isize=4, ielem=20
Creating branch:theta, block:GENER, fullname:theta[gnpart]/F, nsub=1, itype=1, isize=4, ielem=20
Creating branch:phi, block:GENER, fullname:phi[gnpart]/F, nsub=1, itype=1, isize=4, ielem=20
Creating branch:pm, block:GENER, fullname:pm[gnpart]/F, nsub=1, itype=1, isize=4, ielem=20
Creating branch:m, block:GENER, fullname:m[gnpart]/F, nsub=1, itype=1, isize=4, ielem=20


*Tree :h10 : hien *
*Entries : 0 : Total = 9566 bytes File Size = 0 *

  •    :          : Tree compression factor =   1.00                       *
    

*Br 0 :nevt : nevt/i *
*Entries : 0 : Total Size= 618 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 1 :evstat : evstat/I *
*Entries : 0 : Total Size= 630 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 2 :Eg : Eg/F *
*Entries : 0 : Total Size= 606 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 3 :Wp : Wp/F *
*Entries : 0 : Total Size= 606 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 4 :Q2g : Q2g/F *
*Entries : 0 : Total Size= 612 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 5 :t_t : t_t/F *
*Entries : 0 : Total Size= 612 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 6 :M_t : M_t/F *
*Entries : 0 : Total Size= 612 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 7 :gnpart : gnpart/I *
*Entries : 0 : Total Size= 630 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 8 :stcod : stcod[gnpart]/b *
*Entries : 0 : Total Size= 713 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 9 :pid : pid[gnpart]/S *
*Entries : 0 : Total Size= 703 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 10 :prntid : prntid[gnpart]/b *
*Entries : 0 : Total Size= 719 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 11 :theta : theta[gnpart]/F *
*Entries : 0 : Total Size= 719 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 12 :phi : phi[gnpart]/F *
*Entries : 0 : Total Size= 707 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

*Br 13 :pm : pm[gnpart]/F *
*Entries : 0 : Total Size= 701 bytes One basket in memory *
*Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

Br 14 :m : m[gnpart]/F *
Entries : 0 : Total Size= 695 bytes One basket in memory *
Baskets : 0 : Basket Size= 64000 bytes Compression= 1.00 *

TFile
gp_nspec_test.root HBOOK file: gp_nspec_test.hbook converted to ROOT
TFile
gp_nspec_test.root HBOOK file: gp_nspec_test.hbook converted to ROOT
KEY: TTree h10;1 hien

Could you post the original hbook file/ It looks like the conversion is OK

Rene

Hi,

I The hbook is quite big, I can’t attaci it.
but today I saw this`
root.cern.ch/phpBB2/viewtopic.ph … ble+h2root

It seems the probleme is the same, in root file again h61->GetEntries() = -1;
And probably the problem conected to hbook file.