Dear rooters,
I have 1573 root files, and I wanted to merge them, so I used the hadd tool, to do the job. When I opened the produced root file, I found two directories:
[ul]
events;1 (Number of Entries: 136965)
events;2 (Number of Entries: 93882)
[/ul]
I have seen this before, but the problem now is that these directories have not the same number of events.
Is this a problem of ROOT or I have to check my code?
Also, is there any way, to have only one directory?
Thank you in advance.
EDIT 1: I write a script which will print the number of events:
In line
Tree t1 = (TTree)inf->Get(“multijets/events”);
I tried also “events;1” and next I tried “events;2” and it prints always the same:
93882
So… Could I say that this is the real number of entries?
Error: Symbol Event is not defined in current scope test_entries.C:17:
Error: class,struct,union or type Event not defined test_entries.C:17:
Warning: Automatic variable Event*event is allocated test_entries.C:17:
Error: Undeclared variable Event*event test_entries.C:17:
*** Interpreter error recovered ***
Thank you Pepe and Coyote.
Finally, I solved the problem, doing the follow:
As I said in my first post, I add 1537 histograms, using hadd.
So, I tried to each 400 histograms each time(1537 / 400 ~ 4 files) and finally I added the 4 files.
It seems that the hadd has a limit.
In order version of ROOT hadd was limited to the number of allowed open descriptor (OS limit, usually around 1024). This should be fixed in the lastest version of ROOT.