[ROOT-6869] TChain.Add() breaks Davix http URLs with '?' Created: 03/Nov/14  Updated: 15/May/19  Resolved: 05/Dec/14

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

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

ATLAS default ROOT environment

Actual End:


Dear ROOT team,

There is a "feature" in ROOT TChain.Add() which does not work well with
Davix and http URLs that contain "?". For Davix, ATLAS likes to use "?"
like e.g.
to force redirections to a specific site, but TChain.Add() thinks "?" is
a wildcard and switches to a local directory search mode. AddFile() on
the other hand works fine.

You can reproduce the problem with (or a recent ROOT version with davix enabled):

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
voms-proxy-init -voms atlas -valid 96:00
localSetupROOT 5.34.22-x86_64-slc6-gcc48-opt
root -l


TChain c


Example (1) and (3) work file, while (2) breaks.

Is it possible to switch off the wildcard mode of TChain.Add in case the URL/file starts with http:// or https:// ?

Cheers, Johannes

Comment by David Smith [ 05/Dec/14 ]


A fix for this problem has been made to master and the 6.02 and 5.34 ROOT branches. Now:

(1) TChain::Add of a filename will not try to do wildcard matching if the filename is a url
(2) Giving a treename after the filename is an existing feature of TChain:AddFile. Now any url query ('?') section will be kept and not be taken as a part of the treename. Alternatively, for urls, the treename can now be given in a url fragment ('#') section after a url query.

Comment by David Smith [ 05/Dec/14 ]

Closing ticket.

Generated at Fri May 29 22:32:05 CEST 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.