Home | News | Documentation | Download

Hadd binary. Issue when adding histograms with buffer

Hi,

If two files with histograms, which have a certain buffer, are added using hadd binary, the resulting output contains the histograms summed, but the buffer is now empty. Is this normal?

The issue can be reproduced following this:
a) Create a file with a histogram whose buffer size is larger than zero, ie


auto f= new TFile("dummy.root","update")
auto h = new TH1D("h","",10,0,0)
h->SetBuffer(100)
for(int i =0; i<100; ++i) h->Fill(1.2345);
h->Write()
f->Close()

b) Add twice this file using hadd binary
hadd out.root dummy.root dummy.root

The output file contains a histogram, but its buffer is empty, and a certain range (bin width) is automatically set although the original histograms do not have a set range.

Thank you in advance.

Regards,
atd

ROOT Version: 6.06
Platform: CC7
Compiler: g++4.8


I guess @pcanal can answer you.

@moneta Is that the intent?

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