ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided
I want to use slice of a vector, things work for vector<double> but not for vector<string>. e.g. in the attached file, I have a tree named primaryParticle, there are two types of branches, vector<double> and vector<string>. I can do primaryParticle->Draw(“particleE”) or primaryParticle->Draw(“particleE”) which works perfectly due to the branch is vector<double>, but it doesn’t work for primaryParticle->Draw(“particleName”) since the branch is vector<string>. While primaryParticle->Scan(“particleName”) works correctly.
My original goal is to use some slices of the vector as selections. For example, fmsPoint->Draw(">>elist",“pointSourceName==“gamma”&&pointSourceName==“gamma””) which doesn’t work properly since the branch pointSourceName is a vector<string> type. You can do fmsPoint->Draw(">>elist",“pointE>10&&pointE<10”) since the branch pointE is a vector<double> type.
Any help how to read slice of a vector<string>.test_pythia6_rngSeed123456.root (39.0 KB)