Hadd mistery

I try to hadd files …
I have the following error:

Target file: goo.root
Source file 1: MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOne
All_folder_with_timecut_w_ac_3_1__signal.tree.root
Warning in TClass::TClass: no dictionary for class CBTParticle is available
Warning in TClass::TClass: no dictionary for class CBIEnergyData is available
Warning in TClass::TClass: no dictionary for class CBITimeData is available
Warning in TClass::TClass: no dictionary for class CBTRefArray is available
Source file 2: MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOne
All_folder_with_timecut_w_ac_4_1__signal.tree.root
Target path: goo.root:/
Found subdirectory ThreeOneAll_folder_with_timecut_w_ac_3_1__signal
Target path: goo.root:/ThreeOneAll_folder_with_timecut_w_ac_3_1__signal
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a chec
ksum of 1073741832 for the class “TAttLine” in MainAnalysis2.xml_run_101881_carb
on_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.ro
ot.
Error in TBufferFile::CheckByteCount: object of class TParticle read too few b
ytes: 146 instead of 301
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a chec
ksum of 1073741832 for the class “TAttLine” in MainAnalysis2.xml_run_101881_carb
on_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.ro
ot.
Error in TBufferFile::CheckByteCount: object of class TParticle read too few b
ytes: 146 instead of 1677
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a chec
ksum of 1073741832 for the class “TAttLine” in MainAnalysis2.xml_run_101881_carb
on_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.ro
ot.
Error in TBufferFile::CheckByteCount: object of class TParticle read too few b
ytes: 146 instead of 1647
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a chec
ksum of 1073741832 for the class “TAttLine” in MainAnalysis2.xml_run_101881_carb
on_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.ro
ot.
Error in TBufferFile::CheckByteCount: object of class TParticle read too few b
ytes: 146 instead of 1647
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a chec
ksum of 1073741832 for the class “TAttLine” in MainAnalysis2.xml_run_101881_carb
on_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.ro
ot.
Error in TBufferFile::CheckByteCount: object of class TParticle read too few b
ytes: 146 instead of 320
Fatal in TClass::: i==info->GetClassVersion() || (i==-1&&info->GetClassVersion
()==1) violated at line 4428 of `meta/src/TClass.cxx’
aborting
MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOneAll_folder_with
timecut_w_ac_3_1__signal.tree.root tree:ThreeOneAll_folder_with_timecut_w_ac_3
1__signal/tree entries=1234567890
Using host libthread_db library “/lib/libthread_db.so.1”.
Attaching to program: /proc/25998/exe, process 25998
[Thread debugging using libthread_db enabled]
[New Thread 47771506664640 (LWP 25998)]
0x00002b72ab814715 in waitpid () from /lib/libc.so.6
#1 0x00002b72ab7bd721 in strtold_l () from /lib/libc.so.6
#2 0x00002b72a8da494a in TUnixSystem::StackTrace ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibCore.so.5.18
#3 0x00002b72a8d06190 in DefaultErrorHandler ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibCore.so.5.18
#4 0x00002b72a8d05c56 in ErrorHandler ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibCore.so.5.18
#5 0x00002b72a8d12182 in TObject::Fatal ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibCore.so.5.18
#6 0x00002b72a8d7dbc9 in TClass::FindStreamerInfo ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibCore.so.5.18
#7 0x00002b72aab36fba in TTreeCloner::CopyStreamerInfos ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibTree.so.5.18
#8 0x00002b72aab37349 in TTreeCloner::Exec ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibTree.so.5.18
#9 0x00002b72aab1b395 in TChain::Merge ()
from /dsk/tr16/software/builds3rdParty/64bit/root_v5.18_geant4.9.1/lib/root/l
ibTree.so.5.18
#10 0x0000000000402ca0 in MergeRootfile ()
#11 0x0000000000402d69 in MergeRootfile ()
#12 0x0000000000403c89 in main ()

I am trying my best to write out every every important:

    outputFile = new TFile(ofile.Data(), "recreate");

    outputFile->MakeProject("src", "*", "recreate++");
    outputFile->mkdir(lFolderName);
    outputFile->cd(lFolderName);

....

  outputFile->Write();
  outputFile->WriteStreamerInfo();
  outputFile->Close();

Can you give some advice how to solve this problem?

Hi,

Which version of ROOT was used to write the input files? Can you send me the result of existing the following command on the ROOT prompt: f = TFile::Open("MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOne All_folder_with_timecut_w_ac_3_1__signal.tree.root"); f->Map(); > /var/tmp/map01 .! tail -10 /var/tmp/map01

Philippe.

[quote=“pcanal”]Hi,

Which version of ROOT was used to write the input files? Can you send me the result of existing the following command on the ROOT prompt: f = TFile::Open("MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOne All_folder_with_timecut_w_ac_3_1__signal.tree.root"); f->Map(); > /var/tmp/map01 .! tail -10 /var/tmp/map01

Philippe.[/quote]

Hi Philippe,

Thank you for the quick reply.

I am using the 5.18 for both generating and processing the root-files.
The required information is here:
20110121/190931 At:2219306 N=117719 TH2D CX = 218.04
20110121/190931 At:2337025 N=2788 TH2D CX = 189.33
20110121/190931 At:2339813 N=35527 TH2D CX = 226.11
20110121/190931 At:2375340 N=486 TH1D CX = 18.03
20110121/190931 At:2375826 N=6888 TH2D CX = 211.92
20110121/190931 At:2382714 N=7905 TDirectory
20110121/190931 At:2390619 N=375 KeysList
20110121/190931 At:2390994 N=7906 StreamerInfo CX = 3.50
20110121/190931 At:2398900 N=161 FreeSegments
20110121/190931 At:2399061 N=1 END

k.

Hi,

Humm … this is all looks good. Could you send me (or give me access to) your file so that I can attempt to reproduce the problem?

Thanks,
Philippe.

[quote=“pcanal”]Hi,

Humm … this is all looks good. Could you send me (or give me access to) your file so that I can attempt to reproduce the problem?

Thanks,
Philippe.[/quote]

Two files are here: https://kary.dynalias.org/kary/P/.
I found the following:
I am producing the files with ROOT v5.18. The hadd of this distribution chrashes as it wass described earlier.
The same I experienced with 5.24 (other machine, other installation)
But the 5.26 (other machine, other installation) can add them together (with some errors, like
Error in TBufferFile::CheckByteCount: object of class TParticle read too few bytes: 2 instead of 1647
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 8 of the class TParticle, object skipped at offset 146
Error in TBufferFile::CheckByteCount: object of class TParticle read too few bytes: 2 instead of 320
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 8 of the class TParticle, object skipped at offset 150
Error in TBufferFile::CheckByteCount: object of class TParticle read too few bytes: 2 instead of 301
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 8 of the class TParticle, object skipped at offset 145
Error in TBufferFile::CheckByteCount: object of class TParticle read too few bytes: 2 instead of 1677
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 8 of the class TParticle, object skipped at offset 1827
Error in TBufferFile::CheckByteCount: object of class TParticle read too few bytes: 2 instead of 1647
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 8 of the class TParticle, object skipped at offset 3479 …

but at least the number of the entries in the result tree is OK …

k.

Hi,

Those error do indicates that some of the data is not copied properly.

The issue with your files is that you have several classes for which hadd do not have the library (like CBTRefArray, CBTParticle) but are inheriting from TObject and are stored in a ROOT collections.

You need to either allow hadd to load your libraries (by creating rootmap file for them, for example by using rlibmap) or make sure to use the fast cloning method (which skip the part where the object are formed).

For example in v5.28, the following works perfectly (and is very fast):$ hadd -f out.root MainAnalysis2.xml_run_10188* Target file: out.root Source file 1: MainAnalysis2.xml_run_101880_carbon_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.root Warning in <TClass::TClass>: no dictionary for class CBTParticle is available Warning in <TClass::TClass>: no dictionary for class CBIEnergyData is available Warning in <TClass::TClass>: no dictionary for class CBITimeData is available Warning in <TClass::TClass>: no dictionary for class CBTRefArray is available Source file 2: MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.root Target path: out.root:/ Found subdirectory ThreeOneAll_folder_with_timecut_w_ac_3_1__signal Target path: out.root:/ThreeOneAll_folder_with_timecut_w_ac_3_1__signal MainAnalysis2.xml_run_101880_carbon_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.root tree:ThreeOneAll_folder_with_timecut_w_ac_3_1__signal/tree entries=1234567890 MainAnalysis2.xml_run_101881_carbon_omega_prime.zebra.gz_ThreeOneAll_folder_with_timecut_w_ac_3_1__signal.tree.root tree:ThreeOneAll_folder_with_timecut_w_ac_3_1__signal/tree entries=1234567890

Cheers,
Philippe.

Thank you Philippe.
k.

Ciao Philippe

I have almost the same problem (see below) as makonyik, but I dont understand your reply ‘You need to either allow hadd to load your libraries (by creating rootmap file for them, for example by using rlibmap) or make sure to use the fast cloning method (which skip the part where the object are formed)’. How can I do this?
A big difference compared to makonyik is that my merge doesnt brake, it finishes but the number of entries in some histograms are wrong.

Sorry if my question is extremely naive.

Thanks in advance for any hint.

Lizardo

PS.- Im using Root v5-28-00d together with AliRoot v4-21-25-AN.

Target file: Example.root
Source file 1: Run137135.root
Warning in TClass::TClass: no dictionary for class AliCFContainer is available
Warning in TClass::TClass: no dictionary for class AliCFFrame is available
Warning in TClass::TClass: no dictionary for class AliCFGridSparse is available
Warning in TClass::TClass: no dictionary for class AliCounterCollection is available
Source file 2: Run137161.root
Target path: Example.root:/
Found subdirectory MUON_Performances
Target path: Example.root:/MUON_Performances
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 5 of the class TNamed, object skipped at offset 81
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 2 instead of 410443
Cannot merge object type, name: title:
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 5 of the class TNamed, object skipped at offset 81
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 2 instead of 432488
Found subdirectory MUON_Efficiency
Target path: Example.root:/MUON_Efficiency
Found subdirectory MUON_Physics
Target path: Example.root:/MUON_Physics
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 2 of the class TNamed, object skipped at offset 81
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 2 instead of 67350
Cannot merge object type, name: title:
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 2 of the class TNamed, object skipped at offset 81
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 2 instead of 67362
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 2 of the class TNamed, object skipped at offset 81
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 2 instead of 66341
Cannot merge object type, name: title:
Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 2 of the class TNamed, object skipped at offset 81
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 2 instead of 66341

Hi,

[quote] either allow hadd to load your libraries (by creating rootmap file for them, for example by using rlibmap)[/quote]It should be sufficient to properly setup the AliRoot environment. If not, you should check with AliRoot support where they have the rootmap files.

[quote]Error in TBufferFile::ReadClassBuffer: Could not find the StreamerInfo for version 5 of the class TNamed, object skipped at offset 81[/quote]Humm … this might be an indication that the input file is corrupted (as in it is missing some components) and it might be not be possible (i.e. not easy at all) to recover this file.

Cheers,
Philippe.