[ROOT-7296] Wildcard matching by TChain::Add of files in remote directories is not working Created: 29/Apr/15  Updated: 05/Oct/15  Resolved: 05/Oct/15

Status: Closed
Project: ROOT
Component/s: I/O
Affects Version/s: 6.02/03, 5.34/25
Fix Version/s: 6.02/10, 5.34/34

Type: Bug Priority: Medium
Reporter: David Smith Assignee: David Smith
Resolution: Fixed Votes: 0
Labels: None
Environment:

linux sl6, gcc 4.9


Development:

 Description   

This was mentioned by a user on the hn-cms-pysTools list, I'm opening the ticket here for tracking:

As a consequence of the fix for ROOT-6869 wildcard matching of files in a remote directory is broken (if it is anyway supported by the plugin and endpoint); e.g. TDCacheFile and TNetXNGFile do support it, TWebFile did not, TDavixFile does (with a webdav enabled endpoint). An example of the problem is:

TChain c;
c.Add("root://eospublic.cern.ch//eos/opstest/dhsmith/*.root");
c.GetEntry(0);

gives:

Error in <TNetXNGFile::Open>: [ERROR] Server responded with an error: [3011] Unable to open file /eos/opstest/dhsmith/*.root; No such file or directory

although there are .root files in the directory mentioned.



 Comments   
Comment by David Smith [ 11/May/15 ]

Fixed on master, v6-02-00-patches and v5-34-00-patches.

Comment by Ka Hei Martin Kwok [ 27/Jul/15 ]

Where can I source the fixed patches on lxplus?

Comment by Ka Hei Martin Kwok [ 27/Jul/15 ]

The error message is now gone with the new patch( I'm using 5.34/32 ), but the bug is still there.

Comment by David Smith [ 28/Jul/15 ]

Hello,

Please could you give an example snippet of code that provokes the problem, along with the message or the (problematic/error) result that you see?

Yours,
David

Comment by Ka Hei Martin Kwok [ 28/Jul/15 ]

Here's the snippet with v5.34/30

code:
TChain chain("H4tree");
chain.Add("root://eoscms//eos/cms/store/group/dpg_ecal/alca_ecalcalib/TimingTB_H2_Jul2015/raw/DataTree/3313/*.root");
std::cout << "nentries is : " << chain.GetEntries() << std::endl;
std::cout << "Opened chain " << chain.GetName() << std::endl;
error:
Error in <TNetXNGFile::Open>: [ERROR] Server responded with an error: [3011] Unable to open file /eos/cms/store/group/dpg_ecal/alca_ecalcalib/TimingTB_H2_Jul2015/raw/DataTree/3313/*.root; No such file or directory
nentries is : 0
Opened chain H4tree

For the bug-fixed version, v5.34/32
The output is simply:

nentries is : 0
Opened chain H4tree

Thanks for your prompt response!
Martin

Comment by David Smith [ 31/Jul/15 ]

Hello Martin,

Thank you for sending the example and details. The test does work with ROOT 6 (6.02/10 & 6.04 or later) but it showed a problem with ROOT 5.34:

The problem is actually not related to the original fix for this ticket, but it has given a very similar bug. I have added a fix to the 5.34 repository.

I can't point you to a new build at the moment; you could build ROOT 5.34 from the latest sources if you need the fix immediately, or use ROOT 6. You could also set:

XNet.UseOldClient: yes

in your .rootrc or system.rootrc as a workaround.

Yours,
David

Comment by Ka Hei Martin Kwok [ 31/Jul/15 ]

Hi David,

Thank you for fixing it. I tested my code with v6.02/10 and it worked. When will the build with this fix be released?

Cheers,
Martin

Comment by David Smith [ 31/Jul/15 ]

Sorry, I can't give you an answer - the next 5.34 patch release is not scheduled yet (I don't mean that it will be an especially long time, but I don't have a date for you at the moment)

Comment by David Smith [ 05/Oct/15 ]

Hello Martin,

The most recent 5.34/34 release includes the fix.

Yours,
David

Comment by David Smith [ 05/Oct/15 ]

closing, fix should be available in all releases now.

Generated at Wed Sep 18 15:33:38 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.