Is there a way to convert a tree with vector entries to float values? Basically, std::vector *’ to ‘float’
Dear @shreya14p ,
Let’s try to remove TTree from the equation for a second. Given any object of type std::vector<float> *
, how would you convert it to a single float
? Let me give the following small C++ snippet as an example
int main(){
std::vector<float> myfloats{1., 2., 3., 4., 5.};
// To represent *exactly* your question, even though
// this is really not needed for the discussion
std::vector<float> *myfloats_p{&myfloats};
// How would you perform the conversion from vector to single float
float my_float = ??
}
Cheers,
Vincenzo
Hi,
I propose not to branch the discussion in this thread and follow it here Vector type in TMVAClassificationApplication - #3 by shreya14p .
Best,
D
1 Like