Vector of vector in a tree - filling clone tree

Hi,

As you may remember from reading the User’s Guide, in particular the Chapter 15 on Adding a Class, C++ does not provide enough information about the class ‘content’ for the I/O and interpreter to use them as is. To alleviate this lack, CINT (and thus ROOT) can create and load what we call ‘dictionaries’ ; once compiled, linked and loaded (as part of a shared library for example) it provides the interpreter and the I/O all the information you need. To create the dictionary you need to run rootcint:rootcint -f mydict.cxx -c myheader.h myLinkDef.h which will create a source file named mydict.cxx that you can compile and link as any of your other source file. The file myLinkDef.h is where you typically put the line#ifdef __MAKECINT__ #pragma link C++ class vector<vector<double> >+; #endif

These steps are simplified by ACLiC which will run rootcint, g++ and ld for you in order to create a shared library from just a simple source file (and its header). Hence the example you refer to where we recommend to create a single file named loader.C:// File loader.C #include <vector> #ifdef __MAKECINT__ #pragma link C++ class vector<vector<double> >+; #endif and ‘load’ it from the command line via:root [] .L loader.C+or from compiled code via gROOT->ProcessLine(".L loader.C+"); (from compiled code you could even use the underlying interface TSystem::CompileMacro).

Where and how did you use ‘#pragma’ line when it did not work for you?

Philippe.