Save list of strings in TTree branch

Hi everyone,

I’ve been trying unsuccessfully to write a simple list of strings in a TTree. The variable in question is as follows:

Currently, the corresponding branch is:

Writing to the array and calling tree->Fill() does not seem to work. Is this syntax even supported?

I would prefer not to use a std::vector of std::strings (which works), since it introduces a load of extra variables in the tree. Is there any way to store lists of strings, even using char arrays with fixed width and length?


Hi Matias,

you can have a look to this old post Saving an array of character strings in a root tree .
I think I am not sure why using an STL container would “introduce a lot of extra variables in the ttree”.