Vector<vector<string> >

I am using Makeclass to create Analysis framework. I got error in using the vector<vector > and i followed the twiki page and added following before the include statements in ‘analysis .h’ file.

#ifdef MAKECINT
#pragma link C++ class std::vector < std::vector >+;
#pragma link C++ class std::vector < std::vector >+;
#endif

#ifndef Analysis_h
#define Analysis_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>

Still am gettting following error

Error: Invalid type ‘vector<vector’ in declaration of ‘>’ Analysis.h:133:
Error: Symbol vector<vector > is not defined in current scope Analysis.h:133:
Error: Symbol trig_L1_jet_thrNames is not defined in current scope Analysis.h:133:
*** Interpreter error recovered ***

Kinidly provide me a solution.

Hi,

You need to add#include <vector> #include <string>

Cheers,
Philippe.

Hi Philippe,

Thanks for the solution. Now the event loop runs if i add the two include statements. Along with that it creates these files in the same directory.

AutoDict_random_access_iterator_vector_string_allocator_string____long_.cxx AutoDict_vector_vector_float_allocator_float______cxx.so
AutoDict_random_access_iterator_vector_string_allocator_string____long__cxx.d AutoDict_vector_vector_string_allocator_string_____.cxx
AutoDict_vector_vector_float_allocator_float_____.cxx AutoDict_vector_vector_string_allocator_string______cxx.d
AutoDict_vector_vector_float_allocator_float______cxx.d

Is this alright? Thanks for the time you spend on this.

Rajiv

Hi,

Yes those are expected (they are the automatically generated dictionaries for the STL container you are using).

Cheers,
Philippe.

Thanks for helping me out. :smiley: