RE: [ROOT] TChain does not reflect new root files in Makeclass("....");

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Aug 18 2003 - 17:43:55 MEST


Hi Zaldy,

This behavior is not normal but I am not able to reproduce it.

> 1. Is TChain sensetive to dates?

No.

> 2. How do we explain this behaviour? 

I don't really know.  If I had to make a (wild) guess, I would say that
it is possible that the file-system was not (yet?) fully synchronized
when you tried to load the chain (i.e. for some reason the method use 
to look up the directory list by ROOT was not up to date (i.e. a file
system or OS deficiency).

> 3. How do we correct this without deleting and remaking directory? and,

To investigate the problem further you want to simply the test by simply
doing:
	
root[0]Tchain cc("PedTree");
root[1]cc.add("../SelectedPedRootFiles/*.root");
root[2]cc.ls(); > firstlisting

in the different case and look at the list.

> 4  Is this a bug?

Most likely. but we don't know from where.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of zaldy
Sent: Thursday, August 14, 2003 9:18 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] TChain does not reflect new root files in
Makeclass("....");



Dear Rooters,

I found a strange behaviour of TChain. Let me describe it.

I have about 2500 root files and place it at directory 
  ../Data_analysis/SelectedPedRootFiles

at directory ../Data_analysis/src 
i did
 
root[0]Tchain cc("PedTree");
root[1]cc.add("../SelectedPedRootFiles/*.root");
root[2]PedTree->MakeClass("TRootPedSelected");
then an initial code is created.

Now I have additional root (about 800 root files ) files and I wanted to 
add them on same directory "../Data_analysis/SelectedPedRootFiles". 
The new root files are exacly same tree name  structure. And I place the 
(new root files) in the same directory
   ../Data_analysis/SelectedPedRootFiles

In this case I have to regenerate a new TRootPedSelected.C and 
TRootPedSelected.h files via PedTree->MakeClass("TRootPedSelected);
to reflect the new rootfiles.
So at "../Data_analysis/src" I remove the file name "TRootPedSelected.*"
so as not to be in conflict with the new one.

at directory ../Data_analysis/src I repeated the procedure as before.
root[0]Tchain cc("PedTree");
root[1]cc.add("../SelectedPedRootFiles/*.root");
root[2]PedTree->MakeClass("TRootPedSelected");

The strange this is this: the new root files are not included in the 
chain.
------------------->

Now, I move all the root files this time to a new currently created 
directory ../Data_analysis/investigate
Then at ../Data_analysis/src I did repeated the procedure again.
....
root[1]cc.Add("../investigate/*.root");
.....
Result is: the new root files are reflected.

------------------>

Now I want to use the old dir name: SelectedPedRootFiles (my preference)

So at dir ../Data_analysis , i did;
 $rm -r SelectedPedRootFiles
 $mkdir SelectedPedRootFiles

then mv all my rootfiles(including the new) 
from
../Data_analysis/investigate 
to
../Data_analysis/SelectedPedRootFiles

NOTE: Situation now is same as before, only that I deleted the dir 
SelectedPedRootFiles, then recreate again.


Now at dir ../Data_analysis/src
I did
root[0]Tchain cc("PedTree");
root[1]cc.add("../SelectedPedRootFiles/*.root");
root[2]PedTree->MakeClass("TRootPedSelected);
then a initial code is created.

Result: The new root files and the old ones are reflected.

------------------>
Questions:
 1. Is TChain sensetive to dates?
 2. How do we explain this behaviour? 
 3. How do we correct this without deleting and remaking directory? and,
 4  Is this a bug?

PS. root version 3.05/05 6 Aug 2003
    gcc 3.2.2 RedHat 9.0

Thank you.

-- 

--------------------------------------------------------
                   Zaldy A. Nawang 
                   PS Users Room 2
                   Yon Gokan, 
                   E362, Neutrino Group, 
                   IPNS, KEK, 
                   Japan 
                    
                   e-mail: zaldy@neutrino.kek.jp
                   Tel. No. : (81) 029864 - 5387
--------------------------------------------------------



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