[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
Environment:

ATLAS default ROOT environment


Development:

 Description   

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.
https://rucio-lb-prod.cern.ch/redirect/mc14_8TeV/AOD.01507240._010001.pool.root.2?site=LRZ-LMU
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
localSetupDQ2Client
voms-proxy-init -voms atlas -valid 96:00
localSetupROOT 5.34.22-x86_64-slc6-gcc48-opt
root -l

(1)
TFile::Open("https://rucio-lb-prod.cern.ch/redirect/mc14_8TeV/AOD.01507240._010001.pool.root.2?site=LRZ-LMU")

(2)
TChain c
c.Add("https://rucio-lb-prod.cern.ch/redirect/mc14_8TeV/AOD.01507240._010001.pool.root.2?site=LRZ-LMU")

(3)
c.AddFile("https://rucio-lb-prod.cern.ch/redirect/mc14_8TeV/AOD.01507240._010001.pool.root.2?site=LRZ-LMU")

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



 Comments   
Comment by David Smith [ 05/Dec/14 ]

Hello,

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 Tue Sep 24 10:58:40 CEST 2019 using Jira 7.13.1#713001-sha1:5e06076c2d215a6f699b7e5c90ab2fae7ba5a1ce.