Re: [ROOT] merge histograms

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Feb 26 2002 - 09:31:31 MET


Hi Avdhesh,

I assume that you want to use the tutorial in $ROOTSYS/tutorials/hadd.C.
This tutorial is intended to be compiled and linked as a program.
I suggest to use the macro $ROOTSYS/tutorials/hadd_old.C instead and do:
 root > .L hadd.old.C  (edit the file with your file names)
 root > hadd()

The current macro in $ROOTSYS/tutorials/hadd.C was misplaced in the tutorials.
In the development version in CVS, I have now added a new program 
in main/src/hadd.cxx. When installing ROOT, the corresponding executable
module is generated in $ROOTSYS/bin/hadd.
People taking the new versions of the binaries (3.03/02) to be generated
today or tomorrow will have this new module automatically.
If you install from the current CVS source, it is already there.

Rene Brun

Avdhesh Chandra wrote:
> 
> Hi !!
> 
> I have two root-tuole(say file1.root and file2.root) containg only 1D and
> 2D histogram with same name. I want to merge ( or add ) these two
> files into one file such that my hisograms intries should add.
> Please send me a macro to do this, I was trying to do it from
> root-tutorial ( how to add  histogram ) but i am not able to do it. its
> not working ( or either i donot know how to use it )
> 
> I was doing like this
> 
> root> .L hist_add.C
> root> histadd();
> 
> its went in to the void loop but after looking output file it seems that
> it have not done any thing.
> 
> Thanks
> Avdhesh



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:42 MET