Hi ,
I am looping trough a TTree and trying to cout the values of a particular branch text
, which contains string values. I am running the code as macro in ROOT. However I get nothing when the code runs, it just output blank lines (Everything worked fine including printing float values).
this is the code that does the thing:
string text;
Tree->SetBranchAddress("text", &text);
for(int i=0; i <1000; i++){
InTree->GetEntry(i);
cout << text << endl;
}
Can somebody helps to point out the problem in my code?
Thanks in advance
_ROOT Version:6.24.00 (conda-forge channel, conda = 4.8.3)
_Platform:_Linux 3.10.0-1127.el7.x86_64
_Compiler:g++ (crosstool-NG 1.24.0.133_b0863d8_dirty) 9.3.0 (comes with conda)