Hi Alex and others,
I installed root version 5.28 on my new laptop and I also get problems with vectors of vectors, which I don't have when running on lxplus (version 5.26).
Try the following macro:
{
gSystem->Load("libCintex.so");
Cintex::Cintex::Enable();
#include "Rtypes.h"
#include<vector>
vector<vector<int>> i;
}
The last command gives me an error message with version 5.28:
Warning in <ACLiC>: Failed to generate the dependency file for /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_vector_vector_int_allocator_int______cxx.so
In file included from /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_vector_vector_int_allocator_int______cxx_ACLiC_dict.h:34,
from /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_vector_vector_int_allocator_int______cxx_ACLiC_dict.cxx:17:
/home/phil/MyCode/SYNTcode/testana/macros/AutoDict_vector_vector_int_allocator_int_____.cxx:2: fatal error: prec_stl/vector: No such file or directory
compilation terminated.
g++: /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_vector_vector_int_allocator_int______cxx_ACLiC_dict.o: No such file or directory
Error in <ACLiC>: Compilation failed!
Warning in <ACLiC>: Failed to generate the dependency file for /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_random_access_iterator_vector_int_allocator_int____long__cxx.so
In file included from /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_random_access_iterator_vector_int_allocator_int____long__cxx_ACLiC_dict.h:34,
from /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_random_access_iterator_vector_int_allocator_int____long__cxx_ACLiC_dict.cxx:17:
/home/phil/MyCode/SYNTcode/testana/macros/AutoDict_random_access_iterator_vector_int_allocator_int____long_.cxx:2: fatal error: prec_stl/vector: No such file or directory
compilation terminated.
g++: /home/phil/MyCode/SYNTcode/testana/macros/AutoDict_random_access_iterator_vector_int_allocator_int____long__cxx_ACLiC_dict.o: No such file or directory
Error in <ACLiC>: Compilation failed!
although my code actually runs fine despite of it:
root [1] i
(class vector<vector<int> >)151828176
Try also the following macro:
{
gSystem->Load("libCintex.so");
Cintex::Cintex::Enable();
#include "Rtypes.h"
#include<vector>
vector<vector<float>> f;
vector<float> ff;
ff.push_back(1);
f.push_back(ff);
vector<vector<double>> d;
vector<double> dd;
dd.push_back(2);
d.push_back(dd);
}
There the operation with floats works very fine, while the last command (with double) does not work:
Error: Can't call vector<vector<double,allocator<double> >,allocator<vector<double,allocator<double> > > >::push_back(dd) in current scope (tmpfile):1:
Possible candidates are...
(in vector<vector<double,allocator<double> >,allocator<vector<double,allocator<double> > > >)
*** Interpreter error recovered ***
Now my immediate problem is that I need to use vectors of vectors of double in my analysis code and there is no way I can run it on my laptop. Any idea?
Cheers
Phil