elaird/supy — pull request #95 by davidegerbaudo (2012-04-05 19:05:25+00:00)
Title: move the tree path from TChain::Add to TChain::TChain

Hi,

This should not be an issue reported to supy, but to the people making this kind of files :-(
I have some files on castor that don't contain the '.root' extension (the same happens when the files are on local disk, though).
When supy calls

chain.Add("%s/%s/%s"%(infile, dirName, treeName))(

root tries to open what is in fact 'file+dir+treename', that looks like:
SysError in : file rfio:////castor/cern.ch/grid/atlas/tzero//.NTUP_TRIG.x191_m1109._0001.1///trigger can not be opened for reading (Not a directory)

I could get it to work by moving the tree name (+path) from TChain::Add to the TChain costructor.
However, with this solution I had to change the name of the chain (was 'chain0', 'chain1', etc.).
For me it works fine...I don't know whether there was any specific reason for this name.

Thanks,

davide