[ROOT] saving an ntuple to another file

From: Thomas Schoerner (schorner@mail.desy.de)
Date: Wed Jul 30 2003 - 19:43:26 MEST


Hi,

I am opening a TFile

root [0] TFile f1("data.00.1.root");

which is converted from an hbook file containing one ntuple with ID 1.
For some reason (for which I find no reason in my fortran/hbook code)
have two keys in the root file:

root[1] f1.ls()
TFile**         data.00.1.root  HBOOK file: data.00.1.ntp converted to
ROOT
 TFile*         data.00.1.root  HBOOK file: data.00.1.ntp converted to
ROOT
  KEY: TTree    h1;2    ORANGE
  KEY: TTree    h1;1    ORANGE

Now I have several files or rather  ntuples which I want to chain - no
problem in paw with the hmerge command. But in root the TChain fails maybe
because some of the fails only have one KEY: TTree entry:

TFile**         data.00.3.root  HBOOK file: data.00.3.ntp converted to
ROOT
 TFile*         data.00.3.root  HBOOK file: data.00.3.ntp converted to
ROOT
  KEY: TTree    h1;1    ORANGE

Any suggestion what I might do? I was thinking about saving one of the
versions (I understand the h1;1 and h1;2 stand for different versions?) to
a new file ... but I had some difficulty in doing so ... Can anybody help?

Cheers, and thanks,

Thomas



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET