Unable to open some URL with ROOT TFile

Hello,

I am trying to access this file from ROOT:

https://atlas-opendata.web.cern.ch:443/Legacy13TeV/2lep/MC/mc_364100.Zmumu_PTV0_70_CVetoBVeto.2lep.root

I verified I can download it from a web browser.

But in ROOT I cannot open it:

python
Python 3.12.5 (main, Aug 6 2024, 19:08:49) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

from ROOT import TFile
TFile.Open(“https://atlas-opendata.web.cern.ch/Legacy13TeV/2lep/MC/mc_364100.Zmumu_PTV0_70_CVetoBVeto.2lep.root”)
Error in TWebFile::TWebFile: https://atlas-opendata.web.cern.ch:443/Legacy13TeV/2lep/MC/mc_364100.Zmumu_PTV0_70_CVetoBVeto.2lep.root? does not exist
Traceback (most recent call last):
File “”, line 1, in
File “/opt/hep/root/6.30.06/lib/ROOT/_pythonization/_tfile.py”, line 103, in _TFileOpen
raise OSError(‘Failed to open file {}’.format(str(args[0])))
OSError: Failed to open file https://atlas-opendata.web.cern.ch/Legacy13TeV/2lep/MC/mc_364100.Zmumu_PTV0_70_CVetoBVeto.2lep.root

whilst uproot is able to open it:

import uproot

miniTreeZmumu = uproot.open(“https://atlas-opendata.web.cern.ch/Legacy13TeV/2lep/MC/mc_364100.Zmumu_PTV0_70_CVetoBVeto.2lep.root")["mini”]

I also verified that ROOT TFile can open URL in general:

TFile.Open(“https://root.cern/files/na49.root”)
<cppyy.gbl.TWebFile object at 0x12300d000>

So there seems to be some specific problem with TFile and the CERN open access data URLs? Do you have an idea what could be the problem?

I am on a Mac (14.6.1) and have compiled ROOT from source (6.30/06)

Cheers,

Mark

Hi,

works for me on lxplus9 with ROOT 6.30.02-x86_64-el9-gcc13-opt and python 3.9.12:

$ setupATLAS -q; lsetup "root 6.30.02-x86_64-el9-gcc13-opt"
...
$ python
Python 3.9.12 (main, Jul 11 2023, 14:40:15)
[GCC 13.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ROOT import TFile
>>> TFile.Open("https://atlas-opendata.web.cern.ch/Legacy13TeV/2lep/MC/mc_364100.Zmumu_PTV0_70_CVetoBVeto.2lep.root")
<cppyy.gbl.TDavixFile object at 0x5c95980>

Do you have davix installed on your system. Plain TWebFile may not support some special http features.

I don’t know. Do I need Davix for this to work?

Most probably - yes.

Installing Davix does not help. Homebrew installed davix–0.8.7.arm64_sonoma, but the problem persists.

Does you build of ROOT has the support for Davix enabled? (see result of root-config --features)

I’m not sure on that - I don’t have my build area by now, but I can try rebuilding. It might be Davix was not found and so that was disabled?

However I also see the same problem if I use ROOT via:

source /cvmfs/sft.cern.ch/lcg/views/LCG_106/arm64-mac12-clang140-opt/setup.sh

and it seems surprising to me an official install misses Davix support if this is a requirement?

Cheers,

Mark

root-config should work from the installed version to tell you which features is enabled.

aha yes just realised that :slight_smile:

root-config --features | grep -i davix

shows no result for either my install or the LCG install.

So this seems to mean I have to build root locally and enable davix, whilst from cvmfs its not possible to use this feature of ROOT due to the choices made when LCG built ROOT?

Just to confirm rebuilding ROOT on my laptop with Davix enabled solves the problem for me.

Thanks,

Mark

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.