Problem for std::vector<bool> in TTree

Dear Experts:

I just met a “serious” problem using std::vector in TTree;
I am using ROOT 5.26/00c (ROOT 5.26/00c (tags/v5-26-00c@34586)

I am trying to read the content in TTree I created previously

There are branches in type std::vector .
When I use the interactive mode and try to Scan this variable, they all looks good .

When I try to compile my .C and .h,(by modifying the .C file after MakeClass()) without using linkdef.h and rootdict, the compile is fine, and my main.exe runs smoothly, but when I read the value stored in the branch with std::vector, they seems to be “WRONG” except for the first element of the vector.

Then I try writing a linkdef.h:

#pragma link C++ class vector<float> + ;
#pragma link C++ class vector<double> + ;
#pragma link C++ class vector<int> + ;
#pragma link C++ class vector<bool> + ;

and using roodict to generate the dictionary.
This time the print out from my main.exe is corrret.

When I do roodict, I have this warning:

Which seems normal, since root should already include these basic vector class.

So for me it seems not the case. It seems that I must generated the dictionary for vector, in spite of the warning message.

And what is serious for me is that if I do not use linkdef, my program still compile normally. If I were not comparing the value in interactive mode with the compiled program, I will never know there are such problem for the TBranches with vector

So Do I do something wrong? or it is really a bug for root, at least this particular version?

Hi,

There was missing settings in the autoloading mechanism which is fixed by revision 36588.

To work around the problem in compile code use the statement:gROOT->ProcessLine("#include <vector>");somewhere towards the beginning of your main.

Cheers,
Philippe.