Re: your mail

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Mon, 11 Apr 2005 12:00:58 +0200 (MEST)


Start yourt test function with:

  TH1::AddDirectory(kFALSE);

Rene

On Mon, 11 Apr 2005, Ajay Thakur wrote:

> Dear all
> I have two .root files
> a.root
> b.root
> in which some histograms are saved with same names.
> I want to read these two .root files in a macro and
> then superimpose and draw the histograms present in
> two say,
> myhistogram in a.root
> myhistogram in b.root.
> I am attaching the macro.
> Please write me what i should do next.
> thanks.
>
>
> void test()
> {
> TFile tf_ht1("a.root");
> TFile tf_ht2("b.root");
> TH1F *ht0 = (TH1F*)tf_ht1.Get("myhistogram");
> TH1F *ht1 = (TH1F*)tf_ht2.Get("myhistogram");
>
>
> ht0->Draw();
> ht1->Draw("same");
> }
>
> ________________________________________________________________________
> Yahoo! India Matrimony: Find your life partner online
> Go to: http://yahoo.shaadi.com/india-matrimony
>
Received on Mon Apr 11 2005 - 12:01:06 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET