`array2root` unable to create file on `root://eoslhcb.cern.ch//eos/...`
KonstantinSchubert opened this issue · 6 comments
So, I don't really know what I am talking about here, but...
There is this eos
storage at CERN and root can read/write to it using (I think), the XRootD protcol.
So whenever you open a file, you should use an url like root://eoslhcb.cern.ch//eos/lhcb/wg/semileptonic/Bs2KmunuAna/Tuples/Bs2KMuNu_MCTUPLES_RAW_30May16/TESTFILE.root
root_numpy.root2array
can read from a url like this, but when I try to create a new file (using such a root://eoslhcb.cern.ch//eos...
url, I get the following error:
Error in <TNetXNGFile::Open>: [ERROR] Server responded with an error: [3011] Unable to open file /eos/lhcb/user/k/koschube/[redacted]/test.root; No such file or directory
@KonstantinSchubert - you can't normally do that. xrootd servers are normally read-only and you create files elsewhere and move them there.
To elaborate, doing the same thing with ROOT.TFile.Open('...', 'NEW')
will result in the same error.
Okay, I tried it.
inputfile = ROOT.TFile.Open("root://eoslhcb.cern.ch//eos/lhcb/user/k/koschube/teasdst.root","NEW")
This works without issue. Maybe root
isn't using xrootd
, but it is definitely able to open a file directly on eos
.
It would be nice if we could get root_numpy to do the same. :)
Are you trying to create it in a directory that doesn't exist? Can you do your example, but with root_numpy
?
I don't know if this will change anything, but array2root's default mode is to open with "update", but you can try changing this to "recreate" or "new", etc.
Interesting... Possibly an issue to report to the ROOT devs.