Reading a root file from castor in a Pyroot macro

Dear all,
I’m trying to open a root file on castor in the following way:

class Diagnostic(object):

def __init__(self,root_file_name):
    self.RootFile=TFile(root_file_name)

“root_file_name” is string like this: rfio:/castor/cern.ch/user/…/file.root

But I get the messagge from root of TFile error due to unrecognized file at the path. I am sure that the file is present.

Anybody could help me to find a solution?

Thanks in advance

Cheers,
Raffaello

You must use the static function TFile::Open to access non local files

Rene

I used TFile.Open in my python instead of TFile::Open which give me an error.

And now it works but on the prompt appear the following error:

Error in TGClient::TGClient: only one instance of TGClient allowed

Anyway, it open the file correctly.

Thanks for you help

Raffaello