Hi,
a std::string is not a char*, which is what you “promise” to pass by defining the branch as “/C”. Simply do char* data = new char[1024] when filling, and when reading define it as char* data = 0; Or, better yet, create the branch with a TString, using the object pointer overload of TTree::Branch(), i.e. TString* pdata = &data; PostSel->Branch(“data”, &p_data).
Cheers, Axel.