TGridResult::GetFileName(0) returns nullptr

Hello rooters.

I would like to get many files from the grid (alien) and I’m trying to make it so:

Connection works fine:

root [0] TGrid::Connect("alien://");
root [1] gGrid->Pwd() 
(const char *) "/alice/"

Then I made a query and it shows me correct number of files, because I know that Query method it’s just a wrap for find command and I made it directly. Number of files the same.

root [2] auto res = gGrid->Query("/alice/data/2015/LHC15o/000245145/pass2_UD_CCUP/", "AliESDs.root")
(TGridResult *) @0x7fffd5c10f40
root [3] res->GetEntries()
(int) 16608 

But here problems occurred: I can’t get name of files:

root [4] res->GetFileName(0)
(const char *) nullptr

How can I fix it?

And one more question: this is correct way to get many files from the grid?
I have more than 20 000 files, and if I’ll run alien_cp that it will take forever. So my idea is to run it
via few parallel processes, so I’ve done it with python, but then I find out that I can work with grid directly from the root, so probably it will help me to avoid python multiprocessing.

root-config --arch --platform --version
linuxx8664gcc linux 6.18/04


I saw you opened ticket Thanks for reporting and somebody will take care of it!

1 Like

Hi, Oksana.

Yeah, I hope too. m.b. I’ll try to fix it my self.


The solution is:

root [13] res->GetKey(0, "turl")
(const char *) "alien:///alice/data/2015/LHC15o/000245145/pass2_UD_CCUP/15000245145019.100/AliESDs.root"

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