RE: [ROOT] copying chains

From: Philippe Canal (pcanal@fnal.gov)
Date: Thu Jul 31 2003 - 23:24:17 MEST


Hi Thomas,

> I also noticed that the number of entries in an
>   oldtree->ls()
> seems to be wrong for the second (and all following) files:

The number of entries 1234567890 indicates that the real number of entries
are not yet been loaded in memory.  This should not be a problem.

> I did find some bug fixes mentioned in the release notes but I don't think
> that any of those mentioned this problem specifically.

Nonetheless, please re-try with 3.05/07, the consequence of the bugs that
were fixed are usually 'random' behavior.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Thomas Hadig
Sent: Thursday, July 31, 2003 3:59 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] copying chains


Hi all,

I just tried to copy a tree from a chain of files into a single file.
I used the code
  TTree *newtree = oldtree->CloneTree();
in
http://root.cern.ch/root/html/examples/copytree.C.html
with ROOT Version 3.05/02 on Linux (RedHat 7.3).

Using one file or a chain with one file seems to work fine but
for a chain of more than one file, the writing never ends.

Using the method in
http://root.cern.ch/root/html/examples/copytree2.C.html
with
  TTree *newtree = oldtree->CloneTree(0);
  newtree->CopyEntries(oldtree);
seems to work for all cases.

I also noticed that the number of entries in an
  oldtree->ls()
seems to be wrong for the second (and all following) files:
inter_file_date20030728_time120505.root tree:main_scan entries=571
inter_file_date20030728_time174104.root tree:main_scan entries=1234567890
inter_file_date20030728_time192411.root tree:main_scan entries=1234567890
....

If CloneTree uses this number, I am no longer astonished that the
copying never ends ....

I did find some bug fixes mentioned in the release notes but I don't think
that any of those mentioned this problem specifically.

Ciao
Thomas

----------------------------------------------------------------------------
Thomas Hadig            MS 62, 2575 Sand Hill Road, Menlo Park CA 94025, USA
       hadig@stanford.edu                              Tel.: +1 650 926 2810
       http://www.slac.stanford.edu/~hadig/
----------------------------------------------------------------------------
    In a world without walls and fences, who needs windows and gates ?
----------------------------------------------------------------------------



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