Hadd failure on files produced by same executable

Hello Rene et al.,

I get the following error from ‘hadd’. The input files were run with identical executable and I’ve checked if the boundaries of any histogram with 400 bins where undefined. I got this error for one histogram before, but never has it refused to add the files at all.

I have the two files from to jobs which I’m forced to split because I’m not allowed enough time to run through all my data in one jobs, but I need to had them together. I looked at ‘hadd’ code and it looks straight forward.

I get ‘hadd’ from $ROOTSYS in BaBar LTDA see up at SLAC.

-rwxr-xr-x 1 homer ltda-relc 25923 Jan 10 2010 /BFROOT/package/root/5.26-00/Linux26SL5_i386_gcc412/bin/hadd
[snyder@bbrltda01 workdir]$

‘hadd’ as not chenaged since 2010.

-Arthur

snyder@bbrltda01 workdir]$ ROOTSYS/bin/hadd TigCombo22b.root TigPiP22BDTLike147.root TigPiP22BDTLike148.root Target file: TigCombo22b.root Source file 1: TigPiP22BDTLike147.root Source file 2: TigPiP22BDTLike148.root Target path: TigCombo22b.root:/ Error in <TH1F::Merge>: Cannot merge histograms - limits are inconsistent: first: (400, -3.680000, 3.680000), second: (400, -3.500000, 3.600000) [snyder@bbrltda01 workdir]

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


I have found that the histogram boundaries are really different in these two files. I see in gdod they were properly set but get changed some how in course of running. Array bounds?

However, previously ‘hadd’ would just skip these and add the others. No it refuses to do anything and does not tell me what histogram(s) were problematic…but I found them by brute force search…

@pcanal is this the expected behaviour of hadd now?

This is a feature/behavior implemented in the histogram classes themselves, so maybe @moneta knows?

I’m not sure it root histograms. Babar has another layer of inheritance sitting on top of it. I do think it the TH1’s that are doing it though.

Back when I on occasion I reversed limits on purpose, it was likely using HBOOK or HANDYPAK.

In this case it was accidental. Putting them correctly seems to have corrected the ‘overwrite’ problem. It would be better for the constructors to complain.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.