I’m putting a std::map<std::string, int> into a TTree. I’m now trying to use this map by using MakeClass on the tree that contains the map.
But I’m not able to get the string value from the map. MakeClass seems to just grab the branches for the “first” and “second” pieces of the map separately and put them into arrays. I can look at the int values this way (second) but the strings don’t show up. I know the strings are in there because I can histogram them.
Is there any way I can simply assign a branch address in the MakeClass class for the map directly? I’ve tried something like:
map<std::string, int> *theMap;
fChain->SetBranchAddress("theMap", theMap, &b_theMap);
But I get a segfault.
Anybody know how to do this? Thanks.