TFile::MakeProject vector deficiency

Assume that you have a set of classes “ClassA”, “ClassB” and “ClassC”. Then assume that the “ClassB” has some data members “vector” and/or vector<ClassA*>, while the “ClassC” inherits from “vector” or vector<ClassA*>.
The “TFile::MakeProject” will generate dictionaries for all “base” classes, but it will NOT generate anything for the corresponding “vector<…>” classes (but they are really needed, too).

Hi Wile,

Do you have an example reproducing this problem?

Cheers,
Philippe.

PS. Inheriting from std::vector is ‘usually’ not a good idea as its destructor is not (intentionally) set to be virtual.

Hi Wile,

MakeProject does indeed not request the CINT dictionary for the vector that are embedded. However it does request the generation of the TClass for it and thus the I/O works fine.

By construction this problem is actually gone in ROOT v6 because cling is able to properly instantiate the vector automatically (i.e. without any request in the dictionary).

So for the moment when using v5, you still need to use gInterpreter->GenerateDictionary as a work-around.
When using v6, your example works fine (except the need to displace the loading of the library but that another story) without the call to GenerateDictionary.

Cheers,
Philippe.