Re: [ROOT] Saving reduced data from different root files in one output file

From: Colin Bernet (bernet@hep.saclay.cea.fr)
Date: Thu Mar 14 2002 - 13:39:23 MET


Hallo Mario, 

This will work :

> TFile fin("run1411_1.root");
TH1F *h2 = new TH1F("h2","h2",100,0,500);
> h1->Draw("adc0>>h2");
TFile fout("hv.root","RECREATE");
> h1->Write();
> fout.Close();  
> 

Maybe the problem is that root is scanning the current directory to decide
if Tree::Draw will create the histogram. In your case it was looking in
fin.

see you,
Colin

> ==> Output contains empty histo h2, because Draw creates a new one in
> fin.
> 
> How can I solve the problem?!
> 
> cheers
> 
> 	Mario
> 
> 
> 
> -- ------------------------------------------------------- --
> *   Mario Leberig                                           *
> *   AG Kabuss                     CERN                      *
> *   Universitaet Mainz            EP Division               *
> *   Institut fuer Kernphysik      Bat. 892-RA13             *
> *   D-55099 Mainz                 1211 Geneva 23            *           
> *   Tel. +49-6131/39-22932        Tel. +41-22-767-6461      *
> *   Fax  +49-6131/39-22964        Fax  +41-22-767-7910      *
> -- ------------------------------------------------------- --
> 



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