Is there already a way to read into a TTree a comma separated (or in general delimited by a user specified delimiter) data file, containing, among other things, character variables with spaces within them ?
TTree.ReadFile() seems to be able to read only white-space delimited files, and string variable values can't have spaces in them.
I thought I would check to see if there may be a method available in ROOT already for doing this.
Indeed, the only ‘canned’ ascii reading requires a space separated file.
You can either transfer you file (for example using sed) or one could
tweak TTree::ReadFile. If you do the later, we will be more than happy to incorporate it into the ROOT code.
I usally use this function to read a line.
vector<TString> Tokens(TString aline,TString aDelim)
for ( i=0; i<InObjArray->GetEntriesFast(); i++ )
This looks like a good start
Can you try to incorporate it into TTree::ReadFile?