TClass error in hadd

Hello,

I am working on lxplus (platform slc4_amd64_gcc34) and am trying to merge 3 ROOT files using hadd. The ROOT files were made using v5.18/00. I do

hadd Bs2KPi_AllEvts.root Bs2KPi_95kevts_ProperSel.root Bs2KPi_27kevts_NewSample.root Bs2KPi_4kevts_FinalSample.root

and I get

Target file: Bs2KPi_AllEvts.root
Source file 1: Bs2KPi_95kevts_ProperSel.root
Source file 2: Bs2KPi_27kevts_NewSample.root
Source file 3: Bs2KPi_4kevts_FinalSample.root
Target path: Bs2KPi_AllEvts.root:/
Bs2KPi_95kevts_ProperSel.root tree:DecayChainNTuple entries=1234567890
Bs2KPi_27kevts_NewSample.root tree:DecayChainNTuple entries=1234567890
Bs2KPi_4kevts_FinalSample.root tree:DecayChainNTuple entries=1234567890
Fatal in TClass::: i==info->GetClassVersion() || (i==-1&&info->GetClassVersion()==1) violated at line 4428 of `meta/src/TClass.cxx’
aborting
(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.
Attaching to program: /proc/25702/exe, process 25702
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread 182933878048 (LWP 25702)]

0x0000003f0e28f9c4 in waitpid () from /lib64/tls/libc.so.6
#1 0x0000003f0e239bbf in do_system () from /lib64/tls/libc.so.6
#2 0x0000002a9579e88d in TUnixSystem::StackTrace ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libCore.so
#3 0x0000002a956f3439 in DefaultErrorHandler ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libCore.so
#4 0x0000002a956f38c4 in ErrorHandler ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libCore.so
#5 0x0000002a95701cd2 in TObject::Fatal ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libCore.so
#6 0x0000002a95779828 in TClass::FindStreamerInfo ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libCore.so
#7 0x0000002a974a0218 in TTreeCloner::CopyStreamerInfos ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libTree.so
#8 0x0000002a974a0839 in TTreeCloner::Exec ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libTree.so
#9 0x0000002a974811e3 in TChain::Merge ()
from /afs/cern.ch/sw/lcg/external/root/5.18.00/slc4_amd64_gcc34/root/lib/libTree.so
#10 0x0000000000402fef in MergeRootfile ()
#11 0x00000000004040f0 in main ()
Abort

The target ROOT file is created, but is tiny (234 bytes) and has no keys.
As far as I can see the individual ROOT files are perfectly fine.

Does anyone know what is stopping hadd from working?

Thanks,

Laurence

Could you put your 3 data files in some public readable area?

Rene

The files are now in

/afs/cern.ch/user/l/lcarson/public/Bs2KPi_NTuples

Thanks,

Laurence

The files in this directory are not publicly readable

Rene

Hmmm, not sure why files in ~/public aren’t publicly readable…

I’ve tried running the LHCb “mkpublic” script, which should solve the problem. Could you check to see if it’s readable now?

Thanks,

Laurence

I have identified the problem and fixed it in the SVN trunk. The problem appears when calling hadd on files generated by ROOT versions 5.14 and 5.18.
If you cannot update to the SVN trunk, a workaround that implies an update in the files written with 5.14. You can do this in an interactive session

TFile f("Bs2KPi_27kevts_NewSample.root","update"); DecayChainNTuple.Write();
same procedure for your other file written with 5.14: Bs2KPi_95kevts_ProperSel.root
Now you can do:

hadd -f result.root Bs*.root
Rene

Yes, the updating seems to have fixed the problem.

Thanks!

Laurence