Problems with <vector<vector<int> >

Hi Philippe,

Nope, it is not the same.
On lxplus I have 5.27.02.
When I initialize athena I have:

for Rel. 16.6.7.9.1 - 5.26.00f_python2.6
for Rel. 17.0.4 - 5.28.00g

So I guess ROOT has this auto dictionary loader since at least 5.27.02, but then why it does not work with 5.28.00g in athena Rel.17.0.4?

Actually I don’t care which athena release to use to process data with my script on the GRID. The only restriction - so that 2-dimensional vector could be read, all other stuff seems working fine since long ago. I would use some athena release related to ROOT 5.27.02 with pleasure, I simply do not see any release of this kind.

Hi,

humm … apperently, it is working for vector<vector > for these 3 releases.
So the problem is likely slightly different and a dictionary provided by Athena is likely to be preventing the autodictionary generation. I recommend that you either use the Loader.C+ trick and use gInterpreter->GenerateDictionary("vector<vector<float> >","vector"); which is available since v5.28.

Cheers,
Philippe.

Hi,

yeah, I tried to roll-back to my previous configuration when I had loader.C with content

#include <vector> #ifdef __MAKECINT__ #pragma link C++ class vector<vector<float> >+; #endif

So if I do nowroot -l .L loader.C+ .x myanalysis.c
it works!!

It works as well if I do not do .L loader.C+ but instead of it - root -l gInterpreter->GenerateDictionary("vector<vector<float> >","vector"); .x myanalysis.c

But the reason why I wanted to have it all in the same .c file is that it is much easier to submit this job to the GRID via prun. Now I need to figure out how to write a submitting script with “.L loader.C+” or with "gInterpreter->GenerateDictionary(“vector<vector >”,“vector”);"
because I don’t see anything like that in twiki.cern.ch/twiki/bin/viewauth/Atlas/PandaRun

Hi,

You can have the call to GenerateDictionary has the first operation done in your script.

Cheers,
Philippe.

Hi,

yep, already tried it - it does not work unfortunately :frowning:
Same errors shown:

Error: Can't call vector<vector<float> >::at(trkpt5_trackNumber) in current scope myanalysis.c:699: Possible candidates are... (in vector<vector<float> >) Error: non class,struct,union object at(trkpt5_trackNumber) used with . or -> myanalysis.c:699: *** Interpreter error recovered ***

I mean I did

and the very first line in myanalysis.c is gInterpreter->GenerateDictionary("vector<vector<float> >","vector");

So. We’ve found so far two ways to succeed here, but both require 2 commands being executed in the same ROOT session. And this is the thing I’m stuck with right now: it doesn’t seem obvious how to make it with prun.

[quote]and the very first line in myanalysis.c is[/quote]It should no be the very first line of the file,
it should be the very first line of the function myanalysis … (i.e. being the first first line is not valid C++).

Cheers,
Philippe.

Hi,

I see now! It works! Thank you very much! =D>
Tomorrow I’ll try to send this to the GRID - I’ll let you know about results.

Hi Philippe,

Thanks again, it all works fine now in the GRID using prun!