ROOTR: working in R's package,
-> changed char* by TString because segfault and corrupted data is produced.